Skip to content

Commit 2e9cdb2

Browse files
authored
Fix missing OpenSSL libctx name fetch conversions (#19830)
1 parent 469aa25 commit 2e9cdb2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

ext/openssl/openssl.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2426,9 +2426,9 @@ PHP_FUNCTION(openssl_pbkdf2)
24262426
}
24272427

24282428
if (method_len) {
2429-
digest = EVP_get_digestbyname(method);
2429+
digest = php_openssl_get_evp_md_by_name(method);
24302430
} else {
2431-
digest = EVP_sha1();
2431+
digest = php_openssl_get_evp_md_by_name("SHA1");
24322432
}
24332433

24342434
if (!digest) {
@@ -4202,7 +4202,7 @@ PHP_FUNCTION(openssl_seal)
42024202
RETURN_THROWS();
42034203
}
42044204

4205-
cipher = EVP_get_cipherbyname(method);
4205+
cipher = php_openssl_get_evp_cipher_by_name(method);
42064206
if (!cipher) {
42074207
php_error_docref(NULL, E_WARNING, "Unknown cipher algorithm");
42084208
RETURN_FALSE;
@@ -4331,7 +4331,7 @@ PHP_FUNCTION(openssl_open)
43314331
RETURN_FALSE;
43324332
}
43334333

4334-
cipher = EVP_get_cipherbyname(method);
4334+
cipher = php_openssl_get_evp_cipher_by_name(method);
43354335
if (!cipher) {
43364336
php_error_docref(NULL, E_WARNING, "Unknown cipher algorithm");
43374337
RETURN_FALSE;

ext/openssl/openssl_backend_common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ zend_string* php_openssl_x509_fingerprint(X509 *peer, const char *method, bool r
608608
unsigned int n;
609609
zend_string *ret;
610610

611-
if (!(mdtype = EVP_get_digestbyname(method))) {
611+
if (!(mdtype = php_openssl_get_evp_md_by_name(method))) {
612612
php_error_docref(NULL, E_WARNING, "Unknown digest algorithm");
613613
return NULL;
614614
} else if (!X509_digest(peer, mdtype, md, &n)) {

0 commit comments

Comments
 (0)