]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Fix ordering issue
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 25 Jun 2021 13:36:50 +0000 (08:36 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Fri, 25 Jun 2021 13:36:50 +0000 (08:36 -0500)
src/lib/tls/cache.c

index c49e350f151e385af00f94fd5398296fae4848ce..d47cfa2475d2108648732f63b989b29ebde0693e 100644 (file)
@@ -625,12 +625,6 @@ static int tls_cache_store_cb(SSL *ssl, SSL_SESSION *sess)
        unsigned int            id_len;
        uint8_t const           *id;
 
-       /*
-        *      Request was cancelled, just get OpenSSL to
-        *      free the session data, and don't do any work.
-        */
-       if (unlang_request_is_cancelled(request)) return 0;
-
        /*
         *      This functions should only be called once during the lifetime
         *      of the tls_session, as the fields aren't re-populated on
@@ -640,6 +634,12 @@ static int tls_cache_store_cb(SSL *ssl, SSL_SESSION *sess)
        request = fr_tls_session_request(tls_session->ssl);
        tls_cache = tls_session->cache;
 
+       /*
+        *      Request was cancelled, just get OpenSSL to
+        *      free the session data, and don't do any work.
+        */
+       if (unlang_request_is_cancelled(request)) return 0;
+
        id = SSL_SESSION_get_id(sess, &id_len);
        RDEBUG3("Requested session store - ID %pV", fr_box_octets(id, id_len));
        /*