summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/regress/lib/libcrypto/dh/dhtest.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/regress/lib/libcrypto/dh/dhtest.c b/src/regress/lib/libcrypto/dh/dhtest.c
index 0b2cb741fc..ee06259dce 100644
--- a/src/regress/lib/libcrypto/dh/dhtest.c
+++ b/src/regress/lib/libcrypto/dh/dhtest.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dhtest.c,v 1.6 2021/11/18 15:07:28 tb Exp $ */ 1/* $OpenBSD: dhtest.c,v 1.7 2022/01/12 08:58:12 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 *
@@ -129,23 +129,23 @@ main(int argc, char *argv[])
129 BIO_puts(out, "the g value is not a generator\n"); 129 BIO_puts(out, "the g value is not a generator\n");
130 130
131 BIO_puts(out, "\np ="); 131 BIO_puts(out, "\np =");
132 BN_print(out, a->p); 132 BN_print(out, DH_get0_p(a));
133 BIO_puts(out, "\ng ="); 133 BIO_puts(out, "\ng =");
134 BN_print(out, a->g); 134 BN_print(out, DH_get0_g(a));
135 BIO_puts(out, "\n"); 135 BIO_puts(out, "\n");
136 136
137 if (!DH_generate_key(a)) 137 if (!DH_generate_key(a))
138 goto err; 138 goto err;
139 BIO_puts(out, "pri 1="); 139 BIO_puts(out, "pri 1=");
140 BN_print(out, a->priv_key); 140 BN_print(out, DH_get0_priv_key(a));
141 BIO_puts(out, "\npub 1="); 141 BIO_puts(out, "\npub 1=");
142 BN_print(out, a->pub_key); 142 BN_print(out, DH_get0_pub_key(a));
143 BIO_puts(out, "\n"); 143 BIO_puts(out, "\n");
144 144
145 alen = DH_size(a); 145 alen = DH_size(a);
146 if ((abuf = malloc(alen)) == NULL) 146 if ((abuf = malloc(alen)) == NULL)
147 err(1, "malloc"); 147 err(1, "malloc");
148 aout = DH_compute_key(abuf, a->pub_key, a); 148 aout = DH_compute_key(abuf, DH_get0_pub_key(a), a);
149 149
150 BIO_puts(out, "key1 ="); 150 BIO_puts(out, "key1 =");
151 for (i=0; i<aout; i++) { 151 for (i=0; i<aout; i++) {