comparison src/event/ngx_event_openssl.c @ 2102:ef3f8a5bd143 stable-0.6

r2033 merge: ssl_session_cache none
author Igor Sysoev <igor@sysoev.ru>
date Mon, 07 Jul 2008 11:28:48 +0000
parents 40c9cb8576bb
children f45cec1cd270 297e8aeca6b3
comparison
equal deleted inserted replaced
2101:c80aa2bf4f4b 2102:ef3f8a5bd143
1265 if (builtin_session_cache == NGX_SSL_NO_SCACHE) { 1265 if (builtin_session_cache == NGX_SSL_NO_SCACHE) {
1266 SSL_CTX_set_session_cache_mode(ssl->ctx, SSL_SESS_CACHE_OFF); 1266 SSL_CTX_set_session_cache_mode(ssl->ctx, SSL_SESS_CACHE_OFF);
1267 return NGX_OK; 1267 return NGX_OK;
1268 } 1268 }
1269 1269
1270 if (builtin_session_cache == NGX_SSL_NONE_SCACHE) {
1271
1272 /*
1273 * If the server explicitly says that it does not support
1274 * session reuse (see SSL_SESS_CACHE_OFF above), then
1275 * Outlook Express fails to upload a sent email to
1276 * the Sent Items folder on the IMAP server via a separate IMAP
1277 * connection in the background. Therefore we have a special
1278 * mode (SSL_SESS_CACHE_SERVER|SSL_SESS_CACHE_NO_INTERNAL_STORE)
1279 * where the server pretends that it supports session reuse,
1280 * but it does not actually store any session.
1281 */
1282
1283 SSL_CTX_set_session_cache_mode(ssl->ctx,
1284 SSL_SESS_CACHE_SERVER
1285 |SSL_SESS_CACHE_NO_AUTO_CLEAR
1286 |SSL_SESS_CACHE_NO_INTERNAL_STORE);
1287
1288 SSL_CTX_sess_set_cache_size(ssl->ctx, 1);
1289
1290 return NGX_OK;
1291 }
1292
1270 cache_mode = SSL_SESS_CACHE_SERVER; 1293 cache_mode = SSL_SESS_CACHE_SERVER;
1271 1294
1272 if (shm_zone && builtin_session_cache == NGX_SSL_NO_BUILTIN_SCACHE) { 1295 if (shm_zone && builtin_session_cache == NGX_SSL_NO_BUILTIN_SCACHE) {
1273 cache_mode |= SSL_SESS_CACHE_NO_INTERNAL; 1296 cache_mode |= SSL_SESS_CACHE_NO_INTERNAL;
1274 } 1297 }