mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00
Fixed generation on DH publick key for given private key
This commit is contained in:
parent
7390cf6e22
commit
c9ecd0169a
1 changed files with 3328 additions and 3328 deletions
|
@ -2700,7 +2700,7 @@ PHP_FUNCTION(openssl_pkey_new)
|
||||||
OPENSSL_PKEY_SET_BN(Z_ARRVAL_PP(data), dh, g);
|
OPENSSL_PKEY_SET_BN(Z_ARRVAL_PP(data), dh, g);
|
||||||
OPENSSL_PKEY_SET_BN(Z_ARRVAL_PP(data), dh, priv_key);
|
OPENSSL_PKEY_SET_BN(Z_ARRVAL_PP(data), dh, priv_key);
|
||||||
OPENSSL_PKEY_SET_BN(Z_ARRVAL_PP(data), dh, pub_key);
|
OPENSSL_PKEY_SET_BN(Z_ARRVAL_PP(data), dh, pub_key);
|
||||||
if (!dh->priv_key && !dh->pub_key) {
|
if (!dh->pub_key) {
|
||||||
DH_generate_key(dh);
|
DH_generate_key(dh);
|
||||||
}
|
}
|
||||||
if (EVP_PKEY_assign_DH(pkey, dh)) {
|
if (EVP_PKEY_assign_DH(pkey, dh)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue