OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/nss_ssl_util.h" | 5 #include "net/socket/nss_ssl_util.h" |
6 | 6 |
7 #include <nss.h> | 7 #include <nss.h> |
8 #include <secerr.h> | 8 #include <secerr.h> |
9 #include <ssl.h> | 9 #include <ssl.h> |
10 #include <sslerr.h> | 10 #include <sslerr.h> |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 case SSL_ERROR_HANDSHAKE_FAILURE_ALERT: | 176 case SSL_ERROR_HANDSHAKE_FAILURE_ALERT: |
177 case SSL_ERROR_HANDSHAKE_UNEXPECTED_ALERT: | 177 case SSL_ERROR_HANDSHAKE_UNEXPECTED_ALERT: |
178 case SSL_ERROR_ILLEGAL_PARAMETER_ALERT: | 178 case SSL_ERROR_ILLEGAL_PARAMETER_ALERT: |
179 return ERR_SSL_PROTOCOL_ERROR; | 179 return ERR_SSL_PROTOCOL_ERROR; |
180 case SSL_ERROR_DECOMPRESSION_FAILURE_ALERT: | 180 case SSL_ERROR_DECOMPRESSION_FAILURE_ALERT: |
181 return ERR_SSL_DECOMPRESSION_FAILURE_ALERT; | 181 return ERR_SSL_DECOMPRESSION_FAILURE_ALERT; |
182 case SSL_ERROR_BAD_MAC_ALERT: | 182 case SSL_ERROR_BAD_MAC_ALERT: |
183 return ERR_SSL_BAD_RECORD_MAC_ALERT; | 183 return ERR_SSL_BAD_RECORD_MAC_ALERT; |
184 case SSL_ERROR_UNSAFE_NEGOTIATION: | 184 case SSL_ERROR_UNSAFE_NEGOTIATION: |
185 return ERR_SSL_UNSAFE_NEGOTIATION; | 185 return ERR_SSL_UNSAFE_NEGOTIATION; |
186 case SSL_ERROR_WEAK_SERVER_KEY: | 186 case SSL_ERROR_WEAK_SERVER_EPHEMERAL_DH_KEY: |
187 return ERR_SSL_WEAK_SERVER_EPHEMERAL_DH_KEY; | 187 return ERR_SSL_WEAK_SERVER_EPHEMERAL_DH_KEY; |
188 | 188 |
189 default: { | 189 default: { |
190 if (IS_SSL_ERROR(err)) { | 190 if (IS_SSL_ERROR(err)) { |
191 LOG(WARNING) << "Unknown SSL error " << err | 191 LOG(WARNING) << "Unknown SSL error " << err |
192 << " mapped to net::ERR_SSL_PROTOCOL_ERROR"; | 192 << " mapped to net::ERR_SSL_PROTOCOL_ERROR"; |
193 return ERR_SSL_PROTOCOL_ERROR; | 193 return ERR_SSL_PROTOCOL_ERROR; |
194 } | 194 } |
195 LOG(WARNING) << "Unknown error " << err << " mapped to net::ERR_FAILED"; | 195 LOG(WARNING) << "Unknown error " << err << " mapped to net::ERR_FAILED"; |
196 return ERR_FAILED; | 196 return ERR_FAILED; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 | 238 |
239 void LogFailedNSSFunction(const BoundNetLog& net_log, | 239 void LogFailedNSSFunction(const BoundNetLog& net_log, |
240 const char* function, | 240 const char* function, |
241 const char* param) { | 241 const char* param) { |
242 net_log.AddEvent( | 242 net_log.AddEvent( |
243 NetLog::TYPE_SSL_NSS_ERROR, | 243 NetLog::TYPE_SSL_NSS_ERROR, |
244 make_scoped_refptr(new SSLFailedNSSFunctionParams(function, param))); | 244 make_scoped_refptr(new SSLFailedNSSFunctionParams(function, param))); |
245 } | 245 } |
246 | 246 |
247 } // namespace net | 247 } // namespace net |
OLD | NEW |