Klaus Demo nginx / d6548fa
ssl_session_cache none Igor Sysoev 14 years ago
4 changed file(s) with 39 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
12661266 return NGX_OK;
12671267 }
12681268
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
12691292 cache_mode = SSL_SESS_CACHE_SERVER;
12701293
12711294 if (shm_zone && builtin_session_cache == NGX_SSL_NO_BUILTIN_SCACHE) {
5050 } ngx_ssl_connection_t;
5151
5252
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
5657
5758
5859 #define NGX_SSL_MAX_SESSION_SIZE 4096
414414 }
415415
416416 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);
418418
419419 if (conf->shm_zone == NULL) {
420420 conf->shm_zone = prev->shm_zone;
448448
449449 if (ngx_strcmp(value[i].data, "off") == 0) {
450450 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;
451456 continue;
452457 }
453458
260260 }
261261
262262 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);
264264
265265 if (conf->shm_zone == NULL) {
266266 conf->shm_zone = prev->shm_zone;
294294
295295 if (ngx_strcmp(value[i].data, "off") == 0) {
296296 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;
297302 continue;
298303 }
299304