diff options
author | 2018-05-02 15:48:38 +0000 | |
---|---|---|
committer | 2018-05-02 15:48:38 +0000 | |
commit | 7e67e88e7eefdaf922c2373c021752a5509d482a (patch) | |
tree | ff16095ddb2fcd7c5ed6991d941370b804a02abd /lib/libcrypto/dh/dh_lib.c | |
parent | Enable power domain for xhci(4). (diff) | |
download | wireguard-openbsd-7e67e88e7eefdaf922c2373c021752a5509d482a.tar.xz wireguard-openbsd-7e67e88e7eefdaf922c2373c021752a5509d482a.zip |
Remove incorrect NULL checks in DH_set0_key().
Reported by Ondřej Surý, LibreSSL-portable issue #92.
ok inoguchi, jsing
Diffstat (limited to 'lib/libcrypto/dh/dh_lib.c')
-rw-r--r-- | lib/libcrypto/dh/dh_lib.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/libcrypto/dh/dh_lib.c b/lib/libcrypto/dh/dh_lib.c index 8a7f9386c7e..446bc65aa28 100644 --- a/lib/libcrypto/dh/dh_lib.c +++ b/lib/libcrypto/dh/dh_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dh_lib.c,v 1.31 2018/04/14 07:09:21 tb Exp $ */ +/* $OpenBSD: dh_lib.c,v 1.32 2018/05/02 15:48:38 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -294,10 +294,6 @@ DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) { - if ((dh->pub_key == NULL && pub_key == NULL) || - (dh->priv_key == NULL && priv_key == NULL)) - return 0; - if (pub_key != NULL) { BN_free(dh->pub_key); dh->pub_key = pub_key; |