Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ext/openssl/openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ static PHP_INI_MH(OnUpdateLibCtx)
/* Do not output error when restoring ini options. */
if (stage != ZEND_INI_STAGE_DEACTIVATE) {
int err_type = stage == ZEND_INI_STAGE_RUNTIME ? E_WARNING : E_ERROR;
php_error_docref(NULL, err_type, "OpenSSL libctx \"%s\" cannot be found", ZSTR_VAL(new_value));
php_error_docref(NULL, err_type, "OpenSSL libctx \"%pS\" cannot be found", new_value);
}
return FAILURE;
}
Expand Down
12 changes: 6 additions & 6 deletions ext/openssl/openssl_backend_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ int php_openssl_parse_config(struct php_x509_request * req, zval * optional_args
&& Z_TYPE_P(item) == IS_STRING) {
req->curve_name = OBJ_sn2nid(Z_STRVAL_P(item));
if (req->curve_name == NID_undef) {
php_error_docref(NULL, E_WARNING, "Unknown elliptic curve (short) name %s", Z_STRVAL_P(item));
php_error_docref(NULL, E_WARNING, "Unknown elliptic curve (short) name %pS", Z_STR_P(item));
return FAILURE;
}
}
Expand Down Expand Up @@ -937,10 +937,10 @@ zend_result php_openssl_csr_add_subj_entry(zval *item, X509_NAME *subj, int nid)
{
php_openssl_store_errors();
php_error_docref(NULL, E_WARNING,
"dn: add_entry_by_NID %d -> %s (failed; check error"
"dn: add_entry_by_NID %d -> %pS (failed; check error"
" queue and value of string_mask OpenSSL option "
"if illegal characters are reported)",
nid, ZSTR_VAL(str_item));
nid, str_item);
zend_string_release(str_item);
return FAILURE;
}
Expand Down Expand Up @@ -1005,7 +1005,7 @@ zend_result php_openssl_csr_make(struct php_x509_request * req, X509_REQ * csr,
return FAILURE;
}
} else {
php_error_docref(NULL, E_WARNING, "dn: %s is not a recognized name", ZSTR_VAL(strindex));
php_error_docref(NULL, E_WARNING, "dn: %pS is not a recognized name", strindex);
}
}
} ZEND_HASH_FOREACH_END();
Expand Down Expand Up @@ -1086,13 +1086,13 @@ zend_result php_openssl_csr_make(struct php_x509_request * req, X509_REQ * csr,
}
if (!X509_REQ_add1_attr_by_NID(csr, nid, MBSTRING_UTF8, (unsigned char*)ZSTR_VAL(str_item), (int)ZSTR_LEN(str_item))) {
php_openssl_store_errors();
php_error_docref(NULL, E_WARNING, "attributes: add_attr_by_NID %d -> %s (failed)", nid, ZSTR_VAL(str_item));
php_error_docref(NULL, E_WARNING, "attributes: add_attr_by_NID %d -> %pS (failed)", nid, str_item);
zend_string_release(str_item);
return FAILURE;
}
zend_string_release(str_item);
} else {
php_error_docref(NULL, E_WARNING, "attributes: %s is not a recognized attribute name", ZSTR_VAL(strindex));
php_error_docref(NULL, E_WARNING, "attributes: %pS is not a recognized attribute name", strindex);
}
} ZEND_HASH_FOREACH_END();
for (i = 0; i < sk_CONF_VALUE_num(attr_sk); i++) {
Expand Down
2 changes: 1 addition & 1 deletion ext/openssl/openssl_backend_v1.c
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ static bool php_openssl_pkey_init_ec_data(EC_KEY *eckey, zval *data, bool *is_pr
if (curve_name_zv && Z_TYPE_P(curve_name_zv) == IS_STRING && Z_STRLEN_P(curve_name_zv) > 0) {
int nid = OBJ_sn2nid(Z_STRVAL_P(curve_name_zv));
if (nid == NID_undef) {
php_error_docref(NULL, E_WARNING, "Unknown elliptic curve (short) name %s", Z_STRVAL_P(curve_name_zv));
php_error_docref(NULL, E_WARNING, "Unknown elliptic curve (short) name %pS", Z_STR_P(curve_name_zv));
goto clean_exit;
}

Expand Down
2 changes: 1 addition & 1 deletion ext/openssl/openssl_backend_v3.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ EVP_PKEY *php_openssl_pkey_init_ec(zval *data, bool *is_private) {
if (curve_name_zv && Z_TYPE_P(curve_name_zv) == IS_STRING && Z_STRLEN_P(curve_name_zv) > 0) {
nid = OBJ_sn2nid(Z_STRVAL_P(curve_name_zv));
if (nid == NID_undef) {
php_error_docref(NULL, E_WARNING, "Unknown elliptic curve (short) name %s", Z_STRVAL_P(curve_name_zv));
php_error_docref(NULL, E_WARNING, "Unknown elliptic curve (short) name %pS", Z_STR_P(curve_name_zv));
goto cleanup;
}

Expand Down
12 changes: 6 additions & 6 deletions ext/openssl/xp_ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1493,8 +1493,8 @@ static zend_result php_openssl_enable_server_sni(
local_cert_str, resolved_cert_path_buff, 0, false, false,
"SNI_server_certs local_cert in ssl stream context", stream)) {
php_stream_warn(stream, OpenFailed,
"Failed setting local cert chain file `%s'; could not open file",
ZSTR_VAL(local_cert_str)
"Failed setting local cert chain file `%pS'; could not open file",
local_cert_str
);
zend_string_release(local_cert_str);
return FAILURE;
Expand All @@ -1518,8 +1518,8 @@ static zend_result php_openssl_enable_server_sni(
local_pk_str, resolved_pk_path_buff, 0, false, false,
"SNI_server_certs local_pk in ssl stream context", stream)) {
php_stream_warn(stream, OpenFailed,
"Failed setting local private key file `%s'; could not open file",
ZSTR_VAL(local_pk_str)
"Failed setting local private key file `%pS'; could not open file",
local_pk_str
);
zend_string_release(local_pk_str);
return FAILURE;
Expand All @@ -1532,8 +1532,8 @@ static zend_result php_openssl_enable_server_sni(
ctx = php_openssl_create_sni_server_ctx(stream, resolved_path_buff, resolved_path_buff);
} else {
php_stream_warn(stream, NotFound,
"Failed setting local cert chain file `%s'; file not found",
Z_STRVAL_P(current)
"Failed setting local cert chain file `%pS'; file not found",
Z_STR_P(current)
);
}
} else {
Expand Down
Loading