Skip to content

Commit 921b6ba

Browse files
committed
HSM: quiet engine
By default, we should avoid all the logs from the output streams.
1 parent 747e065 commit 921b6ba

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ext/openssl/openssl.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,6 +1423,12 @@ X509 *php_openssl_x509_from_str(zend_string *cert_str) {
14231423
php_openssl_store_errors();
14241424
return NULL;
14251425
}
1426+
} else {
1427+
if (!ENGINE_ctrl_cmd_string(engine, "QUIET", NULL, 0)) {
1428+
ENGINE_free(engine);
1429+
php_openssl_store_errors();
1430+
return NULL;
1431+
}
14261432
}
14271433
if (!ENGINE_init(engine)) {
14281434
ENGINE_free(engine);
@@ -3623,6 +3629,11 @@ EVP_PKEY *php_openssl_pkey_from_zval(zval *val, int public_key, char *passphrase
36233629
ENGINE_free(engine);
36243630
TMP_CLEAN;
36253631
}
3632+
} else {
3633+
if (!ENGINE_ctrl_cmd_string(engine, "QUIET", NULL, 0)) {
3634+
ENGINE_free(engine);
3635+
TMP_CLEAN;
3636+
}
36263637
}
36273638
if (!ENGINE_init(engine)) {
36283639
ENGINE_free(engine);

0 commit comments

Comments
 (0)