com php-src: Clean up and fix php_openssl_dh_pub_from _priv: ext/openssl/openssl.c

From: Date: Sun, 27 Nov 2016 18:54:28 +0000
Subject: com php-src: Clean up and fix php_openssl_dh_pub_from _priv: ext/openssl/openssl.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-96074@lists.php.net to get a copy of this message
Commit: 0f4216298fbd9a1fdcf978967ac04df76f6283d0 Author: Jakub Zelenka <bukka@php.net> Sun, 27 Nov 2016 18:54:28 +0000 Parents: 461add8adf697a59e390dc4e07ae414939bb8abd Branches: PHP-7.1 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=0f4216298fbd9a1fdcf978967ac04df76f6283d0 Log: Clean up and fix php_openssl_dh_pub_from_priv Changed paths: M ext/openssl/openssl.c Diff: diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 7e8d649..1ebbe99 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -4092,7 +4092,7 @@ zend_bool php_openssl_pkey_init_dsa(DSA *dsa, zval *data) /* }}} */ /* {{{ php_openssl_dh_pub_from_priv */ -static BIGNUM *php_openssl_dh_pub_from_priv(DH *dh, BIGNUM *priv_key, BIGNUM *g, BIGNUM *p) +static BIGNUM *php_openssl_dh_pub_from_priv(BIGNUM *priv_key, BIGNUM *g, BIGNUM *p) { BIGNUM *pub_key, *priv_key_const_time; BN_CTX *ctx; @@ -4110,7 +4110,7 @@ static BIGNUM *php_openssl_dh_pub_from_priv(DH *dh, BIGNUM *priv_key, BIGNUM *g, return NULL; } ctx = BN_CTX_new(); - if (priv_key_const_time == NULL) { + if (ctx == NULL) { BN_free(pub_key); BN_free(priv_key_const_time); php_openssl_store_errors(); @@ -4150,7 +4150,7 @@ zend_bool php_openssl_pkey_init_dh(DH *dh, zval *data) return DH_set0_key(dh, pub_key, priv_key); } if (priv_key) { - pub_key = php_openssl_dh_pub_from_priv(dh, priv_key, g, p); + pub_key = php_openssl_dh_pub_from_priv(priv_key, g, p); if (pub_key == NULL) { return 0; }

« previous php.cvs (#96074) next »