From d93cbccb12327e5c5776b4ec3aef787773715e39 Mon Sep 17 00:00:00 2001 From: tb <> Date: Fri, 14 Jan 2022 09:32:27 +0000 Subject: Simplify BN_mont test slightly using a new accessor. --- src/regress/lib/libcrypto/bn/mont/mont.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/regress/lib/libcrypto/bn/mont/mont.c b/src/regress/lib/libcrypto/bn/mont/mont.c index 2c311af417..8b9b14a20e 100644 --- a/src/regress/lib/libcrypto/bn/mont/mont.c +++ b/src/regress/lib/libcrypto/bn/mont/mont.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mont.c,v 1.5 2021/11/26 16:52:07 tb Exp $ */ +/* $OpenBSD: mont.c,v 1.6 2022/01/14 09:32:27 tb Exp $ */ /* * Copyright (c) 2014 Miodrag Vallat. @@ -36,7 +36,6 @@ main(int argc, char *argv[]) { DH *dh = NULL; BIGNUM *priv_key = NULL; - const BIGNUM *pub_key; unsigned char *key = NULL; unsigned char r[32 + 16 * 8]; size_t privsz; @@ -65,8 +64,7 @@ main(int argc, char *argv[]) key = malloc(DH_size(dh)); if (key == NULL) err(1, "malloc"); - DH_get0_key(dh, &pub_key, NULL); - if (DH_compute_key(key, pub_key, dh) == -1) + if (DH_compute_key(key, DH_get0_pub_key(dh), dh) == -1) goto err; free(key); -- cgit v1.2.3-55-g6feb