summaryrefslogtreecommitdiff
path: root/src/regress/lib/libcrypto/dsa/dsatest.c
diff options
context:
space:
mode:
authortb <>2022-01-12 08:59:56 +0000
committertb <>2022-01-12 08:59:56 +0000
commit72c7c5fb43b3e1245a15a9172c199e07fb003c30 (patch)
treea3bca7b2d5d42a6f6d1b71956411c1e9b6765b08 /src/regress/lib/libcrypto/dsa/dsatest.c
parentc38a3038d818d06a385bf772aa2db9d2f2ef6078 (diff)
downloadopenbsd-72c7c5fb43b3e1245a15a9172c199e07fb003c30.tar.gz
openbsd-72c7c5fb43b3e1245a15a9172c199e07fb003c30.tar.bz2
openbsd-72c7c5fb43b3e1245a15a9172c199e07fb003c30.zip
Rework dsatest to use accessors and link statically for now
Diffstat (limited to 'src/regress/lib/libcrypto/dsa/dsatest.c')
-rw-r--r--src/regress/lib/libcrypto/dsa/dsatest.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/regress/lib/libcrypto/dsa/dsatest.c b/src/regress/lib/libcrypto/dsa/dsatest.c
index 004bd3c33e..e5b56c08d0 100644
--- a/src/regress/lib/libcrypto/dsa/dsatest.c
+++ b/src/regress/lib/libcrypto/dsa/dsatest.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsatest.c,v 1.6 2021/11/18 15:11:17 tb Exp $ */ 1/* $OpenBSD: dsatest.c,v 1.7 2022/01/12 08:59:56 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -163,21 +163,21 @@ main(int argc, char **argv)
163 goto end; 163 goto end;
164 } 164 }
165 165
166 i = BN_bn2bin(dsa->q, buf); 166 i = BN_bn2bin(DSA_get0_q(dsa), buf);
167 j = sizeof(out_q); 167 j = sizeof(out_q);
168 if ((i != j) || (memcmp(buf, out_q, i) != 0)) { 168 if ((i != j) || (memcmp(buf, out_q, i) != 0)) {
169 BIO_printf(bio_err, "q value is wrong\n"); 169 BIO_printf(bio_err, "q value is wrong\n");
170 goto end; 170 goto end;
171 } 171 }
172 172
173 i = BN_bn2bin(dsa->p, buf); 173 i = BN_bn2bin(DSA_get0_p(dsa), buf);
174 j = sizeof(out_p); 174 j = sizeof(out_p);
175 if ((i != j) || (memcmp(buf, out_p, i) != 0)) { 175 if ((i != j) || (memcmp(buf, out_p, i) != 0)) {
176 BIO_printf(bio_err, "p value is wrong\n"); 176 BIO_printf(bio_err, "p value is wrong\n");
177 goto end; 177 goto end;
178 } 178 }
179 179
180 i = BN_bn2bin(dsa->g, buf); 180 i = BN_bn2bin(DSA_get0_g(dsa), buf);
181 j = sizeof(out_g); 181 j = sizeof(out_g);
182 if ((i != j) || (memcmp(buf, out_g, i) != 0)) { 182 if ((i != j) || (memcmp(buf, out_g, i) != 0)) {
183 BIO_printf(bio_err, "g value is wrong\n"); 183 BIO_printf(bio_err, "g value is wrong\n");