diff options
author | davidben <davidben@chromium.org> | 2014-09-25 12:41:02 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-25 19:41:34 +0000 |
commit | 5e114758a150ac5b7c0e025dc6a2392080b46e5e (patch) | |
tree | 2a37902faf9eb6adbab16f048c6b9eae3fa5d345 /net | |
parent | f56d21f26ff4f09f8dfe35d84d20f4ce45f45c2e (diff) | |
download | chromium_src-5e114758a150ac5b7c0e025dc6a2392080b46e5e.zip chromium_src-5e114758a150ac5b7c0e025dc6a2392080b46e5e.tar.gz chromium_src-5e114758a150ac5b7c0e025dc6a2392080b46e5e.tar.bz2 |
Map SSL errors to SSL_PROTOCOL_ERROR, others to FAILED.
This matches the NSS port's behavior. If an unknown error within ERR_LIB_SSL,
map to ERR_SSL_PROTOCOL_ERROR. Otherwise, map to ERR_FAILED. The OpenSSL port
actually inverted this for some reason.
(This doesn't fix #417134 but maps it to a more appropriate error.)
BUG=417134
Review URL: https://codereview.chromium.org/598043002
Cr-Commit-Position: refs/heads/master@{#296769}
Diffstat (limited to 'net')
-rw-r--r-- | net/ssl/openssl_ssl_util.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ssl/openssl_ssl_util.cc b/net/ssl/openssl_ssl_util.cc index 53d1b7a..ffa265e 100644 --- a/net/ssl/openssl_ssl_util.cc +++ b/net/ssl/openssl_ssl_util.cc @@ -143,7 +143,7 @@ int MapOpenSSLErrorSSL(uint32_t error_code) { return ERR_SSL_INAPPROPRIATE_FALLBACK; default: LOG(WARNING) << "Unmapped error reason: " << ERR_GET_REASON(error_code); - return ERR_FAILED; + return ERR_SSL_PROTOCOL_ERROR; } } @@ -197,7 +197,7 @@ int MapOpenSSLErrorWithDetails(int err, LOG(ERROR) << "OpenSSL SYSCALL error, earliest error code in " "error queue: " << ERR_peek_error() << ", errno: " << errno; - return ERR_SSL_PROTOCOL_ERROR; + return ERR_FAILED; case SSL_ERROR_SSL: // Walk down the error stack to find an SSL or net error. uint32_t error_code; @@ -219,7 +219,7 @@ int MapOpenSSLErrorWithDetails(int err, return -ERR_GET_REASON(error_code); } } while (error_code != 0); - return ERR_SSL_PROTOCOL_ERROR; + return ERR_FAILED; default: // TODO(joth): Implement full mapping. LOG(WARNING) << "Unknown OpenSSL error " << err; |