diff --git a/src/core/host.c b/src/core/host.c index 630b110..da24055 100644 --- a/src/core/host.c +++ b/src/core/host.c @@ -39,10 +39,8 @@ #include #include -// #include "appres.h" #include "resources.h" -//#include "actionsc.h" #include "hostc.h" #include "statusc.h" #include "popupsc.h" @@ -50,6 +48,7 @@ #include "trace_dsc.h" #include "utilc.h" #include "xioc.h" +#include "../ssl/crl.h" #include #include @@ -233,6 +232,10 @@ static void update_url(H3270 *hSession) hSession->host.srvc )); +#ifdef SSL_ENABLE_CRL_CHECK + lib3270_crl_free(hSession); +#endif // SSL_ENABLE_CRL_CHECK + hSession->cbk.update_url(hSession, hSession->host.full); } diff --git a/src/core/session.c b/src/core/session.c index 6cecd78..04c09eb 100644 --- a/src/core/session.c +++ b/src/core/session.c @@ -77,12 +77,6 @@ void lib3270_session_free(H3270 *h) shutdown_toggles(h); #ifdef SSL_ENABLE_CRL_CHECK - if(h->ssl.crl.url) - { - free(h->ssl.crl.url); - h->ssl.crl.url = NULL; - } - if(h->ssl.crl.prefer) { free(h->ssl.crl.prefer); diff --git a/src/ssl/crl.c b/src/ssl/crl.c index 920a3e5..46f49c2 100644 --- a/src/ssl/crl.c +++ b/src/ssl/crl.c @@ -50,6 +50,12 @@ void lib3270_crl_free(H3270 *hSession) hSession->ssl.crl.cert = NULL; } + if(hSession->ssl.crl.url) + { + free(hSession->ssl.crl.url); + hSession->ssl.crl.url = NULL; + } + } void lib3270_crl_free_if_expired(H3270 *hSession) -- libgit2 0.21.2