7966101e20
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) |
||
---|---|---|
.. | ||
build.info | ||
dh192.pem | ||
dh512.pem | ||
dh1024.pem | ||
dh2048.pem | ||
dh4096.pem | ||
dh_ameth.c | ||
dh_asn1.c | ||
dh_check.c | ||
dh_depr.c | ||
dh_err.c | ||
dh_gen.c | ||
dh_kdf.c | ||
dh_key.c | ||
dh_lib.c | ||
dh_locl.h | ||
dh_meth.c | ||
dh_pmeth.c | ||
dh_prn.c | ||
dh_rfc5114.c |