mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Fix missing error propagation when php_array_to_X509_sk() fails
Execution shouldn't continue if this fails because it can give the wrong results.
This commit is contained in:
@@ -2684,6 +2684,9 @@ PHP_FUNCTION(openssl_pkcs12_export_to_file)
|
||||
|
||||
if (args && (item = zend_hash_str_find(Z_ARRVAL_P(args), "extracerts", sizeof("extracerts")-1)) != NULL) {
|
||||
ca = php_array_to_X509_sk(item, 5, "extracerts");
|
||||
if (!ca) {
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
/* end parse extra config */
|
||||
|
||||
@@ -2777,6 +2780,9 @@ PHP_FUNCTION(openssl_pkcs12_export)
|
||||
|
||||
if (args && (item = zend_hash_str_find(Z_ARRVAL_P(args), "extracerts", sizeof("extracerts")-1)) != NULL) {
|
||||
ca = php_array_to_X509_sk(item, 5, "extracerts");
|
||||
if (!ca) {
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
/* end parse extra config */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user