openssl/crypto
David Benjamin 7966101e20 Allow DH_set0_key with only private key.
The pub_key field for DH isn't actually used in DH_compute_key at all.
(Note the peer public key is passed in as as BIGNUM.) It's mostly there
so the caller may extract it from DH_generate_key. It doesn't
particularly need to be present if filling in a DH from external
parameters.

The check in DH_set0_key conflicts with adding OpenSSL 1.1.0 to Node.
Their public API is a thin wrapper over the old OpenSSL one:
https://nodejs.org/api/crypto.html#crypto_class_diffiehellman

They have separate setPrivateKey and setPublicKey methods, so the public
key may be set last or not at all. In 1.0.2, either worked fine since
operations on DH objects generally didn't use the public key.  (Like
with OpenSSL, Node's setPublicKey method is also largely a no-op, but so
it goes.) In 1.1.0, DH_set0_key prevents create a private-key-only DH
object.

Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/4384)
2017-09-26 14:48:51 +02:00
..
aes
aria Fix potential null problem. 2017-09-01 09:30:18 +10:00
asn1 Fix overflow in c2i_ASN1_BIT_STRING. 2017-09-19 21:31:30 +02:00
async e_os.h removal from other headers and source files. 2017-08-30 07:20:43 +10:00
bf
bio struct timeval include guards 2017-09-01 09:55:43 +10:00
blake2 Move e_os.h to be the very first include. 2017-08-30 07:20:44 +10:00
bn e_os.h removal from other headers and source files. 2017-08-30 07:20:43 +10:00
buffer
camellia
cast e_os.h removal from other headers and source files. 2017-08-30 07:20:43 +10:00
chacha
cmac
cms
comp
conf Move e_os.h to be the very first include. 2017-08-30 07:20:44 +10:00
ct Null pointer used. 2017-09-18 06:52:13 +10:00
des Move e_os.h to be the very first include. 2017-08-30 07:20:44 +10:00
dh Allow DH_set0_key with only private key. 2017-09-26 14:48:51 +02:00
dsa Move the REF_PRINT support from e_os.h to internal/refcount.h. 2017-08-30 07:20:44 +10:00
dso Replace malloc+strcpy with strdup 2017-09-14 16:13:53 -04:00
ec Fix function name in ECerr call 2017-09-14 16:13:29 -04:00
engine Add CRYPTO_thread_glock_new 2017-08-31 19:42:03 -04:00
err Fix function name in ECerr call 2017-09-14 16:13:29 -04:00
evp Add explanatory comment about fitting into a size_t. 2017-09-15 09:02:00 +10:00
hmac
idea
include/internal Support EVP_PKEY_meth_remove and pmeth internal cleanup 2017-09-14 12:41:34 +08:00
kdf
lhash
md2
md4
md5
mdc2
modes crypto/cryptlib.c: mask more capability bits upon FXSR bit flip. 2017-09-01 08:48:32 +02:00
objects objects/obj_xref.txt: cross-reference SHA3 and rsaEncryption. 2017-09-11 22:18:14 +02:00
ocsp Move e_os.h to be the very first include. 2017-08-30 07:20:44 +10:00
pem
perlasm
pkcs7
pkcs12 Add checks for alloc failing. 2017-09-06 09:52:16 -04:00
poly1305
rand Add CRYPTO_thread_glock_new 2017-08-31 19:42:03 -04:00
rc2
rc4
rc5
ripemd
rsa Support key check in EVP interface 2017-09-13 20:38:14 +02:00
seed
sha sha/asm/keccak1600-armv8.pl: fix return value buglet and ... 2017-09-09 19:09:36 +02:00
siphash
srp
stack
store Fix OSSL_STORE's 'file' loader: make sure peekbuf is initialised 2017-09-05 17:07:20 +02:00
ts struct timeval include guards 2017-09-01 09:55:43 +10:00
txt_db
ui Add UI functions to set result with explicit length and to retrieve the length 2017-09-08 20:06:06 +02:00
whrlpool
x509 Guard against DoS in name constraints handling. 2017-09-22 22:00:55 +02:00
x509v3 Guard against DoS in name constraints handling. 2017-09-22 22:00:55 +02:00
alphacpuid.pl
arm64cpuid.pl
arm_arch.h
armcap.c
armv4cpuid.pl
build.info
c64xpluscpuid.pl
cpt_err.c
cryptlib.c crypto/cryptlib.c: mask more capability bits upon FXSR bit flip. 2017-09-01 08:48:32 +02:00
ctype.c Check for EOF in ASCII conversions. 2017-08-25 06:42:17 +10:00
cversion.c
dllmain.c Move e_os.h to be the very first include. 2017-08-30 07:20:44 +10:00
ebcdic.c
ex_data.c Add CRYPTO_thread_glock_new 2017-08-31 19:42:03 -04:00
ia64cpuid.S
init.c Address feedback 2017-08-31 19:42:03 -04:00
LPdir_nyi.c
LPdir_unix.c
LPdir_vms.c
LPdir_win32.c
LPdir_win.c
LPdir_wince.c
mem_clr.c
mem_dbg.c Add CRYPTO_thread_glock_new 2017-08-31 19:42:03 -04:00
mem_sec.c Add CRYPTO_thread_glock_new 2017-08-31 19:42:03 -04:00
mem.c Move e_os.h to be the very first include. 2017-08-30 07:20:44 +10:00
mips_arch.h
o_dir.c Move e_os.h to be the very first include. 2017-08-30 07:20:44 +10:00
o_fips.c
o_fopen.c
o_init.c
o_str.c Revert "GH614: Use memcpy()/strdup() when possible" 2017-09-14 10:26:54 +10:00
o_time.c
pariscid.pl
ppc_arch.h
ppccap.c
ppccpuid.pl
s390xcap.c
s390xcpuid.S
sparc_arch.h
sparccpuid.S
sparcv9cap.c
threads_none.c
threads_pthread.c
threads_win.c
uid.c
vms_rms.h
x86_64cpuid.pl
x86cpuid.pl