Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* This file implements the SERVER Session ID cache. | 1 /* This file implements the SERVER Session ID cache. |
| 2 * NOTE: The contents of this file are NOT used by the client. | 2 * NOTE: The contents of this file are NOT used by the client. |
| 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 1359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1370 maxCacheEntries, | 1370 maxCacheEntries, |
| 1371 -1, -1); | 1371 -1, -1); |
| 1372 } | 1372 } |
| 1373 | 1373 |
| 1374 SECStatus | 1374 SECStatus |
| 1375 SSL_ConfigServerSessionIDCache( int maxCacheEntries, | 1375 SSL_ConfigServerSessionIDCache( int maxCacheEntries, |
| 1376 PRUint32 ssl2_timeout, | 1376 PRUint32 ssl2_timeout, |
| 1377 PRUint32 ssl3_timeout, | 1377 PRUint32 ssl3_timeout, |
| 1378 const char * directory) | 1378 const char * directory) |
| 1379 { | 1379 { |
| 1380 ssl_InitSessionCacheLocks(PR_FALSE); | |
| 1381 return SSL_ConfigServerSessionIDCacheInstance(&globalCache, | 1380 return SSL_ConfigServerSessionIDCacheInstance(&globalCache, |
| 1382 maxCacheEntries, ssl2_timeout, ssl3_timeout, directory, PR_FALSE ); | 1381 maxCacheEntries, ssl2_timeout, ssl3_timeout, directory, PR_FALSE ); |
| 1383 } | 1382 } |
| 1384 | 1383 |
| 1385 SECStatus | 1384 SECStatus |
| 1386 SSL_ShutdownServerSessionIDCacheInstance(cacheDesc *cache) | 1385 SSL_ShutdownServerSessionIDCacheInstance(cacheDesc *cache) |
| 1387 { | 1386 { |
| 1388 CloseCache(cache); | 1387 CloseCache(cache); |
| 1389 return SECSuccess; | 1388 return SECSuccess; |
| 1390 } | 1389 } |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1484 SSL_ConfigServerSessionIDCacheWithOpt( | 1483 SSL_ConfigServerSessionIDCacheWithOpt( |
| 1485 PRUint32 ssl2_timeout, | 1484 PRUint32 ssl2_timeout, |
| 1486 PRUint32 ssl3_timeout, | 1485 PRUint32 ssl3_timeout, |
| 1487 const char * directory, | 1486 const char * directory, |
| 1488 int maxCacheEntries, | 1487 int maxCacheEntries, |
| 1489 int maxCertCacheEntries, | 1488 int maxCertCacheEntries, |
| 1490 int maxSrvNameCacheEntries, | 1489 int maxSrvNameCacheEntries, |
| 1491 PRBool enableMPCache) | 1490 PRBool enableMPCache) |
| 1492 { | 1491 { |
| 1493 if (!enableMPCache) { | 1492 if (!enableMPCache) { |
| 1494 ssl_InitSessionCacheLocks(PR_FALSE); | |
|
Ryan Sleevi
2012/06/14 01:23:34
I don't believe this is correct.
Because the serv
| |
| 1495 return ssl_ConfigServerSessionIDCacheInstanceWithOpt(&globalCache, | 1493 return ssl_ConfigServerSessionIDCacheInstanceWithOpt(&globalCache, |
| 1496 ssl2_timeout, ssl3_timeout, directory, PR_FALSE, | 1494 ssl2_timeout, ssl3_timeout, directory, PR_FALSE, |
| 1497 maxCacheEntries, maxCertCacheEntries, maxSrvNameCacheEntries); | 1495 maxCacheEntries, maxCertCacheEntries, maxSrvNameCacheEntries); |
| 1498 } else { | 1496 } else { |
| 1499 return ssl_ConfigMPServerSIDCacheWithOpt(ssl2_timeout, ssl3_timeout, | 1497 return ssl_ConfigMPServerSIDCacheWithOpt(ssl2_timeout, ssl3_timeout, |
| 1500 directory, maxCacheEntries, maxCertCacheEntries, | 1498 directory, maxCacheEntries, maxCertCacheEntries, |
| 1501 maxSrvNameCacheEntries); | 1499 maxSrvNameCacheEntries); |
| 1502 } | 1500 } |
| 1503 } | 1501 } |
| 1504 | 1502 |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 1529 ** then isMultiProcess will already be set. | 1527 ** then isMultiProcess will already be set. |
| 1530 ** If not, we'll set it below. | 1528 ** If not, we'll set it below. |
| 1531 */ | 1529 */ |
| 1532 if (isMultiProcess) { | 1530 if (isMultiProcess) { |
| 1533 if (cache && cache->sharedCache) { | 1531 if (cache && cache->sharedCache) { |
| 1534 cache->sharedCache->everInherited = PR_TRUE; | 1532 cache->sharedCache->everInherited = PR_TRUE; |
| 1535 } | 1533 } |
| 1536 return SECSuccess; /* already done. */ | 1534 return SECSuccess; /* already done. */ |
| 1537 } | 1535 } |
| 1538 | 1536 |
| 1539 ssl_InitSessionCacheLocks(PR_FALSE); | |
| 1540 | |
| 1541 ssl_sid_lookup = ServerSessionIDLookup; | 1537 ssl_sid_lookup = ServerSessionIDLookup; |
| 1542 ssl_sid_cache = ServerSessionIDCache; | 1538 ssl_sid_cache = ServerSessionIDCache; |
| 1543 ssl_sid_uncache = ServerSessionIDUncache; | 1539 ssl_sid_uncache = ServerSessionIDUncache; |
| 1544 | 1540 |
| 1545 if (!envString) { | 1541 if (!envString) { |
| 1546 envString = getenv(envVarName); | 1542 envString = getenv(envVarName); |
| 1547 if (!envString) { | 1543 if (!envString) { |
| 1548 SET_ERROR_CODE | 1544 SET_ERROR_CODE |
| 1549 return SECFailure; | 1545 return SECFailure; |
| 1550 } | 1546 } |
| (...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2228 } | 2224 } |
| 2229 | 2225 |
| 2230 SECStatus | 2226 SECStatus |
| 2231 SSL_SetMaxServerCacheLocks(PRUint32 maxLocks) | 2227 SSL_SetMaxServerCacheLocks(PRUint32 maxLocks) |
| 2232 { | 2228 { |
| 2233 PR_ASSERT(!"SSL servers are not supported on this platform. (SSL_SetMaxServe rCacheLocks)"); | 2229 PR_ASSERT(!"SSL servers are not supported on this platform. (SSL_SetMaxServe rCacheLocks)"); |
| 2234 return SECFailure; | 2230 return SECFailure; |
| 2235 } | 2231 } |
| 2236 | 2232 |
| 2237 #endif /* XP_UNIX || XP_WIN32 */ | 2233 #endif /* XP_UNIX || XP_WIN32 */ |
| OLD | NEW |