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

Side by Side Diff: net/third_party/nss/ssl/sslnonce.c

Issue 6413010: Allow the SSL session cache on Win/Mac to be used even after a client cert key is removed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 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
OLDNEW
1 /* 1 /*
2 * This file implements the CLIENT Session ID cache. 2 * This file implements the CLIENT Session ID cache.
3 * 3 *
4 * ***** BEGIN LICENSE BLOCK ***** 4 * ***** BEGIN LICENSE BLOCK *****
5 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 5 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 * 6 *
7 * The contents of this file are subject to the Mozilla Public License Version 7 * The contents of this file are subject to the Mozilla Public License Version
8 * 1.1 (the "License"); you may not use this file except in compliance with 8 * 1.1 (the "License"); you may not use this file except in compliance with
9 * the License. You may obtain a copy of the License at 9 * the License. You may obtain a copy of the License at
10 * http://www.mozilla.org/MPL/ 10 * http://www.mozilla.org/MPL/
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 } 219 }
220 for (i = 0; i < MAX_PEER_CERT_CHAIN_SIZE && sid->peerCertChain[i]; i++) { 220 for (i = 0; i < MAX_PEER_CERT_CHAIN_SIZE && sid->peerCertChain[i]; i++) {
221 CERT_DestroyCertificate(sid->peerCertChain[i]); 221 CERT_DestroyCertificate(sid->peerCertChain[i]);
222 } 222 }
223 if ( sid->localCert ) { 223 if ( sid->localCert ) {
224 CERT_DestroyCertificate(sid->localCert); 224 CERT_DestroyCertificate(sid->localCert);
225 } 225 }
226 if (sid->u.ssl3.sessionTicket.ticket.data) { 226 if (sid->u.ssl3.sessionTicket.ticket.data) {
227 SECITEM_FreeItem(&sid->u.ssl3.sessionTicket.ticket, PR_FALSE); 227 SECITEM_FreeItem(&sid->u.ssl3.sessionTicket.ticket, PR_FALSE);
228 } 228 }
229 #ifdef NSS_PLATFORM_CLIENT_AUTH
230 if (sid->u.ssl3.clPlatformAuthValid) {
231 ssl_FreePlatformAuthInfo(&sid->u.ssl3.clPlatformAuthInfo);
232 }
233 #endif /* NSS_PLATFORM_CLIENT_AUTH */
234 229
235 PORT_ZFree(sid, sizeof(sslSessionID)); 230 PORT_ZFree(sid, sizeof(sslSessionID));
236 } 231 }
237 232
238 /* BEWARE: This function gets called for both client and server SIDs !! 233 /* BEWARE: This function gets called for both client and server SIDs !!
239 * Decrement reference count, and 234 * Decrement reference count, and
240 * free sid if ref count is zero, and sid is not in the cache. 235 * free sid if ref count is zero, and sid is not in the cache.
241 * Does NOT remove from the cache first. 236 * Does NOT remove from the cache first.
242 * If the sid is still in the cache, it is left there until next time 237 * If the sid is still in the cache, it is left there until next time
243 * the cache list is traversed. 238 * the cache list is traversed.
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 sid->u.ssl3.sessionTicket.ticket.len = 0; 525 sid->u.ssl3.sessionTicket.ticket.len = 0;
531 } 526 }
532 sid->u.ssl3.sessionTicket.received_timestamp = 527 sid->u.ssl3.sessionTicket.received_timestamp =
533 session_ticket->received_timestamp; 528 session_ticket->received_timestamp;
534 sid->u.ssl3.sessionTicket.ticket_lifetime_hint = 529 sid->u.ssl3.sessionTicket.ticket_lifetime_hint =
535 session_ticket->ticket_lifetime_hint; 530 session_ticket->ticket_lifetime_hint;
536 531
537 UNLOCK_CACHE; 532 UNLOCK_CACHE;
538 return SECSuccess; 533 return SECSuccess;
539 } 534 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698