From 386a8f7d76de422ca70a037bb754e818d99f9c75 Mon Sep 17 00:00:00 2001 From: tb Date: Wed, 12 Jan 2022 08:59:56 +0000 Subject: [PATCH] Rework dsatest to use accessors and link statically for now --- regress/lib/libcrypto/dsa/Makefile | 6 +++--- regress/lib/libcrypto/dsa/dsatest.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/regress/lib/libcrypto/dsa/Makefile b/regress/lib/libcrypto/dsa/Makefile index 0574c6e2822..489c2225d2c 100644 --- a/regress/lib/libcrypto/dsa/Makefile +++ b/regress/lib/libcrypto/dsa/Makefile @@ -1,10 +1,10 @@ -# $OpenBSD: Makefile,v 1.3 2014/07/08 15:53:52 jsing Exp $ +# $OpenBSD: Makefile,v 1.4 2022/01/12 08:59:56 tb Exp $ PROG= dsatest -LDADD= -lcrypto +LDADD= ${CRYPTO_INT} # XXX link dynamically after bump DPADD= ${LIBCRYPTO} WARNINGS= Yes -CFLAGS+= -DLIBRESSL_INTERNAL -Werror +CFLAGS+= -DLIBRESSL_INTERNAL -DLIBRESSL_CRYPTO_INTERNAL -Werror REGRESS_TARGETS=regress-dsatest diff --git a/regress/lib/libcrypto/dsa/dsatest.c b/regress/lib/libcrypto/dsa/dsatest.c index 004bd3c33e6..e5b56c08d08 100644 --- a/regress/lib/libcrypto/dsa/dsatest.c +++ b/regress/lib/libcrypto/dsa/dsatest.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dsatest.c,v 1.6 2021/11/18 15:11:17 tb Exp $ */ +/* $OpenBSD: dsatest.c,v 1.7 2022/01/12 08:59:56 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -163,21 +163,21 @@ main(int argc, char **argv) goto end; } - i = BN_bn2bin(dsa->q, buf); + i = BN_bn2bin(DSA_get0_q(dsa), buf); j = sizeof(out_q); if ((i != j) || (memcmp(buf, out_q, i) != 0)) { BIO_printf(bio_err, "q value is wrong\n"); goto end; } - i = BN_bn2bin(dsa->p, buf); + i = BN_bn2bin(DSA_get0_p(dsa), buf); j = sizeof(out_p); if ((i != j) || (memcmp(buf, out_p, i) != 0)) { BIO_printf(bio_err, "p value is wrong\n"); goto end; } - i = BN_bn2bin(dsa->g, buf); + i = BN_bn2bin(DSA_get0_g(dsa), buf); j = sizeof(out_g); if ((i != j) || (memcmp(buf, out_g, i) != 0)) { BIO_printf(bio_err, "g value is wrong\n"); -- 2.20.1