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

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

Issue 9558017: Update net/third_party/nss to NSS 3.13.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Upload before checkin Created 8 years, 9 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 | « net/third_party/nss/ssl/sslmutex.c ('k') | net/third_party/nss/ssl/sslreveal.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 18 matching lines...) Expand all
29 * in which case the provisions of the GPL or the LGPL are applicable instead 29 * in which case the provisions of the GPL or the LGPL are applicable instead
30 * of those above. If you wish to allow use of your version of this file only 30 * of those above. If you wish to allow use of your version of this file only
31 * under the terms of either the GPL or the LGPL, and not to allow others to 31 * under the terms of either the GPL or the LGPL, and not to allow others to
32 * use your version of this file under the terms of the MPL, indicate your 32 * use your version of this file under the terms of the MPL, indicate your
33 * decision by deleting the provisions above and replace them with the notice 33 * decision by deleting the provisions above and replace them with the notice
34 * and other provisions required by the GPL or the LGPL. If you do not delete 34 * and other provisions required by the GPL or the LGPL. If you do not delete
35 * the provisions above, a recipient may use your version of this file under 35 * the provisions above, a recipient may use your version of this file under
36 * the terms of any one of the MPL, the GPL or the LGPL. 36 * the terms of any one of the MPL, the GPL or the LGPL.
37 * 37 *
38 * ***** END LICENSE BLOCK ***** */ 38 * ***** END LICENSE BLOCK ***** */
39 /* $Id: sslnonce.c,v 1.25 2008/03/10 00:01:28 wtc%google.com Exp $ */ 39 /* $Id: sslnonce.c,v 1.26 2011/03/24 01:40:14 alexei.volkov.bugs%sun.com Exp $ * /
40 40
41 #include "cert.h" 41 #include "cert.h"
42 #include "pk11pub.h" 42 #include "pk11pub.h"
43 #include "secitem.h" 43 #include "secitem.h"
44 #include "ssl.h" 44 #include "ssl.h"
45 #include "nss.h" 45 #include "nss.h"
46 46
47 #include "sslimpl.h" 47 #include "sslimpl.h"
48 #include "sslproto.h" 48 #include "sslproto.h"
49 #include "nssilock.h" 49 #include "nssilock.h"
(...skipping 169 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 if (sid->u.ssl3.srvName.data) {
230 SECITEM_FreeItem(&sid->u.ssl3.srvName, PR_FALSE);
231 }
229 232
230 PORT_ZFree(sid, sizeof(sslSessionID)); 233 PORT_ZFree(sid, sizeof(sslSessionID));
231 } 234 }
232 235
233 /* BEWARE: This function gets called for both client and server SIDs !! 236 /* BEWARE: This function gets called for both client and server SIDs !!
234 * Decrement reference count, and 237 * Decrement reference count, and
235 * free sid if ref count is zero, and sid is not in the cache. 238 * free sid if ref count is zero, and sid is not in the cache.
236 * Does NOT remove from the cache first. 239 * Does NOT remove from the cache first.
237 * If the sid is still in the cache, it is left there until next time 240 * If the sid is still in the cache, it is left there until next time
238 * the cache list is traversed. 241 * the cache list is traversed.
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 sid->u.ssl3.sessionTicket.ticket.len = 0; 528 sid->u.ssl3.sessionTicket.ticket.len = 0;
526 } 529 }
527 sid->u.ssl3.sessionTicket.received_timestamp = 530 sid->u.ssl3.sessionTicket.received_timestamp =
528 session_ticket->received_timestamp; 531 session_ticket->received_timestamp;
529 sid->u.ssl3.sessionTicket.ticket_lifetime_hint = 532 sid->u.ssl3.sessionTicket.ticket_lifetime_hint =
530 session_ticket->ticket_lifetime_hint; 533 session_ticket->ticket_lifetime_hint;
531 534
532 UNLOCK_CACHE; 535 UNLOCK_CACHE;
533 return SECSuccess; 536 return SECSuccess;
534 } 537 }
OLDNEW
« no previous file with comments | « net/third_party/nss/ssl/sslmutex.c ('k') | net/third_party/nss/ssl/sslreveal.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698