diff options
author | jsing <> | 2014-09-28 14:46:09 +0000 |
---|---|---|
committer | jsing <> | 2014-09-28 14:46:09 +0000 |
commit | 4b6b49a2bf85ce2576ea3bcd9bb8691e98cf8d50 (patch) | |
tree | c19a367d66c10510ce965c471b0414d1ccfc0373 /src/lib/libressl/ressl_config.c | |
parent | 86dd9a4f816c164cfa45e157991a16f15badb4a3 (diff) | |
download | openbsd-4b6b49a2bf85ce2576ea3bcd9bb8691e98cf8d50.tar.gz openbsd-4b6b49a2bf85ce2576ea3bcd9bb8691e98cf8d50.tar.bz2 openbsd-4b6b49a2bf85ce2576ea3bcd9bb8691e98cf8d50.zip |
Provide a ressl config function that explicitly clears keys.
Now that ressl config takes copies of the keys passed to it, the keys need
to be explicitly cleared. While this can be done by calling the appropriate
functions with a NULL pointer, it is simpler and more obvious to call one
function that does this for you.
ok tedu@
Diffstat (limited to '')
-rw-r--r-- | src/lib/libressl/ressl_config.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/libressl/ressl_config.c b/src/lib/libressl/ressl_config.c index 5deb8d187f..319bba330d 100644 --- a/src/lib/libressl/ressl_config.c +++ b/src/lib/libressl/ressl_config.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ressl_config.c,v 1.9 2014/09/28 06:24:00 tedu Exp $ */ | 1 | /* $OpenBSD: ressl_config.c,v 1.10 2014/09/28 14:46:09 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -97,6 +97,13 @@ ressl_config_free(struct ressl_config *config) | |||
97 | free(config); | 97 | free(config); |
98 | } | 98 | } |
99 | 99 | ||
100 | void | ||
101 | ressl_config_clear_keys(struct ressl_config *config) | ||
102 | { | ||
103 | ressl_config_set_cert_mem(config, NULL, 0); | ||
104 | ressl_config_set_key_mem(config, NULL, 0); | ||
105 | } | ||
106 | |||
100 | int | 107 | int |
101 | ressl_config_set_ca_file(struct ressl_config *config, const char *ca_file) | 108 | ressl_config_set_ca_file(struct ressl_config *config, const char *ca_file) |
102 | { | 109 | { |