Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(448)

Unified Diff: net/ssl/openssl_ssl_util.h

Issue 494913002: Include better OpenSSL error information in NetLog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..f32887f80ebf1bb8f71714b9cd379e5b3aca8f52 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,34 @@ 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);
+// 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
+// source file and line number are returned in |*out_error_code|, |*out_file|,
+// and |*out_line|, respectively. Otherwise they 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,
+ uint32_t* out_error_code,
+ const char** out_file,
+ int* out_line);
+
+// Creates NetLog callback for an OpenSSL error.
+NetLog::ParametersCallback CreateNetLogOpenSSLErrorCallback(int net_error,
+ int ssl_error,
+ uint32_t error_code,
+ const char* file,
+ int line);
+
} // namespace net
#endif // NET_SSL_OPENSSL_SSL_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698