From 31be7a8f9204864d0a66829d4121284372c105f4 Mon Sep 17 00:00:00 2001 From: tb <> Date: Wed, 2 May 2018 16:57:35 +0000 Subject: MFC: Remove incorrect NULL checks in DH_set0_key(). Reported by Ondrej Sury, LibreSSL-portable issue #92. ok inoguchi, jsing --- src/lib/libcrypto/dh/dh_lib.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src') diff --git a/src/lib/libcrypto/dh/dh_lib.c b/src/lib/libcrypto/dh/dh_lib.c index e02ce7455a..2153b42a3b 100644 --- a/src/lib/libcrypto/dh/dh_lib.c +++ b/src/lib/libcrypto/dh/dh_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dh_lib.c,v 1.30 2018/02/22 16:41:04 jsing Exp $ */ +/* $OpenBSD: dh_lib.c,v 1.30.2.1 2018/05/02 16:57:35 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -298,10 +298,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; -- cgit v1.2.3-55-g6feb