From c04bbdd8ce4a038362be6b95b02fe74758e0552b Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Sat, 7 Apr 2018 16:42:18 +0000 Subject: Revise regress to match tls_keypair_clear() removal. --- regress/lib/libtls/keypair/keypairtest.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/regress/lib/libtls/keypair/keypairtest.c b/regress/lib/libtls/keypair/keypairtest.c index 718dcac8d9e..732464af00e 100644 --- a/regress/lib/libtls/keypair/keypairtest.c +++ b/regress/lib/libtls/keypair/keypairtest.c @@ -1,4 +1,4 @@ -/* $OpenBSD: keypairtest.c,v 1.3 2018/02/14 15:59:50 jsing Exp $ */ +/* $OpenBSD: keypairtest.c,v 1.4 2018/04/07 16:42:17 jsing Exp $ */ /* * Copyright (c) 2018 Joel Sing * @@ -130,28 +130,13 @@ do_keypair_tests(void) goto done; } - tls_keypair_clear(kp); + tls_keypair_clear_key(kp); - if (kp->cert_mem != NULL || kp->cert_len != 0) { - fprintf(stderr, "FAIL: cert not cleared (mem %p, len %zu)", - kp->cert_mem, kp->cert_len); - goto done; - } if (kp->key_mem != NULL || kp->key_len != 0) { fprintf(stderr, "FAIL: key not cleared (mem %p, len %zu)", kp->key_mem, kp->key_len); goto done; } - if (kp->ocsp_staple != NULL || kp->ocsp_staple_len != 0) { - fprintf(stderr, "FAIL: ocsp staple not cleared (mem %p, " - "len %zu)", kp->ocsp_staple, kp->ocsp_staple_len); - goto done; - } - if (kp->pubkey_hash != NULL) { - fprintf(stderr, "FAIL: pubkey hash not cleared (mem %p)\n", - kp->pubkey_hash); - goto done; - } if (tls_keypair_set_cert_mem(kp, &err, cert, cert_len) == -1) { fprintf(stderr, "FAIL: failed to load cert: %s\n", err.msg); @@ -186,7 +171,7 @@ do_keypair_tests(void) goto done; } - tls_keypair_clear(kp); + tls_keypair_clear_key(kp); if (kp->key_mem != NULL || kp->key_len != 0) { fprintf(stderr, "FAIL: key not cleared (mem %p, len %zu)", -- cgit v1.2.3