diff options
author | Adriaan de Jong <dejong@fox-it.com> | 2011-07-05 11:41:14 +0200 |
---|---|---|
committer | David Sommerseth <davids@redhat.com> | 2011-10-22 16:00:49 +0200 |
commit | 477127061a22e6e998755c657873aa1b212ea59a (patch) | |
tree | dc48a674444676e5b2e9e553c5fd8e2aef02d2a4 | |
parent | 5fa82c550f8160bb8dd107bc5f3d516ba996dd6d (diff) | |
download | openvpn-477127061a22e6e998755c657873aa1b212ea59a.tar.gz openvpn-477127061a22e6e998755c657873aa1b212ea59a.tar.xz openvpn-477127061a22e6e998755c657873aa1b212ea59a.zip |
Removed stray X509_free from ssl.c
Signed-off-by: Adriaan de Jong <dejong@fox-it.com>
Acked-by: James Yonan <james@openvpn.net>
Signed-off-by: David Sommerseth <davids@redhat.com>
-rw-r--r-- | ssl.c | 2 | ||||
-rw-r--r-- | ssl_backend.h | 7 | ||||
-rw-r--r-- | ssl_openssl.c | 6 | ||||
-rw-r--r-- | ssl_polarssl.c | 6 |
4 files changed, 20 insertions, 1 deletions
@@ -350,7 +350,7 @@ init_ssl (const struct options *options, struct tls_root_ctx *new_ctx) &my_cert); tls_ctx_use_external_private_key(new_ctx, my_cert); - X509_free(my_cert); + tls_ctx_free_cert_file(my_cert); } #endif else diff --git a/ssl_backend.h b/ssl_backend.h index b67421c..243c9e3 100644 --- a/ssl_backend.h +++ b/ssl_backend.h @@ -197,6 +197,13 @@ void tls_ctx_load_cert_file (struct tls_root_ctx *ctx, const char *cert_file, ); /** + * Free the given certificate + * + * @param x509 certificate to free + */ +void tls_ctx_free_cert_file (x509_cert_t *x509); + +/** * Load private key file into the given TLS context. * * @param ctx TLS context to use diff --git a/ssl_openssl.c b/ssl_openssl.c index f36b319..ebea636 100644 --- a/ssl_openssl.c +++ b/ssl_openssl.c @@ -431,6 +431,12 @@ tls_ctx_load_cert_file (struct tls_root_ctx *ctx, const char *cert_file, } } +void +tls_ctx_free_cert_file (X509 *x509) +{ + X509_free(x509); +} + #if ENABLE_INLINE_FILES static int use_inline_PrivateKey_file (SSL_CTX *ctx, const char *key_string) diff --git a/ssl_polarssl.c b/ssl_polarssl.c index 2731081..128e75d 100644 --- a/ssl_polarssl.c +++ b/ssl_polarssl.c @@ -262,6 +262,12 @@ tls_ctx_load_cert_file (struct tls_root_ctx *ctx, const char *cert_file, } } +void +tls_ctx_free_cert_file (x509_cert_t *x509) +{ + x509_free(x509); +} + int tls_ctx_load_priv_file (struct tls_root_ctx *ctx, const char *priv_key_file #if ENABLE_INLINE_FILES |