@@ -3969,6 +3969,8 @@ static EVP_PKEY *php_openssl_pkey_init_dsa(zval *data, bool *is_private)
3969
3969
OPENSSL_PKEY_SET_BN (data , priv_key );
3970
3970
OPENSSL_PKEY_SET_BN (data , pub_key );
3971
3971
3972
+ * is_private = false;
3973
+
3972
3974
if (!ctx || !bld || !p || !q || !g ) {
3973
3975
goto cleanup ;
3974
3976
}
@@ -4140,6 +4142,8 @@ static EVP_PKEY *php_openssl_pkey_init_dh(zval *data, bool *is_private)
4140
4142
OPENSSL_PKEY_SET_BN (data , priv_key );
4141
4143
OPENSSL_PKEY_SET_BN (data , pub_key );
4142
4144
4145
+ * is_private = false;
4146
+
4143
4147
if (!ctx || !bld || !p || !g ) {
4144
4148
goto cleanup ;
4145
4149
}
@@ -4233,6 +4237,8 @@ static bool php_openssl_pkey_init_legacy_ec(EC_KEY *eckey, zval *data, bool *is_
4233
4237
zval * x ;
4234
4238
zval * y ;
4235
4239
4240
+ * is_private = false;
4241
+
4236
4242
if ((bn = zend_hash_str_find (Z_ARRVAL_P (data ), "curve_name" , sizeof ("curve_name" ) - 1 )) != NULL &&
4237
4243
Z_TYPE_P (bn ) == IS_STRING ) {
4238
4244
int nid = OBJ_sn2nid (Z_STRVAL_P (bn ));
@@ -4257,7 +4263,6 @@ static bool php_openssl_pkey_init_legacy_ec(EC_KEY *eckey, zval *data, bool *is_
4257
4263
}
4258
4264
4259
4265
// The public key 'pnt' can be calculated from 'd' or is defined by 'x' and 'y'
4260
- * is_private = false;
4261
4266
if ((bn = zend_hash_str_find (Z_ARRVAL_P (data ), "d" , sizeof ("d" ) - 1 )) != NULL &&
4262
4267
Z_TYPE_P (bn ) == IS_STRING ) {
4263
4268
* is_private = true;
@@ -4338,6 +4343,8 @@ static EVP_PKEY *php_openssl_pkey_init_ec(zval *data, bool *is_private) {
4338
4343
OPENSSL_PKEY_SET_BN (data , x );
4339
4344
OPENSSL_PKEY_SET_BN (data , y );
4340
4345
4346
+ * is_private = false;
4347
+
4341
4348
if (!ctx || !bld || !curve_name_zv || Z_TYPE_P (curve_name_zv ) != IS_STRING ) {
4342
4349
goto cleanup ;
4343
4350
}
0 commit comments