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 | 39 | |
40 | 40 | #include <malloc.h> |
41 | 41 | #include <lib3270-internals.h> |
42 | -// #include "appres.h" | |
43 | 42 | #include "resources.h" |
44 | 43 | |
45 | -//#include "actionsc.h" | |
46 | 44 | #include "hostc.h" |
47 | 45 | #include "statusc.h" |
48 | 46 | #include "popupsc.h" |
... | ... | @@ -50,6 +48,7 @@ |
50 | 48 | #include "trace_dsc.h" |
51 | 49 | #include "utilc.h" |
52 | 50 | #include "xioc.h" |
51 | +#include "../ssl/crl.h" | |
53 | 52 | |
54 | 53 | #include <errno.h> |
55 | 54 | #include <lib3270/internals.h> |
... | ... | @@ -233,6 +232,10 @@ static void update_url(H3270 *hSession) |
233 | 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 | 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 | 77 | shutdown_toggles(h); |
78 | 78 | |
79 | 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 | 80 | if(h->ssl.crl.prefer) |
87 | 81 | { |
88 | 82 | free(h->ssl.crl.prefer); | ... | ... |
src/ssl/crl.c
... | ... | @@ -50,6 +50,12 @@ void lib3270_crl_free(H3270 *hSession) |
50 | 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 | 61 | void lib3270_crl_free_if_expired(H3270 *hSession) | ... | ... |