diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/dh/dh_lib.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/lib/libcrypto/dh/dh_lib.c b/src/lib/libcrypto/dh/dh_lib.c index 8a7f9386c7..446bc65aa2 100644 --- a/src/lib/libcrypto/dh/dh_lib.c +++ b/src/lib/libcrypto/dh/dh_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dh_lib.c,v 1.31 2018/04/14 07:09:21 tb Exp $ */ | 1 | /* $OpenBSD: dh_lib.c,v 1.32 2018/05/02 15:48:38 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 | * |
@@ -294,10 +294,6 @@ DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) | |||
294 | int | 294 | int |
295 | DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) | 295 | DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) |
296 | { | 296 | { |
297 | if ((dh->pub_key == NULL && pub_key == NULL) || | ||
298 | (dh->priv_key == NULL && priv_key == NULL)) | ||
299 | return 0; | ||
300 | |||
301 | if (pub_key != NULL) { | 297 | if (pub_key != NULL) { |
302 | BN_free(dh->pub_key); | 298 | BN_free(dh->pub_key); |
303 | dh->pub_key = pub_key; | 299 | dh->pub_key = pub_key; |