ssl_session_cache none
Igor Sysoev
14 years ago
1266 | 1266 |
return NGX_OK;
|
1267 | 1267 |
}
|
1268 | 1268 |
|
|
1269 |
if (builtin_session_cache == NGX_SSL_NONE_SCACHE) {
|
|
1270 |
|
|
1271 |
/*
|
|
1272 |
* If the server explicitly says that it does not support
|
|
1273 |
* session reuse (see SSL_SESS_CACHE_OFF above), then
|
|
1274 |
* Outlook Express fails to upload a sent email to
|
|
1275 |
* the Sent Items folder on the IMAP server via a separate IMAP
|
|
1276 |
* connection in the background. Therefore we have a special
|
|
1277 |
* mode (SSL_SESS_CACHE_SERVER|SSL_SESS_CACHE_NO_INTERNAL_STORE)
|
|
1278 |
* where the server pretends that it supports session reuse,
|
|
1279 |
* but it does not actually store any session.
|
|
1280 |
*/
|
|
1281 |
|
|
1282 |
SSL_CTX_set_session_cache_mode(ssl->ctx,
|
|
1283 |
SSL_SESS_CACHE_SERVER
|
|
1284 |
|SSL_SESS_CACHE_NO_AUTO_CLEAR
|
|
1285 |
|SSL_SESS_CACHE_NO_INTERNAL_STORE);
|
|
1286 |
|
|
1287 |
SSL_CTX_sess_set_cache_size(ssl->ctx, 1);
|
|
1288 |
|
|
1289 |
return NGX_OK;
|
|
1290 |
}
|
|
1291 |
|
1269 | 1292 |
cache_mode = SSL_SESS_CACHE_SERVER;
|
1270 | 1293 |
|
1271 | 1294 |
if (shm_zone && builtin_session_cache == NGX_SSL_NO_BUILTIN_SCACHE) {
|
50 | 50 |
} ngx_ssl_connection_t;
|
51 | 51 |
|
52 | 52 |
|
53 | |
#define NGX_SSL_DFLT_BUILTIN_SCACHE -2
|
54 | |
#define NGX_SSL_NO_BUILTIN_SCACHE -3
|
55 | |
#define NGX_SSL_NO_SCACHE -4
|
|
53 |
#define NGX_SSL_NO_SCACHE -2
|
|
54 |
#define NGX_SSL_NONE_SCACHE -3
|
|
55 |
#define NGX_SSL_NO_BUILTIN_SCACHE -4
|
|
56 |
#define NGX_SSL_DFLT_BUILTIN_SCACHE -5
|
56 | 57 |
|
57 | 58 |
|
58 | 59 |
#define NGX_SSL_MAX_SESSION_SIZE 4096
|
414 | 414 |
}
|
415 | 415 |
|
416 | 416 |
ngx_conf_merge_value(conf->builtin_session_cache,
|
417 | |
prev->builtin_session_cache, NGX_SSL_NO_SCACHE);
|
|
417 |
prev->builtin_session_cache, NGX_SSL_NONE_SCACHE);
|
418 | 418 |
|
419 | 419 |
if (conf->shm_zone == NULL) {
|
420 | 420 |
conf->shm_zone = prev->shm_zone;
|
|
448 | 448 |
|
449 | 449 |
if (ngx_strcmp(value[i].data, "off") == 0) {
|
450 | 450 |
sscf->builtin_session_cache = NGX_SSL_NO_SCACHE;
|
|
451 |
continue;
|
|
452 |
}
|
|
453 |
|
|
454 |
if (ngx_strcmp(value[i].data, "none") == 0) {
|
|
455 |
sscf->builtin_session_cache = NGX_SSL_NONE_SCACHE;
|
451 | 456 |
continue;
|
452 | 457 |
}
|
453 | 458 |
|
260 | 260 |
}
|
261 | 261 |
|
262 | 262 |
ngx_conf_merge_value(conf->builtin_session_cache,
|
263 | |
prev->builtin_session_cache, NGX_SSL_NO_SCACHE);
|
|
263 |
prev->builtin_session_cache, NGX_SSL_NONE_SCACHE);
|
264 | 264 |
|
265 | 265 |
if (conf->shm_zone == NULL) {
|
266 | 266 |
conf->shm_zone = prev->shm_zone;
|
|
294 | 294 |
|
295 | 295 |
if (ngx_strcmp(value[i].data, "off") == 0) {
|
296 | 296 |
scf->builtin_session_cache = NGX_SSL_NO_SCACHE;
|
|
297 |
continue;
|
|
298 |
}
|
|
299 |
|
|
300 |
if (ngx_strcmp(value[i].data, "none") == 0) {
|
|
301 |
scf->builtin_session_cache = NGX_SSL_NONE_SCACHE;
|
297 | 302 |
continue;
|
298 | 303 |
}
|
299 | 304 |
|