Skip to content

Commit 80a6cc6

Browse files
bukkaGirgias
andauthored
Update ext/openssl/openssl.c
Co-authored-by: Gina Peter Banyard <[email protected]>
1 parent cef6444 commit 80a6cc6

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

ext/openssl/openssl.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -354,11 +354,9 @@ int php_openssl_get_ssl_stream_data_index(void)
354354
static PHP_INI_MH(OnUpdateLibCtx)
355355
{
356356
#if PHP_OPENSSL_API_VERSION >= 0x30000
357-
const char *name = ZSTR_VAL(new_value);
358-
359-
if (!strcmp(name, "default")) {
357+
if (zend_string_equals(new_value, "default")) {
360358
OPENSSL_G(ctx).libctx = OPENSSL_G(ctx).default_libctx;
361-
} else if (!strcmp(name, "custom")) {
359+
} else if (zend_string_equals(new_value, "custom")) {
362360
OPENSSL_G(ctx).libctx = OPENSSL_G(ctx).custom_libctx;
363361
} else {
364362
int err_type;
@@ -370,7 +368,7 @@ static PHP_INI_MH(OnUpdateLibCtx)
370368

371369
/* Do not output error when restoring ini options. */
372370
if (stage != ZEND_INI_STAGE_DEACTIVATE) {
373-
php_error_docref(NULL, err_type, "OpenSSL libctx \"%s\" cannot be found", name);
371+
php_error_docref(NULL, err_type, "OpenSSL libctx \"%s\" cannot be found", ZSTR_VAL(new_value));
374372
}
375373
return FAILURE;
376374
}

0 commit comments

Comments
 (0)