| 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 #include "net/ssl/openssl_ssl_util.h" | 5 #include "net/ssl/openssl_ssl_util.h" |
| 6 | 6 |
| 7 #include <errno.h> | 7 #include <errno.h> |
| 8 | 8 |
| 9 #include <openssl/err.h> | 9 #include <openssl/err.h> |
| 10 #include <openssl/ssl.h> | 10 #include <openssl/ssl.h> |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 case SSL_R_TLSV1_ALERT_UNKNOWN_CA: | 85 case SSL_R_TLSV1_ALERT_UNKNOWN_CA: |
| 86 return ERR_BAD_SSL_CLIENT_AUTH_CERT; | 86 return ERR_BAD_SSL_CLIENT_AUTH_CERT; |
| 87 case SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE: | 87 case SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE: |
| 88 return ERR_SSL_DECOMPRESSION_FAILURE_ALERT; | 88 return ERR_SSL_DECOMPRESSION_FAILURE_ALERT; |
| 89 case SSL_R_SSLV3_ALERT_BAD_RECORD_MAC: | 89 case SSL_R_SSLV3_ALERT_BAD_RECORD_MAC: |
| 90 return ERR_SSL_BAD_RECORD_MAC_ALERT; | 90 return ERR_SSL_BAD_RECORD_MAC_ALERT; |
| 91 case SSL_R_TLSV1_ALERT_DECRYPT_ERROR: | 91 case SSL_R_TLSV1_ALERT_DECRYPT_ERROR: |
| 92 return ERR_SSL_DECRYPT_ERROR_ALERT; | 92 return ERR_SSL_DECRYPT_ERROR_ALERT; |
| 93 case SSL_R_TLSV1_UNRECOGNIZED_NAME: | 93 case SSL_R_TLSV1_UNRECOGNIZED_NAME: |
| 94 return ERR_SSL_UNRECOGNIZED_NAME_ALERT; | 94 return ERR_SSL_UNRECOGNIZED_NAME_ALERT; |
| 95 case SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED: | |
| 96 return ERR_SSL_UNSAFE_NEGOTIATION; | |
| 97 case SSL_R_BAD_DH_P_LENGTH: | 95 case SSL_R_BAD_DH_P_LENGTH: |
| 98 return ERR_SSL_WEAK_SERVER_EPHEMERAL_DH_KEY; | 96 return ERR_SSL_WEAK_SERVER_EPHEMERAL_DH_KEY; |
| 99 // SSL_R_UNKNOWN_PROTOCOL is reported if premature application data is | 97 // SSL_R_UNKNOWN_PROTOCOL is reported if premature application data is |
| 100 // received (see http://crbug.com/42538), and also if all the protocol | 98 // received (see http://crbug.com/42538), and also if all the protocol |
| 101 // versions supported by the server were disabled in this socket instance. | 99 // versions supported by the server were disabled in this socket instance. |
| 102 // Mapped to ERR_SSL_PROTOCOL_ERROR for compatibility with other SSL sockets | 100 // Mapped to ERR_SSL_PROTOCOL_ERROR for compatibility with other SSL sockets |
| 103 // in the former scenario. | 101 // in the former scenario. |
| 104 case SSL_R_UNKNOWN_PROTOCOL: | 102 case SSL_R_UNKNOWN_PROTOCOL: |
| 105 case SSL_R_SSL_HANDSHAKE_FAILURE: | 103 case SSL_R_SSL_HANDSHAKE_FAILURE: |
| 106 case SSL_R_DECRYPTION_FAILED: | 104 case SSL_R_DECRYPTION_FAILED: |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 | 233 |
| 236 NetLog::ParametersCallback CreateNetLogOpenSSLErrorCallback( | 234 NetLog::ParametersCallback CreateNetLogOpenSSLErrorCallback( |
| 237 int net_error, | 235 int net_error, |
| 238 int ssl_error, | 236 int ssl_error, |
| 239 const OpenSSLErrorInfo& error_info) { | 237 const OpenSSLErrorInfo& error_info) { |
| 240 return base::Bind(&NetLogOpenSSLErrorCallback, | 238 return base::Bind(&NetLogOpenSSLErrorCallback, |
| 241 net_error, ssl_error, error_info); | 239 net_error, ssl_error, error_info); |
| 242 } | 240 } |
| 243 | 241 |
| 244 } // namespace net | 242 } // namespace net |
| OLD | NEW |