diff options
-rw-r--r-- | kio/kssl/kopenssl.cc | 7 | ||||
-rw-r--r-- | kio/kssl/kopenssl.h | 5 | ||||
-rw-r--r-- | kio/kssl/ksslcertificate.cc | 6 |
3 files changed, 17 insertions, 1 deletions
diff --git a/kio/kssl/kopenssl.cc b/kio/kssl/kopenssl.cc index 01ca2a062..c6b4dafcf 100644 --- a/kio/kssl/kopenssl.cc +++ b/kio/kssl/kopenssl.cc @@ -80,6 +80,7 @@ static X509_STORE_CTX *(*K_X509_STORE_CTX_new) (void) = 0L; static void (*K_X509_STORE_free) (X509_STORE *) = 0L; static X509_STORE *(*K_X509_STORE_new) (void) = 0L; static void (*K_X509_free) (X509 *) = 0L; +static void (*K_X509_CRL_free) (X509_CRL *) = 0L; static char *(*K_X509_NAME_oneline) (X509_NAME *,char *,int) = 0L; static X509_NAME *(*K_X509_get_subject_name) (X509 *) = 0L; static X509_NAME *(*K_X509_get_issuer_name) (X509 *) = 0L; @@ -396,6 +397,7 @@ KConfig *cfg; if (_cryptoLib) { #ifdef KSSL_HAVE_SSL K_X509_free = (void (*) (X509 *)) GET_CRYPTOLIB_SYMBOL("X509_free"); + K_X509_CRL_free = (void (*) (X509_CRL *)) GET_CRYPTOLIB_SYMBOL("X509_CRL_free"); K_RAND_egd = (int (*)(const char *)) GET_CRYPTOLIB_SYMBOL("RAND_egd"); K_RAND_load_file = (int (*)(const char *, long)) GET_CRYPTOLIB_SYMBOL("RAND_load_file"); K_RAND_file_name = (const char* (*)(char *, size_t)) GET_CRYPTOLIB_SYMBOL("RAND_file_name"); @@ -899,6 +901,11 @@ void KOpenSSLProxy::X509_free(X509 *a) { } +void KOpenSSLProxy::X509_CRL_free(X509_CRL *a) { + if (K_X509_CRL_free) (K_X509_CRL_free)(a); +} + + char *KOpenSSLProxy::X509_NAME_oneline(X509_NAME *a,char *buf,int size) { if (K_X509_NAME_oneline) return (K_X509_NAME_oneline)(a,buf,size); return 0L; diff --git a/kio/kssl/kopenssl.h b/kio/kssl/kopenssl.h index 4dfd4ed6e..4b60a561e 100644 --- a/kio/kssl/kopenssl.h +++ b/kio/kssl/kopenssl.h @@ -360,6 +360,11 @@ public: */ void X509_free(X509 *v); + /* + * X509_CRL_free - free up an X509 CRL + */ + void X509_CRL_free(X509_CRL *v); + /* * X509_NAME_oneline - return the X509 data in a string diff --git a/kio/kssl/ksslcertificate.cc b/kio/kssl/ksslcertificate.cc index 05afec7f3..e4a3fbfb5 100644 --- a/kio/kssl/ksslcertificate.cc +++ b/kio/kssl/ksslcertificate.cc @@ -118,8 +118,12 @@ KSSLCertificate::KSSLCertificate(const KSSLCertificate& x) { KSSLCertificate::~KSSLCertificate() { #ifdef KSSL_HAVE_SSL - if (d->m_cert) + if (d->m_cert) { d->kossl->X509_free(d->m_cert); + } + if (d->m_cert_crl) { + d->kossl->X509_CRL_free(d->m_cert_crl); + } #endif delete d; } |