diff options
| author | jsing <> | 2018-04-18 16:29:11 +0000 |
|---|---|---|
| committer | jsing <> | 2018-04-18 16:29:11 +0000 |
| commit | 1f2eb700ae7e3c6771d21629af14f1956a6238a3 (patch) | |
| tree | 44affb5a07039f42624d1d901698b321dff47315 /src/lib/libtls/tls_config.c | |
| parent | 748fecf73080b1ad39249f3c231e1b61c181d50e (diff) | |
| download | openbsd-1f2eb700ae7e3c6771d21629af14f1956a6238a3.tar.gz openbsd-1f2eb700ae7e3c6771d21629af14f1956a6238a3.tar.bz2 openbsd-1f2eb700ae7e3c6771d21629af14f1956a6238a3.zip | |
Limit tls_config_clear_keys() to only clearing private keys.
This was inadvertently clearing the keypair, which includes the OCSP staple
and pubkey hash - if an application called tls_configure() followed by
tls_config_clear_keys(), this would prevent OCSP staples from working.
ok beck@
Diffstat (limited to 'src/lib/libtls/tls_config.c')
| -rw-r--r-- | src/lib/libtls/tls_config.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/lib/libtls/tls_config.c b/src/lib/libtls/tls_config.c index d32176fe6e..6094c74265 100644 --- a/src/lib/libtls/tls_config.c +++ b/src/lib/libtls/tls_config.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: tls_config.c,v 1.51 2018/03/20 15:40:10 jsing Exp $ */ | 1 | /* $OpenBSD: tls_config.c,v 1.51.2.1 2018/04/18 16:29:11 jsing Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -189,10 +189,7 @@ tls_config_clear_keys(struct tls_config *config) | |||
| 189 | struct tls_keypair *kp; | 189 | struct tls_keypair *kp; |
| 190 | 190 | ||
| 191 | for (kp = config->keypair; kp != NULL; kp = kp->next) | 191 | for (kp = config->keypair; kp != NULL; kp = kp->next) |
| 192 | tls_keypair_clear(kp); | 192 | tls_keypair_clear_key(kp); |
| 193 | |||
| 194 | tls_config_set_ca_mem(config, NULL, 0); | ||
| 195 | tls_config_set_crl_mem(config, NULL, 0); | ||
| 196 | } | 193 | } |
| 197 | 194 | ||
| 198 | int | 195 | int |
