Skip to content

Commit d526773

Browse files
committed
Merge branch 'PHP-8.2'
2 parents ce58ae5 + c022ce9 commit d526773

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

ext/openssl/openssl.c

+4
Original file line numberDiff line numberDiff line change
@@ -4714,6 +4714,7 @@ static void php_openssl_copy_bn_param(
47144714
}
47154715
}
47164716

4717+
#ifdef HAVE_EVP_PKEY_EC
47174718
static zend_string *php_openssl_get_utf8_param(
47184719
EVP_PKEY *pkey, const char *param, const char *name) {
47194720
char buf[64];
@@ -4727,6 +4728,7 @@ static zend_string *php_openssl_get_utf8_param(
47274728
return NULL;
47284729
}
47294730
#endif
4731+
#endif
47304732

47314733
/* {{{ returns an array with the key details (bits, pkey, type)*/
47324734
PHP_FUNCTION(openssl_pkey_get_details)
@@ -4791,6 +4793,7 @@ PHP_FUNCTION(openssl_pkey_get_details)
47914793
php_openssl_copy_bn_param(&ary, pkey, OSSL_PKEY_PARAM_PRIV_KEY, "priv_key");
47924794
php_openssl_copy_bn_param(&ary, pkey, OSSL_PKEY_PARAM_PUB_KEY, "pub_key");
47934795
break;
4796+
#ifdef HAVE_EVP_PKEY_EC
47944797
case EVP_PKEY_EC: {
47954798
ktype = OPENSSL_KEYTYPE_EC;
47964799
array_init(&ary);
@@ -4819,6 +4822,7 @@ PHP_FUNCTION(openssl_pkey_get_details)
48194822
php_openssl_copy_bn_param(&ary, pkey, OSSL_PKEY_PARAM_PRIV_KEY, "d");
48204823
break;
48214824
}
4825+
#endif
48224826
EMPTY_SWITCH_DEFAULT_CASE();
48234827
}
48244828
#else

ext/openssl/tests/bug79589.phpt

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ openssl
55
--SKIPIF--
66
<?php
77
if (getenv("SKIP_ONLINE_TESTS")) die("skip online test");
8+
if (!defined("OPENSSL_KEYTYPE_EC")) die("skip EC disabled");
89
?>
910
--FILE--
1011
<?php

ext/openssl/tests/ecc.phpt

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ openssl_*() with OPENSSL_KEYTYPE_EC
33
--EXTENSIONS--
44
openssl
55
--SKIPIF--
6-
<?php if (!defined("OPENSSL_KEYTYPE_EC")) print "skip"; ?>
6+
<?php
7+
if (!defined("OPENSSL_KEYTYPE_EC")) die("skip EC disabled");
8+
?>
79
--FILE--
810
<?php
911
$config = __DIR__ . DIRECTORY_SEPARATOR . 'openssl.cnf';

0 commit comments

Comments
 (0)