| OLD | NEW |
| 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 Loading... |
| 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 */ |
| 229 | 234 |
| 230 PORT_ZFree(sid, sizeof(sslSessionID)); | 235 PORT_ZFree(sid, sizeof(sslSessionID)); |
| 231 } | 236 } |
| 232 | 237 |
| 233 /* BEWARE: This function gets called for both client and server SIDs !! | 238 /* BEWARE: This function gets called for both client and server SIDs !! |
| 234 * Decrement reference count, and | 239 * Decrement reference count, and |
| 235 * free sid if ref count is zero, and sid is not in the cache. | 240 * free sid if ref count is zero, and sid is not in the cache. |
| 236 * Does NOT remove from the cache first. | 241 * Does NOT remove from the cache first. |
| 237 * If the sid is still in the cache, it is left there until next time | 242 * If the sid is still in the cache, it is left there until next time |
| 238 * the cache list is traversed. | 243 * the cache list is traversed. |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 sid->u.ssl3.sessionTicket.ticket.len = 0; | 530 sid->u.ssl3.sessionTicket.ticket.len = 0; |
| 526 } | 531 } |
| 527 sid->u.ssl3.sessionTicket.received_timestamp = | 532 sid->u.ssl3.sessionTicket.received_timestamp = |
| 528 session_ticket->received_timestamp; | 533 session_ticket->received_timestamp; |
| 529 sid->u.ssl3.sessionTicket.ticket_lifetime_hint = | 534 sid->u.ssl3.sessionTicket.ticket_lifetime_hint = |
| 530 session_ticket->ticket_lifetime_hint; | 535 session_ticket->ticket_lifetime_hint; |
| 531 | 536 |
| 532 UNLOCK_CACHE; | 537 UNLOCK_CACHE; |
| 533 return SECSuccess; | 538 return SECSuccess; |
| 534 } | 539 } |
| OLD | NEW |