Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: net/socket/nss_ssl_util.cc

Issue 10332300: Map the client certificate related SSL alerts to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 return ERR_CONNECTION_CLOSED; 158 return ERR_CONNECTION_CLOSED;
159 case PR_NOT_IMPLEMENTED_ERROR: 159 case PR_NOT_IMPLEMENTED_ERROR:
160 return ERR_NOT_IMPLEMENTED; 160 return ERR_NOT_IMPLEMENTED;
161 161
162 case SEC_ERROR_LIBRARY_FAILURE: 162 case SEC_ERROR_LIBRARY_FAILURE:
163 return ERR_UNEXPECTED; 163 return ERR_UNEXPECTED;
164 case SEC_ERROR_INVALID_ARGS: 164 case SEC_ERROR_INVALID_ARGS:
165 return ERR_INVALID_ARGUMENT; 165 return ERR_INVALID_ARGUMENT;
166 case SEC_ERROR_NO_MEMORY: 166 case SEC_ERROR_NO_MEMORY:
167 return ERR_OUT_OF_MEMORY; 167 return ERR_OUT_OF_MEMORY;
168 case SSL_ERROR_BAD_CERT_ALERT:
169 case SSL_ERROR_UNSUPPORTED_CERT_ALERT:
170 case SSL_ERROR_REVOKED_CERT_ALERT:
171 case SSL_ERROR_EXPIRED_CERT_ALERT:
172 case SSL_ERROR_CERTIFICATE_UNKNOWN_ALERT:
173 case SSL_ERROR_UNKNOWN_CA_ALERT:
174 case SSL_ERROR_ACCESS_DENIED_ALERT:
175 return ERR_BAD_SSL_CLIENT_AUTH_CERT;
Ryan Sleevi 2012/05/22 19:14:11 The interpretation of these are dependent upon whe
168 case SEC_ERROR_NO_KEY: 176 case SEC_ERROR_NO_KEY:
169 return ERR_SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY; 177 return ERR_SSL_CLIENT_AUTH_CERT_NO_PRIVATE_KEY;
170 case SEC_ERROR_INVALID_KEY: 178 case SEC_ERROR_INVALID_KEY:
171 case SSL_ERROR_SIGN_HASHES_FAILURE: 179 case SSL_ERROR_SIGN_HASHES_FAILURE:
172 return ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED; 180 return ERR_SSL_CLIENT_AUTH_SIGNATURE_FAILED;
173 // A handshake (initial or renegotiation) may fail because some signature 181 // A handshake (initial or renegotiation) may fail because some signature
174 // (for example, the signature in the ServerKeyExchange message for an 182 // (for example, the signature in the ServerKeyExchange message for an
175 // ephemeral Diffie-Hellman cipher suite) is invalid. 183 // ephemeral Diffie-Hellman cipher suite) is invalid.
176 case SEC_ERROR_BAD_SIGNATURE: 184 case SEC_ERROR_BAD_SIGNATURE:
177 return ERR_SSL_PROTOCOL_ERROR; 185 return ERR_SSL_PROTOCOL_ERROR;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 270
263 void LogFailedNSSFunction(const BoundNetLog& net_log, 271 void LogFailedNSSFunction(const BoundNetLog& net_log,
264 const char* function, 272 const char* function,
265 const char* param) { 273 const char* param) {
266 net_log.AddEvent( 274 net_log.AddEvent(
267 NetLog::TYPE_SSL_NSS_ERROR, 275 NetLog::TYPE_SSL_NSS_ERROR,
268 make_scoped_refptr(new SSLFailedNSSFunctionParams(function, param))); 276 make_scoped_refptr(new SSLFailedNSSFunctionParams(function, param)));
269 } 277 }
270 278
271 } // namespace net 279 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698