| 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/socket/openssl_ssl_util.h" | 5 #include "net/socket/openssl_ssl_util.h" |
| 6 | 6 |
| 7 #include <openssl/err.h> | 7 #include <openssl/err.h> |
| 8 #include <openssl/ssl.h> | 8 #include <openssl/ssl.h> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 case SSL_ERROR_WANT_READ: | 139 case SSL_ERROR_WANT_READ: |
| 140 case SSL_ERROR_WANT_WRITE: | 140 case SSL_ERROR_WANT_WRITE: |
| 141 return ERR_IO_PENDING; | 141 return ERR_IO_PENDING; |
| 142 case SSL_ERROR_SYSCALL: | 142 case SSL_ERROR_SYSCALL: |
| 143 LOG(ERROR) << "OpenSSL SYSCALL error, earliest error code in " | 143 LOG(ERROR) << "OpenSSL SYSCALL error, earliest error code in " |
| 144 "error queue: " << ERR_peek_error() << ", errno: " | 144 "error queue: " << ERR_peek_error() << ", errno: " |
| 145 << errno; | 145 << errno; |
| 146 return ERR_SSL_PROTOCOL_ERROR; | 146 return ERR_SSL_PROTOCOL_ERROR; |
| 147 case SSL_ERROR_SSL: | 147 case SSL_ERROR_SSL: |
| 148 return MapOpenSSLErrorSSL(); | 148 return MapOpenSSLErrorSSL(); |
| 149 case SSL_ERROR_ZERO_RETURN: |
| 150 return 0; |
| 149 default: | 151 default: |
| 150 // TODO(joth): Implement full mapping. | 152 // TODO(joth): Implement full mapping. |
| 151 LOG(WARNING) << "Unknown OpenSSL error " << err; | 153 LOG(WARNING) << "Unknown OpenSSL error " << err; |
| 152 return ERR_SSL_PROTOCOL_ERROR; | 154 return ERR_SSL_PROTOCOL_ERROR; |
| 153 } | 155 } |
| 154 } | 156 } |
| 155 | 157 |
| 156 } // namespace net | 158 } // namespace net |
| OLD | NEW |