From: Phil Mayers
Date: Tue, 25 Oct 2011 11:49:10 +0000 (+0100)
Subject: use correct length for session_context_id and write a shorter value, to fit into it
X-Git-Tag: release_2_2_0~279^2
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F29%2Fhead;p=thirdparty%2Ffreeradius-server.git
use correct length for session_context_id and write a shorter value, to fit into it
---
diff --git a/src/modules/rlm_eap/types/rlm_eap_tls/rlm_eap_tls.c b/src/modules/rlm_eap/types/rlm_eap_tls/rlm_eap_tls.c
index 77e994aeced..dc1cbb2faaf 100644
--- a/src/modules/rlm_eap/types/rlm_eap_tls/rlm_eap_tls.c
+++ b/src/modules/rlm_eap/types/rlm_eap_tls/rlm_eap_tls.c
@@ -1066,12 +1066,12 @@ static SSL_CTX *init_tls_ctx(EAP_TLS_CONF *conf)
if (conf->session_id_name) {
snprintf(conf->session_context_id,
sizeof(conf->session_context_id),
- "FreeRADIUS EAP-TLS %s",
+ "FR eap %s",
conf->session_id_name);
} else {
snprintf(conf->session_context_id,
sizeof(conf->session_context_id),
- "FreeRADIUS EAP-TLS %p", conf);
+ "FR eap %p", conf);
}
/*
diff --git a/src/modules/rlm_eap/types/rlm_eap_tls/rlm_eap_tls.h b/src/modules/rlm_eap/types/rlm_eap_tls/rlm_eap_tls.h
index ed22712c001..d60b1b667ed 100644
--- a/src/modules/rlm_eap/types/rlm_eap_tls/rlm_eap_tls.h
+++ b/src/modules/rlm_eap/types/rlm_eap_tls/rlm_eap_tls.h
@@ -65,7 +65,7 @@ typedef struct eap_tls_conf {
int session_timeout;
int session_cache_size;
char *session_id_name;
- char session_context_id[128];
+ char session_context_id[SSL_MAX_SSL_SESSION_ID_LENGTH];
time_t session_last_flushed;
char *verify_tmp_dir;