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>
&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
x509_cert_t **x509
);
+/**
+ * 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.
*
}
}
+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)
}
}
+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