OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_SSL_OPENSSL_SSL_UTIL_H_ | 5 #ifndef NET_SSL_OPENSSL_SSL_UTIL_H_ |
6 #define NET_SSL_OPENSSL_SSL_UTIL_H_ | 6 #define NET_SSL_OPENSSL_SSL_UTIL_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <openssl/ssl.h> | 10 #include <openssl/ssl.h> |
11 | 11 |
12 #include "net/cert/x509_certificate.h" | 12 #include "net/cert/x509_certificate.h" |
13 #include "net/log/net_log.h" | 13 #include "net/log/net_log_parameters_callback.h" |
14 #include "net/ssl/scoped_openssl_types.h" | 14 #include "net/ssl/scoped_openssl_types.h" |
15 | 15 |
16 namespace crypto { | 16 namespace crypto { |
17 class OpenSSLErrStackTracer; | 17 class OpenSSLErrStackTracer; |
18 } | 18 } |
19 | 19 |
20 namespace tracked_objects { | 20 namespace tracked_objects { |
21 class Location; | 21 class Location; |
22 } | 22 } |
23 | 23 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 // SSL_ERROR_ZERO_RETURN must be handled externally. | 61 // SSL_ERROR_ZERO_RETURN must be handled externally. |
62 // | 62 // |
63 // Note that |tracer| is not currently used in the implementation, but is passed | 63 // Note that |tracer| is not currently used in the implementation, but is passed |
64 // in anyway as this ensures the caller will clear any residual codes left on | 64 // in anyway as this ensures the caller will clear any residual codes left on |
65 // the error stack. | 65 // the error stack. |
66 int MapOpenSSLErrorWithDetails(int err, | 66 int MapOpenSSLErrorWithDetails(int err, |
67 const crypto::OpenSSLErrStackTracer& tracer, | 67 const crypto::OpenSSLErrStackTracer& tracer, |
68 OpenSSLErrorInfo* out_error_info); | 68 OpenSSLErrorInfo* out_error_info); |
69 | 69 |
70 // Creates NetLog callback for an OpenSSL error. | 70 // Creates NetLog callback for an OpenSSL error. |
71 NetLog::ParametersCallback CreateNetLogOpenSSLErrorCallback( | 71 NetLogParametersCallback CreateNetLogOpenSSLErrorCallback( |
72 int net_error, | 72 int net_error, |
73 int ssl_error, | 73 int ssl_error, |
74 const OpenSSLErrorInfo& error_info); | 74 const OpenSSLErrorInfo& error_info); |
75 | 75 |
76 // Returns the net SSL version number (see ssl_connection_status_flags.h) for | 76 // Returns the net SSL version number (see ssl_connection_status_flags.h) for |
77 // this SSL connection. | 77 // this SSL connection. |
78 int GetNetSSLVersion(SSL* ssl); | 78 int GetNetSSLVersion(SSL* ssl); |
79 | 79 |
80 ScopedX509 OSCertHandleToOpenSSL(X509Certificate::OSCertHandle os_handle); | 80 ScopedX509 OSCertHandleToOpenSSL(X509Certificate::OSCertHandle os_handle); |
81 | 81 |
82 ScopedX509Stack OSCertHandlesToOpenSSL( | 82 ScopedX509Stack OSCertHandlesToOpenSSL( |
83 const X509Certificate::OSCertHandles& os_handles); | 83 const X509Certificate::OSCertHandles& os_handles); |
84 | 84 |
85 } // namespace net | 85 } // namespace net |
86 | 86 |
87 #endif // NET_SSL_OPENSSL_SSL_UTIL_H_ | 87 #endif // NET_SSL_OPENSSL_SSL_UTIL_H_ |
OLD | NEW |