]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Ensure that cached SSL sessions have data
authorAlan T. DeKok <aland@freeradius.org>
Thu, 24 Sep 2009 15:12:33 +0000 (17:12 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 24 Sep 2009 15:12:33 +0000 (17:12 +0200)
src/modules/rlm_eap/libeap/eap_tls.c

index 73e027b9a0de40281ba0ca9d2221d57035cd3cfe..2452f6b8b46395c81cafc2a2a36388f32a15d974 100644 (file)
@@ -156,6 +156,10 @@ int eaptls_success(EAP_HANDLER *handler, int peap_flag)
                if (vps) {
                        SSL_SESSION_set_ex_data(tls_session->ssl->session,
                                                eaptls_session_idx, vps);
+               } else {
+                       RDEBUG2("WARNING: No information to cache: session caching will be disabled for this session.");
+                       SSL_CTX_remove_session(tls_session->ctx,
+                                              tls_session->ssl->session);
                }
 
                /*
@@ -168,6 +172,7 @@ int eaptls_success(EAP_HANDLER *handler, int peap_flag)
                                             eaptls_session_idx);
                if (!vp) {
                        RDEBUG("WARNING: No information in cached session!");
+                       return eaptls_fail(handler, peap_flag);
                } else {
                        RDEBUG("Adding cached attributes to the reply:");
                        debug_pair_list(vp);