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>
... | ... |
@@ -197,6 +197,13 @@ void tls_ctx_load_cert_file (struct tls_root_ctx *ctx, const char *cert_file, |
197 | 197 |
); |
198 | 198 |
|
199 | 199 |
/** |
200 |
+ * Free the given certificate |
|
201 |
+ * |
|
202 |
+ * @param x509 certificate to free |
|
203 |
+ */ |
|
204 |
+void tls_ctx_free_cert_file (x509_cert_t *x509); |
|
205 |
+ |
|
206 |
+/** |
|
200 | 207 |
* Load private key file into the given TLS context. |
201 | 208 |
* |
202 | 209 |
* @param ctx TLS context to use |
... | ... |
@@ -431,6 +431,12 @@ tls_ctx_load_cert_file (struct tls_root_ctx *ctx, const char *cert_file, |
431 | 431 |
} |
432 | 432 |
} |
433 | 433 |
|
434 |
+void |
|
435 |
+tls_ctx_free_cert_file (X509 *x509) |
|
436 |
+{ |
|
437 |
+ X509_free(x509); |
|
438 |
+} |
|
439 |
+ |
|
434 | 440 |
#if ENABLE_INLINE_FILES |
435 | 441 |
static int |
436 | 442 |
use_inline_PrivateKey_file (SSL_CTX *ctx, const char *key_string) |
... | ... |
@@ -262,6 +262,12 @@ tls_ctx_load_cert_file (struct tls_root_ctx *ctx, const char *cert_file, |
262 | 262 |
} |
263 | 263 |
} |
264 | 264 |
|
265 |
+void |
|
266 |
+tls_ctx_free_cert_file (x509_cert_t *x509) |
|
267 |
+{ |
|
268 |
+ x509_free(x509); |
|
269 |
+} |
|
270 |
+ |
|
265 | 271 |
int |
266 | 272 |
tls_ctx_load_priv_file (struct tls_root_ctx *ctx, const char *priv_key_file |
267 | 273 |
#if ENABLE_INLINE_FILES |