return;
}
- if (!conf->session_cache_path) {
- DEBUG(LOG_PREFIX ": Failed to find 'persist_dir' in TLS configuration. Cannot remove any cached session.");
- return;
- }
-
{
int rv;
char filename[256];
return 0;
}
- if (!conf->session_cache_path) {
- RDEBUG("Failed to find 'persist_dir' in TLS configuration. Session will not be cached on disk.");
- return 0;
- }
-
size = sess->session_id_length;
if (size > MAX_SESSION_SIZE) size = MAX_SESSION_SIZE;
conf->session_cache_path, FR_DIR_SEP, buffer);
fd = open(filename, O_RDWR|O_CREAT|O_EXCL, 0600);
if (fd < 0) {
- RWDEBUG("Session serialisation failed, failed opening session file %s: %s",
- filename, fr_syserror(errno));
+ RERROR("Session serialisation failed, failed opening session file %s: %s",
+ filename, fr_syserror(errno));
goto error;
}
return NULL;
}
- if (!conf->session_cache_path) {
- RDEBUG("Failed to find 'persist_dir' in TLS configuration. Session was not cached on disk.");
- return NULL;
- }
-
talloc_ctx = SSL_get_ex_data(ssl, FR_TLS_EX_INDEX_TALLOC);
{
* Callbacks, etc. for session resumption.
*/
if (conf->session_cache_enable) {
- SSL_CTX_sess_set_new_cb(ctx, cbtls_new_session);
- SSL_CTX_sess_set_get_cb(ctx, cbtls_get_session);
- SSL_CTX_sess_set_remove_cb(ctx, cbtls_remove_session);
+ /*
+ * Cache sessions on disk if requested.
+ */
+ if (conf->session_cache_path) {
+ SSL_CTX_sess_set_new_cb(ctx, cbtls_new_session);
+ SSL_CTX_sess_set_get_cb(ctx, cbtls_get_session);
+ SSL_CTX_sess_set_remove_cb(ctx, cbtls_remove_session);
+ }
SSL_CTX_set_quiet_shutdown(ctx, 1);
if (fr_tls_ex_index_vps < 0)