1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Merge branch 'PHP-8.5'

* PHP-8.5:
  Fix missing libctx in x509 info read bio
This commit is contained in:
Jakub Zelenka
2025-10-14 18:14:33 +02:00
4 changed files with 12 additions and 1 deletions

View File

@@ -711,7 +711,7 @@ STACK_OF(X509) *php_openssl_load_all_certs_from_file(
}
/* This loads from a file, a stack of x509/crl/pkey sets */
if (!(sk = PEM_X509_INFO_read_bio(in, NULL, NULL, NULL))) {
if (!(sk = php_openssl_pem_read_bio_x509_info(in))) {
php_openssl_store_errors();
php_error_docref(NULL, E_WARNING, "Error reading the file, %s", cert_path);
sk_X509_free(stack);

View File

@@ -723,6 +723,11 @@ X509_REQ *php_openssl_pem_read_bio_x509_req(BIO *in)
return PEM_read_bio_X509_REQ(in, NULL, NULL, NULL);
}
STACK_OF(X509_INFO) *php_openssl_pem_read_bio_x509_info(BIO *in)
{
return PEM_X509_INFO_read_bio(in, NULL, NULL, NULL);
}
EVP_PKEY *php_openssl_pem_read_bio_public_key(BIO *in)
{
return PEM_read_bio_PUBKEY(in, NULL, NULL, NULL);

View File

@@ -903,6 +903,11 @@ X509_REQ *php_openssl_pem_read_bio_x509_req(BIO *in)
return xr;
}
STACK_OF(X509_INFO) *php_openssl_pem_read_bio_x509_info(BIO *in)
{
return PEM_X509_INFO_read_bio_ex(in, NULL, NULL, NULL, PHP_OPENSSL_LIBCTX, PHP_OPENSSL_PROPQ);
}
EVP_PKEY *php_openssl_pem_read_bio_public_key(BIO *in)
{
return PEM_read_bio_PUBKEY_ex(in, NULL, NULL, NULL, PHP_OPENSSL_LIBCTX, PHP_OPENSSL_PROPQ);

View File

@@ -195,6 +195,7 @@ zend_string *php_openssl_pkey_derive(EVP_PKEY *key, EVP_PKEY *peer_key, size_t r
X509 *php_openssl_pem_read_asn1_bio_x509(BIO *in);
X509 *php_openssl_pem_read_bio_x509(BIO *in);
X509_REQ *php_openssl_pem_read_bio_x509_req(BIO *in);
STACK_OF(X509_INFO) *php_openssl_pem_read_bio_x509_info(BIO *in);
EVP_PKEY *php_openssl_pem_read_bio_public_key(BIO *in);
EVP_PKEY *php_openssl_pem_read_bio_private_key(BIO *in, pem_password_cb *cb, void *u);
PKCS7 *php_openssl_pem_read_bio_pkcs7(BIO *in);