Index: net/ssl/openssl_ssl_util.h |
diff --git a/net/ssl/openssl_ssl_util.h b/net/ssl/openssl_ssl_util.h |
index 6721453e07febac63741d9f5c319f77a9eb31666..587dac82e9e0775ce159655296a8c1ff643245b3 100644 |
--- a/net/ssl/openssl_ssl_util.h |
+++ b/net/ssl/openssl_ssl_util.h |
@@ -5,6 +5,8 @@ |
#ifndef NET_SSL_OPENSSL_SSL_UTIL_H_ |
#define NET_SSL_OPENSSL_SSL_UTIL_H_ |
+#include "net/base/net_log.h" |
+ |
namespace crypto { |
class OpenSSLErrStackTracer; |
} |
@@ -30,11 +32,40 @@ struct SslSetClearMask { |
}; |
// Converts an OpenSSL error code into a net error code, walking the OpenSSL |
-// error stack if needed. Note that |tracer| is not currently used in the |
-// implementation, but is passed in anyway as this ensures the caller will clear |
-// any residual codes left on the error stack. |
+// error stack if needed. |
+// |
+// Note that |tracer| is not currently used in the implementation, but is passed |
+// in anyway as this ensures the caller will clear any residual codes left on |
+// the error stack. |
int MapOpenSSLError(int err, const crypto::OpenSSLErrStackTracer& tracer); |
+// Helper struct to store information about an OpenSSL error stack entry. |
+struct OpenSSLErrorInfo { |
+ OpenSSLErrorInfo(); |
Ryan Sleevi
2014/08/26 22:38:01
An inline ctor is fine here, it's all POD, and no
davidben
2014/08/27 15:48:22
Done. Also set *out_error_info = OpenSSLErrorInfo(
|
+ |
+ uint32_t error_code; |
+ const char* file; |
+ int line; |
+}; |
+ |
+// Converts an OpenSSL error code into a net error code, walking the OpenSSL |
+// error stack if needed. If a value on the stack is used, the error code and |
+// associated information are returned in |*out_error_info|. Otherwise its |
+// fields are set to 0 and NULL. |
+// |
+// Note that |tracer| is not currently used in the implementation, but is passed |
+// in anyway as this ensures the caller will clear any residual codes left on |
+// the error stack. |
+int MapOpenSSLErrorWithDetails(int err, |
+ const crypto::OpenSSLErrStackTracer& tracer, |
+ OpenSSLErrorInfo* out_error_info); |
+ |
+// Creates NetLog callback for an OpenSSL error. |
+NetLog::ParametersCallback CreateNetLogOpenSSLErrorCallback( |
+ int net_error, |
+ int ssl_error, |
+ const OpenSSLErrorInfo& error_info); |
+ |
} // namespace net |
#endif // NET_SSL_OPENSSL_SSL_UTIL_H_ |