Commit 8f4570494f4807b8863f72c480077753b6e4fdac
1 parent
65847bff
Exists in
master
and in
3 other branches
Releasing CRL on URL change.
Showing
3 changed files
with
11 additions
and
8 deletions
Show diff stats
src/core/host.c
@@ -39,10 +39,8 @@ | @@ -39,10 +39,8 @@ | ||
39 | 39 | ||
40 | #include <malloc.h> | 40 | #include <malloc.h> |
41 | #include <lib3270-internals.h> | 41 | #include <lib3270-internals.h> |
42 | -// #include "appres.h" | ||
43 | #include "resources.h" | 42 | #include "resources.h" |
44 | 43 | ||
45 | -//#include "actionsc.h" | ||
46 | #include "hostc.h" | 44 | #include "hostc.h" |
47 | #include "statusc.h" | 45 | #include "statusc.h" |
48 | #include "popupsc.h" | 46 | #include "popupsc.h" |
@@ -50,6 +48,7 @@ | @@ -50,6 +48,7 @@ | ||
50 | #include "trace_dsc.h" | 48 | #include "trace_dsc.h" |
51 | #include "utilc.h" | 49 | #include "utilc.h" |
52 | #include "xioc.h" | 50 | #include "xioc.h" |
51 | +#include "../ssl/crl.h" | ||
53 | 52 | ||
54 | #include <errno.h> | 53 | #include <errno.h> |
55 | #include <lib3270/internals.h> | 54 | #include <lib3270/internals.h> |
@@ -233,6 +232,10 @@ static void update_url(H3270 *hSession) | @@ -233,6 +232,10 @@ static void update_url(H3270 *hSession) | ||
233 | hSession->host.srvc | 232 | hSession->host.srvc |
234 | )); | 233 | )); |
235 | 234 | ||
235 | +#ifdef SSL_ENABLE_CRL_CHECK | ||
236 | + lib3270_crl_free(hSession); | ||
237 | +#endif // SSL_ENABLE_CRL_CHECK | ||
238 | + | ||
236 | hSession->cbk.update_url(hSession, hSession->host.full); | 239 | hSession->cbk.update_url(hSession, hSession->host.full); |
237 | 240 | ||
238 | } | 241 | } |
src/core/session.c
@@ -77,12 +77,6 @@ void lib3270_session_free(H3270 *h) | @@ -77,12 +77,6 @@ void lib3270_session_free(H3270 *h) | ||
77 | shutdown_toggles(h); | 77 | shutdown_toggles(h); |
78 | 78 | ||
79 | #ifdef SSL_ENABLE_CRL_CHECK | 79 | #ifdef SSL_ENABLE_CRL_CHECK |
80 | - if(h->ssl.crl.url) | ||
81 | - { | ||
82 | - free(h->ssl.crl.url); | ||
83 | - h->ssl.crl.url = NULL; | ||
84 | - } | ||
85 | - | ||
86 | if(h->ssl.crl.prefer) | 80 | if(h->ssl.crl.prefer) |
87 | { | 81 | { |
88 | free(h->ssl.crl.prefer); | 82 | free(h->ssl.crl.prefer); |
src/ssl/crl.c
@@ -50,6 +50,12 @@ void lib3270_crl_free(H3270 *hSession) | @@ -50,6 +50,12 @@ void lib3270_crl_free(H3270 *hSession) | ||
50 | hSession->ssl.crl.cert = NULL; | 50 | hSession->ssl.crl.cert = NULL; |
51 | } | 51 | } |
52 | 52 | ||
53 | + if(hSession->ssl.crl.url) | ||
54 | + { | ||
55 | + free(hSession->ssl.crl.url); | ||
56 | + hSession->ssl.crl.url = NULL; | ||
57 | + } | ||
58 | + | ||
53 | } | 59 | } |
54 | 60 | ||
55 | void lib3270_crl_free_if_expired(H3270 *hSession) | 61 | void lib3270_crl_free_if_expired(H3270 *hSession) |