From 84f302f7e1bbcbf9535f17604779db5ac75e8e96 Mon Sep 17 00:00:00 2001 From: tb Date: Wed, 12 Jan 2022 08:58:12 +0000 Subject: [PATCH] Rework dhtest to use accessors and link statically for now For some reason CVS didn't want to commit this the first time around. --- regress/lib/libcrypto/dh/dhtest.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/regress/lib/libcrypto/dh/dhtest.c b/regress/lib/libcrypto/dh/dhtest.c index 0b2cb741fc0..ee06259dce1 100644 --- a/regress/lib/libcrypto/dh/dhtest.c +++ b/regress/lib/libcrypto/dh/dhtest.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhtest.c,v 1.6 2021/11/18 15:07:28 tb Exp $ */ +/* $OpenBSD: dhtest.c,v 1.7 2022/01/12 08:58:12 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -129,23 +129,23 @@ main(int argc, char *argv[]) BIO_puts(out, "the g value is not a generator\n"); BIO_puts(out, "\np ="); - BN_print(out, a->p); + BN_print(out, DH_get0_p(a)); BIO_puts(out, "\ng ="); - BN_print(out, a->g); + BN_print(out, DH_get0_g(a)); BIO_puts(out, "\n"); if (!DH_generate_key(a)) goto err; BIO_puts(out, "pri 1="); - BN_print(out, a->priv_key); + BN_print(out, DH_get0_priv_key(a)); BIO_puts(out, "\npub 1="); - BN_print(out, a->pub_key); + BN_print(out, DH_get0_pub_key(a)); BIO_puts(out, "\n"); alen = DH_size(a); if ((abuf = malloc(alen)) == NULL) err(1, "malloc"); - aout = DH_compute_key(abuf, a->pub_key, a); + aout = DH_compute_key(abuf, DH_get0_pub_key(a), a); BIO_puts(out, "key1 ="); for (i=0; i