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 * This Source Code Form is subject to the terms of the Mozilla Public | 4 * This Source Code Form is subject to the terms of the Mozilla Public |
5 * License, v. 2.0. If a copy of the MPL was not distributed with this | 5 * License, v. 2.0. If a copy of the MPL was not distributed with this |
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ | 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
7 | 7 |
8 /* Note: ssl_FreeSID() in sslnonce.c gets used for both client and server | 8 /* Note: ssl_FreeSID() in sslnonce.c gets used for both client and server |
9 * cache sids! | 9 * cache sids! |
10 * | 10 * |
(...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1346 maxCacheEntries, | 1346 maxCacheEntries, |
1347 -1, -1); | 1347 -1, -1); |
1348 } | 1348 } |
1349 | 1349 |
1350 SECStatus | 1350 SECStatus |
1351 SSL_ConfigServerSessionIDCache( int maxCacheEntries, | 1351 SSL_ConfigServerSessionIDCache( int maxCacheEntries, |
1352 PRUint32 ssl2_timeout, | 1352 PRUint32 ssl2_timeout, |
1353 PRUint32 ssl3_timeout, | 1353 PRUint32 ssl3_timeout, |
1354 const char * directory) | 1354 const char * directory) |
1355 { | 1355 { |
1356 ssl_InitSessionCacheLocks(PR_FALSE); | 1356 ssl_InitSessionCacheLocks(); |
1357 return SSL_ConfigServerSessionIDCacheInstance(&globalCache, | 1357 return SSL_ConfigServerSessionIDCacheInstance(&globalCache, |
1358 maxCacheEntries, ssl2_timeout, ssl3_timeout, directory, PR_FALSE
); | 1358 maxCacheEntries, ssl2_timeout, ssl3_timeout, directory, PR_FALSE
); |
1359 } | 1359 } |
1360 | 1360 |
1361 SECStatus | 1361 SECStatus |
1362 SSL_ShutdownServerSessionIDCacheInstance(cacheDesc *cache) | 1362 SSL_ShutdownServerSessionIDCacheInstance(cacheDesc *cache) |
1363 { | 1363 { |
1364 CloseCache(cache); | 1364 CloseCache(cache); |
1365 return SECSuccess; | 1365 return SECSuccess; |
1366 } | 1366 } |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1460 SSL_ConfigServerSessionIDCacheWithOpt( | 1460 SSL_ConfigServerSessionIDCacheWithOpt( |
1461 PRUint32 ssl2_timeout, | 1461 PRUint32 ssl2_timeout, |
1462 PRUint32 ssl3_timeout, | 1462 PRUint32 ssl3_timeout, |
1463 const char * directory, | 1463 const char * directory, |
1464 int maxCacheEntries, | 1464 int maxCacheEntries, |
1465 int maxCertCacheEntries, | 1465 int maxCertCacheEntries, |
1466 int maxSrvNameCacheEntries, | 1466 int maxSrvNameCacheEntries, |
1467 PRBool enableMPCache) | 1467 PRBool enableMPCache) |
1468 { | 1468 { |
1469 if (!enableMPCache) { | 1469 if (!enableMPCache) { |
1470 ssl_InitSessionCacheLocks(PR_FALSE); | 1470 ssl_InitSessionCacheLocks(); |
1471 return ssl_ConfigServerSessionIDCacheInstanceWithOpt(&globalCache, | 1471 return ssl_ConfigServerSessionIDCacheInstanceWithOpt(&globalCache, |
1472 ssl2_timeout, ssl3_timeout, directory, PR_FALSE, | 1472 ssl2_timeout, ssl3_timeout, directory, PR_FALSE, |
1473 maxCacheEntries, maxCertCacheEntries, maxSrvNameCacheEntries); | 1473 maxCacheEntries, maxCertCacheEntries, maxSrvNameCacheEntries); |
1474 } else { | 1474 } else { |
1475 return ssl_ConfigMPServerSIDCacheWithOpt(ssl2_timeout, ssl3_timeout, | 1475 return ssl_ConfigMPServerSIDCacheWithOpt(ssl2_timeout, ssl3_timeout, |
1476 directory, maxCacheEntries, maxCertCacheEntries, | 1476 directory, maxCacheEntries, maxCertCacheEntries, |
1477 maxSrvNameCacheEntries); | 1477 maxSrvNameCacheEntries); |
1478 } | 1478 } |
1479 } | 1479 } |
1480 | 1480 |
(...skipping 24 matching lines...) Expand all Loading... |
1505 ** then isMultiProcess will already be set. | 1505 ** then isMultiProcess will already be set. |
1506 ** If not, we'll set it below. | 1506 ** If not, we'll set it below. |
1507 */ | 1507 */ |
1508 if (isMultiProcess) { | 1508 if (isMultiProcess) { |
1509 if (cache && cache->sharedCache) { | 1509 if (cache && cache->sharedCache) { |
1510 cache->sharedCache->everInherited = PR_TRUE; | 1510 cache->sharedCache->everInherited = PR_TRUE; |
1511 } | 1511 } |
1512 return SECSuccess; /* already done. */ | 1512 return SECSuccess; /* already done. */ |
1513 } | 1513 } |
1514 | 1514 |
1515 ssl_InitSessionCacheLocks(PR_FALSE); | 1515 ssl_InitSessionCacheLocks(); |
1516 | 1516 |
1517 ssl_sid_lookup = ServerSessionIDLookup; | 1517 ssl_sid_lookup = ServerSessionIDLookup; |
1518 ssl_sid_cache = ServerSessionIDCache; | 1518 ssl_sid_cache = ServerSessionIDCache; |
1519 ssl_sid_uncache = ServerSessionIDUncache; | 1519 ssl_sid_uncache = ServerSessionIDUncache; |
1520 | 1520 |
1521 if (!envString) { | 1521 if (!envString) { |
1522 envString = getenv(envVarName); | 1522 envString = getenv(envVarName); |
1523 if (!envString) { | 1523 if (!envString) { |
1524 SET_ERROR_CODE | 1524 SET_ERROR_CODE |
1525 return SECFailure; | 1525 return SECFailure; |
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2204 } | 2204 } |
2205 | 2205 |
2206 SECStatus | 2206 SECStatus |
2207 SSL_SetMaxServerCacheLocks(PRUint32 maxLocks) | 2207 SSL_SetMaxServerCacheLocks(PRUint32 maxLocks) |
2208 { | 2208 { |
2209 PR_ASSERT(!"SSL servers are not supported on this platform. (SSL_SetMaxServe
rCacheLocks)"); | 2209 PR_ASSERT(!"SSL servers are not supported on this platform. (SSL_SetMaxServe
rCacheLocks)"); |
2210 return SECFailure; | 2210 return SECFailure; |
2211 } | 2211 } |
2212 | 2212 |
2213 #endif /* XP_UNIX || XP_WIN32 */ | 2213 #endif /* XP_UNIX || XP_WIN32 */ |
OLD | NEW |