| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Various SSL functions. | 2 * Various SSL functions. |
| 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 19 matching lines...) Expand all Loading... |
| 30 * in which case the provisions of the GPL or the LGPL are applicable instead | 30 * in which case the provisions of the GPL or the LGPL are applicable instead |
| 31 * of those above. If you wish to allow use of your version of this file only | 31 * of those above. If you wish to allow use of your version of this file only |
| 32 * under the terms of either the GPL or the LGPL, and not to allow others to | 32 * under the terms of either the GPL or the LGPL, and not to allow others to |
| 33 * use your version of this file under the terms of the MPL, indicate your | 33 * use your version of this file under the terms of the MPL, indicate your |
| 34 * decision by deleting the provisions above and replace them with the notice | 34 * decision by deleting the provisions above and replace them with the notice |
| 35 * and other provisions required by the GPL or the LGPL. If you do not delete | 35 * and other provisions required by the GPL or the LGPL. If you do not delete |
| 36 * the provisions above, a recipient may use your version of this file under | 36 * the provisions above, a recipient may use your version of this file under |
| 37 * the terms of any one of the MPL, the GPL or the LGPL. | 37 * the terms of any one of the MPL, the GPL or the LGPL. |
| 38 * | 38 * |
| 39 * ***** END LICENSE BLOCK ***** */ | 39 * ***** END LICENSE BLOCK ***** */ |
| 40 /* $Id: sslsecur.c,v 1.57 2012/02/15 21:52:08 kaie%kuix.de Exp $ */ | 40 /* $Id: sslsecur.c,v 1.58 2012/03/01 18:36:35 kaie%kuix.de Exp $ */ |
| 41 #include "cert.h" | 41 #include "cert.h" |
| 42 #include "secitem.h" | 42 #include "secitem.h" |
| 43 #include "keyhi.h" | 43 #include "keyhi.h" |
| 44 #include "ssl.h" | 44 #include "ssl.h" |
| 45 #include "sslimpl.h" | 45 #include "sslimpl.h" |
| 46 #include "sslproto.h" | 46 #include "sslproto.h" |
| 47 #include "secoid.h" /* for SECOID_GetALgorithmTag */ | 47 #include "secoid.h" /* for SECOID_GetALgorithmTag */ |
| 48 #include "pk11func.h" /* for PK11_GenerateRandom */ | 48 #include "pk11func.h" /* for PK11_GenerateRandom */ |
| 49 #include "nss.h" /* for NSS_RegisterShutdown */ | 49 #include "nss.h" /* for NSS_RegisterShutdown */ |
| 50 #include "prinit.h" /* for PR_CallOnceWithArg */ | 50 #include "prinit.h" /* for PR_CallOnceWithArg */ |
| (...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1401 SECStatus | 1401 SECStatus |
| 1402 SSL_InvalidateSession(PRFileDesc *fd) | 1402 SSL_InvalidateSession(PRFileDesc *fd) |
| 1403 { | 1403 { |
| 1404 sslSocket * ss = ssl_FindSocket(fd); | 1404 sslSocket * ss = ssl_FindSocket(fd); |
| 1405 SECStatus rv = SECFailure; | 1405 SECStatus rv = SECFailure; |
| 1406 | 1406 |
| 1407 if (ss) { | 1407 if (ss) { |
| 1408 ssl_Get1stHandshakeLock(ss); | 1408 ssl_Get1stHandshakeLock(ss); |
| 1409 ssl_GetSSL3HandshakeLock(ss); | 1409 ssl_GetSSL3HandshakeLock(ss); |
| 1410 | 1410 |
| 1411 » if (ss->sec.ci.sid) { | 1411 » if (ss->sec.ci.sid && ss->sec.uncache) { |
| 1412 ss->sec.uncache(ss->sec.ci.sid); | 1412 ss->sec.uncache(ss->sec.ci.sid); |
| 1413 rv = SECSuccess; | 1413 rv = SECSuccess; |
| 1414 } | 1414 } |
| 1415 | 1415 |
| 1416 ssl_ReleaseSSL3HandshakeLock(ss); | 1416 ssl_ReleaseSSL3HandshakeLock(ss); |
| 1417 ssl_Release1stHandshakeLock(ss); | 1417 ssl_Release1stHandshakeLock(ss); |
| 1418 } | 1418 } |
| 1419 return rv; | 1419 return rv; |
| 1420 } | 1420 } |
| 1421 | 1421 |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1585 if (!ss) { | 1585 if (!ss) { |
| 1586 SSL_DBG(("%d: SSL[%d]: bad socket in SNISocketConfigHook", | 1586 SSL_DBG(("%d: SSL[%d]: bad socket in SNISocketConfigHook", |
| 1587 SSL_GETPID(), fd)); | 1587 SSL_GETPID(), fd)); |
| 1588 return SECFailure; | 1588 return SECFailure; |
| 1589 } | 1589 } |
| 1590 | 1590 |
| 1591 ss->sniSocketConfig = func; | 1591 ss->sniSocketConfig = func; |
| 1592 ss->sniSocketConfigArg = arg; | 1592 ss->sniSocketConfigArg = arg; |
| 1593 return SECSuccess; | 1593 return SECSuccess; |
| 1594 } | 1594 } |
| OLD | NEW |