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_keypair.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 '')
| -rw-r--r-- | src/lib/libtls/tls_keypair.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libtls/tls_keypair.c b/src/lib/libtls/tls_keypair.c index 03e7f4ad76..64048cf6a2 100644 --- a/src/lib/libtls/tls_keypair.c +++ b/src/lib/libtls/tls_keypair.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: tls_keypair.c,v 1.5 2018/02/10 04:57:35 jsing Exp $ */ | 1 | /* $OpenBSD: tls_keypair.c,v 1.5.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 | * |
| @@ -29,7 +29,7 @@ tls_keypair_new(void) | |||
| 29 | return calloc(1, sizeof(struct tls_keypair)); | 29 | return calloc(1, sizeof(struct tls_keypair)); |
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | static void | 32 | void |
| 33 | tls_keypair_clear_key(struct tls_keypair *keypair) | 33 | tls_keypair_clear_key(struct tls_keypair *keypair) |
| 34 | { | 34 | { |
| 35 | freezero(keypair->key_mem, keypair->key_len); | 35 | freezero(keypair->key_mem, keypair->key_len); |
