Klaus Demo nginx / 6ff850b
ssl_session_cache off Igor Sysoev 14 years ago
4 changed file(s) with 21 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
11721172 ssize_t builtin_session_cache, ngx_shm_zone_t *shm_zone, time_t timeout)
11731173 {
11741174 long cache_mode;
1175
1176 if (builtin_session_cache == NGX_SSL_NO_SCACHE) {
1177 SSL_CTX_set_session_cache_mode(ssl->ctx, SSL_SESS_CACHE_OFF);
1178 return NGX_OK;
1179 }
11751180
11761181 cache_mode = SSL_SESS_CACHE_SERVER;
11771182
5252
5353 #define NGX_SSL_DFLT_BUILTIN_SCACHE -2
5454 #define NGX_SSL_NO_BUILTIN_SCACHE -3
55 #define NGX_SSL_NO_SCACHE -4
5556
5657
57 #define NGX_SSL_MAX_SESSION_SIZE (4096)
58 #define NGX_SSL_MAX_SESSION_SIZE 4096
5859
5960 typedef struct ngx_ssl_sess_id_s ngx_ssl_sess_id_t;
6061
414414 }
415415
416416 ngx_conf_merge_value(conf->builtin_session_cache,
417 prev->builtin_session_cache,
418 NGX_SSL_DFLT_BUILTIN_SCACHE);
417 prev->builtin_session_cache, NGX_SSL_NO_SCACHE);
419418
420419 if (conf->shm_zone == NULL) {
421420 conf->shm_zone = prev->shm_zone;
446445 value = cf->args->elts;
447446
448447 for (i = 1; i < cf->args->nelts; i++) {
448
449 if (ngx_strcmp(value[i].data, "off") == 0) {
450 sscf->builtin_session_cache = NGX_SSL_NO_SCACHE;
451 continue;
452 }
449453
450454 if (ngx_strcmp(value[i].data, "builtin") == 0) {
451455 sscf->builtin_session_cache = NGX_SSL_DFLT_BUILTIN_SCACHE;
207207 |NGX_SSL_SSLv2|NGX_SSL_SSLv3|NGX_SSL_TLSv1));
208208
209209 ngx_conf_merge_str_value(conf->certificate, prev->certificate,
210 NGX_DEFLAUT_CERTIFICATE);
210 NGX_DEFLAUT_CERTIFICATE);
211211
212212 ngx_conf_merge_str_value(conf->certificate_key, prev->certificate_key,
213 NGX_DEFLAUT_CERTIFICATE_KEY);
213 NGX_DEFLAUT_CERTIFICATE_KEY);
214214
215215 ngx_conf_merge_str_value(conf->ciphers, prev->ciphers, NGX_DEFLAUT_CIPHERS);
216216
260260 }
261261
262262 ngx_conf_merge_value(conf->builtin_session_cache,
263 prev->builtin_session_cache,
264 NGX_SSL_DFLT_BUILTIN_SCACHE);
263 prev->builtin_session_cache, NGX_SSL_NO_SCACHE);
265264
266265 if (conf->shm_zone == NULL) {
267266 conf->shm_zone = prev->shm_zone;
292291 value = cf->args->elts;
293292
294293 for (i = 1; i < cf->args->nelts; i++) {
294
295 if (ngx_strcmp(value[i].data, "off") == 0) {
296 scf->builtin_session_cache = NGX_SSL_NO_SCACHE;
297 continue;
298 }
295299
296300 if (ngx_strcmp(value[i].data, "builtin") == 0) {
297301 scf->builtin_session_cache = NGX_SSL_DFLT_BUILTIN_SCACHE;