Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.41
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
src /
php-7.4.33 /
ext /
openssl /
tests /
Delete
Unzip
Name
Size
Permission
Date
Action
001.phpt
1.77
KB
-rw-rw-r--
2022-10-31 11:36
74651.pem
1.62
KB
-rw-rw-r--
2022-10-31 11:36
CONFLICTS
7
B
-rw-rw-r--
2022-10-31 11:36
CertificateGenerator.inc
3.81
KB
-rw-rw-r--
2022-10-31 11:36
ServerClientTestCase.inc
3.95
KB
-rw-rw-r--
2022-10-31 11:36
bug25614.phpt
383
B
-rw-rw-r--
2022-10-31 11:36
bug28382.phpt
1.44
KB
-rw-rw-r--
2022-10-31 11:36
bug28382cert.txt
1.62
KB
-rw-rw-r--
2022-10-31 11:36
bug36732.phpt
888
B
-rw-rw-r--
2022-10-31 11:36
bug37820.phpt
730
B
-rw-rw-r--
2022-10-31 11:36
bug37820cert.pem
814
B
-rw-rw-r--
2022-10-31 11:36
bug37820key.pem
497
B
-rw-rw-r--
2022-10-31 11:36
bug38255.phpt
1.58
KB
-rw-rw-r--
2022-10-31 11:36
bug38261.phpt
743
B
-rw-rw-r--
2022-10-31 11:36
bug39217.phpt
414
B
-rw-rw-r--
2022-10-31 11:36
bug39217cert1.txt
1013
B
-rw-rw-r--
2022-10-31 11:36
bug39217cert2.txt
1.03
KB
-rw-rw-r--
2022-10-31 11:36
bug41033.pem
668
B
-rw-rw-r--
2022-10-31 11:36
bug41033.phpt
656
B
-rw-rw-r--
2022-10-31 11:36
bug41033pub.pem
654
B
-rw-rw-r--
2022-10-31 11:36
bug41353.phpt
243
B
-rw-rw-r--
2022-10-31 11:36
bug46127.phpt
1.5
KB
-rw-rw-r--
2022-10-31 11:36
bug47828.phpt
1.78
KB
-rw-rw-r--
2022-10-31 11:36
bug48182.phpt
2.06
KB
-rw-rw-r--
2022-10-31 11:36
bug52093.phpt
673
B
-rw-rw-r--
2022-10-31 11:36
bug54060.phpt
425
B
-rw-rw-r--
2022-10-31 11:36
bug54061.phpt
489
B
-rw-rw-r--
2022-10-31 11:36
bug54992.phpt
2.13
KB
-rw-rw-r--
2022-10-31 11:36
bug55259.phpt
1.23
KB
-rw-rw-r--
2022-10-31 11:36
bug55646.phpt
1.39
KB
-rw-rw-r--
2022-10-31 11:36
bug60632.phpt
767
B
-rw-rw-r--
2022-10-31 11:36
bug61124.phpt
394
B
-rw-rw-r--
2022-10-31 11:36
bug61930.phpt
664
B
-rw-rw-r--
2022-10-31 11:36
bug62890.phpt
1.46
KB
-rw-rw-r--
2022-10-31 11:36
bug64802.pem
2.26
KB
-rw-rw-r--
2022-10-31 11:36
bug64802.phpt
601
B
-rw-rw-r--
2022-10-31 11:36
bug65538_001.phpt
2.09
KB
-rw-rw-r--
2022-10-31 11:36
bug65538_002.phpt
967
B
-rw-rw-r--
2022-10-31 11:36
bug65538_003.phpt
2.28
KB
-rw-rw-r--
2022-10-31 11:36
bug65698.crt
1.65
KB
-rw-rw-r--
2022-10-31 11:36
bug65698.phpt
426
B
-rw-rw-r--
2022-10-31 11:36
bug65729.phpt
2.69
KB
-rw-rw-r--
2022-10-31 11:36
bug66501.phpt
680
B
-rw-rw-r--
2022-10-31 11:36
bug67403.phpt
625
B
-rw-rw-r--
2022-10-31 11:36
bug68265.phpt
1.53
KB
-rw-rw-r--
2022-10-31 11:36
bug68879.phpt
1.58
KB
-rw-rw-r--
2022-10-31 11:36
bug68912.phpt
522
B
-rw-rw-r--
2022-10-31 11:36
bug68920.phpt
3.4
KB
-rw-rw-r--
2022-10-31 11:36
bug69215.phpt
2.17
KB
-rw-rw-r--
2022-10-31 11:36
bug70395.phpt
392
B
-rw-rw-r--
2022-10-31 11:36
bug70438.phpt
949
B
-rw-rw-r--
2022-10-31 11:36
bug71475.phpt
359
B
-rw-rw-r--
2022-10-31 11:36
bug71917.phpt
764
B
-rw-rw-r--
2022-10-31 11:36
bug72165.phpt
579
B
-rw-rw-r--
2022-10-31 11:36
bug72333.phpt
2.28
KB
-rw-rw-r--
2022-10-31 11:36
bug72336.phpt
929
B
-rw-rw-r--
2022-10-31 11:36
bug72362.phpt
710
B
-rw-rw-r--
2022-10-31 11:36
bug73072.phpt
1.29
KB
-rw-rw-r--
2022-10-31 11:36
bug73478.phpt
1.26
KB
-rw-rw-r--
2022-10-31 11:36
bug73711.cnf
28
B
-rw-rw-r--
2022-10-31 11:36
bug73711.phpt
520
B
-rw-rw-r--
2022-10-31 11:36
bug73833.phpt
748
B
-rw-rw-r--
2022-10-31 11:36
bug74022.pfx
1.64
KB
-rw-rw-r--
2022-10-31 11:36
bug74022.phpt
424
B
-rw-rw-r--
2022-10-31 11:36
bug74022_2.phpt
8.15
KB
-rw-rw-r--
2022-10-31 11:36
bug74099.phpt
393
B
-rw-rw-r--
2022-10-31 11:36
bug74159.phpt
3.48
KB
-rw-rw-r--
2022-10-31 11:36
bug74341.phpt
2.47
KB
-rw-rw-r--
2022-10-31 11:36
bug74402.phpt
912
B
-rw-rw-r--
2022-10-31 11:36
bug74651.phpt
468
B
-rw-rw-r--
2022-10-31 11:36
bug74720_0.phpt
3.9
KB
-rw-rw-r--
2022-10-31 11:36
bug74720_1.phpt
3.48
KB
-rw-rw-r--
2022-10-31 11:36
bug74798.phpt
4.17
KB
-rw-rw-r--
2022-10-31 11:36
bug74903.phpt
3.55
KB
-rw-rw-r--
2022-10-31 11:36
bug75307.phpt
351
B
-rw-rw-r--
2022-10-31 11:36
bug76296.phpt
575
B
-rw-rw-r--
2022-10-31 11:36
bug76705.pem
2.93
KB
-rw-rw-r--
2022-10-31 11:36
bug76705.phpt
1.3
KB
-rw-rw-r--
2022-10-31 11:36
bug77390.phpt
3.74
KB
-rw-rw-r--
2022-10-31 11:36
bug78391.phpt
337
B
-rw-rw-r--
2022-10-31 11:36
bug79145.phpt
710
B
-rw-rw-r--
2022-10-31 11:36
bug79881.phpt
2
KB
-rw-rw-r--
2022-10-31 11:36
bug80747.phpt
533
B
-rw-rw-r--
2022-10-31 11:36
capture_peer_cert_001.phpt
1.87
KB
-rw-rw-r--
2022-10-31 11:36
cert.crt
1.22
KB
-rw-rw-r--
2022-10-31 11:36
cert.csr
1.23
KB
-rw-rw-r--
2022-10-31 11:36
cert.p7b
1.27
KB
-rw-rw-r--
2022-10-31 11:36
check_default_conf_path.phpt
513
B
-rw-rw-r--
2022-10-31 11:36
cipher_tests.inc
7.36
KB
-rw-rw-r--
2022-10-31 11:36
cve-2013-6420.crt
1.63
KB
-rw-rw-r--
2022-10-31 11:36
cve-2013-6420.phpt
419
B
-rw-rw-r--
2022-10-31 11:36
cve2013_4073.pem
1.7
KB
-rw-rw-r--
2022-10-31 11:36
cve2013_4073.phpt
723
B
-rw-rw-r--
2022-10-31 11:36
ecc.phpt
2.78
KB
-rw-rw-r--
2022-10-31 11:36
openssl.cnf
1.33
KB
-rw-rw-r--
2022-10-31 11:36
openssl_csr_export_bacis.phpt
1.37
KB
-rw-rw-r--
2022-10-31 11:36
openssl_csr_export_to_file_basic.phpt
3.17
KB
-rw-rw-r--
2022-10-31 11:36
openssl_csr_get_public_key_basic.phpt
1.33
KB
-rw-rw-r--
2022-10-31 11:36
openssl_csr_get_subject_basic.phpt
1.81
KB
-rw-rw-r--
2022-10-31 11:36
openssl_csr_new_basic.phpt
1.17
KB
-rw-rw-r--
2022-10-31 11:36
openssl_csr_sign_basic.phpt
2.81
KB
-rw-rw-r--
2022-10-31 11:36
openssl_decrypt_basic.phpt
1.74
KB
-rw-rw-r--
2022-10-31 11:36
openssl_decrypt_ccm.phpt
1.3
KB
-rw-rw-r--
2022-10-31 11:36
openssl_decrypt_error.phpt
1.88
KB
-rw-rw-r--
2022-10-31 11:36
openssl_decrypt_gcm.phpt
1.22
KB
-rw-rw-r--
2022-10-31 11:36
openssl_decrypt_ocb.phpt
1.46
KB
-rw-rw-r--
2022-10-31 11:36
openssl_digest_basic.phpt
395
B
-rw-rw-r--
2022-10-31 11:36
openssl_encrypt_ccm.phpt
1.47
KB
-rw-rw-r--
2022-10-31 11:36
openssl_encrypt_crash.phpt
357
B
-rw-rw-r--
2022-10-31 11:36
openssl_encrypt_error.phpt
1.58
KB
-rw-rw-r--
2022-10-31 11:36
openssl_encrypt_gcm.phpt
1.43
KB
-rw-rw-r--
2022-10-31 11:36
openssl_encrypt_ocb.phpt
1.45
KB
-rw-rw-r--
2022-10-31 11:36
openssl_error_string_basic.phpt
6.79
KB
-rw-rw-r--
2022-10-31 11:36
openssl_free_key.phpt
1.91
KB
-rw-rw-r--
2022-10-31 11:36
openssl_get_cert_locations_basic.phpt
585
B
-rw-rw-r--
2022-10-31 11:36
openssl_get_cipher_methods.phpt
324
B
-rw-rw-r--
2022-10-31 11:36
openssl_get_md_methods.phpt
312
B
-rw-rw-r--
2022-10-31 11:36
openssl_open_basic.phpt
819
B
-rw-rw-r--
2022-10-31 11:36
openssl_pbkdf2_basic.phpt
994
B
-rw-rw-r--
2022-10-31 11:36
openssl_peer_fingerprint_basic.phpt
2.74
KB
-rw-rw-r--
2022-10-31 11:36
openssl_pkcs12_export_basic.phpt
2
KB
-rw-rw-r--
2022-10-31 11:36
openssl_pkcs12_export_to_file_basic.phpt
2.11
KB
-rw-rw-r--
2022-10-31 11:36
openssl_pkcs12_export_to_file_error.phpt
1.18
KB
-rw-rw-r--
2022-10-31 11:36
openssl_pkcs12_read_basic.phpt
4.42
KB
-rw-rw-r--
2022-10-31 11:36
openssl_pkcs7_decrypt_basic.phpt
2.15
KB
-rw-rw-r--
2022-10-31 11:36
openssl_pkcs7_decrypt_error.phpt
1.11
KB
-rw-rw-r--
2022-10-31 11:36
openssl_pkcs7_encrypt_basic.phpt
2.35
KB
-rw-rw-r--
2022-10-31 11:36
openssl_pkcs7_read_basic.phpt
1.94
KB
-rw-rw-r--
2022-10-31 11:36
openssl_pkcs7_sign_basic.phpt
2.39
KB
-rw-rw-r--
2022-10-31 11:36
openssl_pkcs7_verify_basic.phpt
3.34
KB
-rw-rw-r--
2022-10-31 11:36
openssl_pkey_derive-dh.phpt
2.33
KB
-rw-rw-r--
2022-10-31 11:36
openssl_pkey_derive-ecdh.phpt
1.04
KB
-rw-rw-r--
2022-10-31 11:36
openssl_pkey_export_basic.phpt
1.75
KB
-rw-rw-r--
2022-10-31 11:36
openssl_pkey_get_details_basic.phpt
629
B
-rw-rw-r--
2022-10-31 11:36
openssl_pkey_new_basic.phpt
3.62
KB
-rw-rw-r--
2022-10-31 11:36
openssl_pkey_new_error.phpt
812
B
-rw-rw-r--
2022-10-31 11:36
openssl_private_decrypt_basic.phpt
1.24
KB
-rw-rw-r--
2022-10-31 11:36
openssl_private_encrypt_basic.phpt
1.1
KB
-rw-rw-r--
2022-10-31 11:36
openssl_public_decrypt_basic.phpt
1.53
KB
-rw-rw-r--
2022-10-31 11:36
openssl_public_encrypt_basic.phpt
1.1
KB
-rw-rw-r--
2022-10-31 11:36
openssl_random_pseudo_bytes_basic.phpt
371
B
-rw-rw-r--
2022-10-31 11:36
openssl_random_pseudo_bytes_error.phpt
290
B
-rw-rw-r--
2022-10-31 11:36
openssl_seal_basic.phpt
1.71
KB
-rw-rw-r--
2022-10-31 11:36
openssl_sign_basic.phpt
627
B
-rw-rw-r--
2022-10-31 11:36
openssl_spki_export_basic.phpt
1.88
KB
-rw-rw-r--
2022-10-31 11:36
openssl_spki_export_challenge_basic.phpt
3.19
KB
-rw-rw-r--
2022-10-31 11:36
openssl_spki_new_basic.phpt
1.58
KB
-rw-rw-r--
2022-10-31 11:36
openssl_spki_verify_basic.phpt
1.69
KB
-rw-rw-r--
2022-10-31 11:36
openssl_verify_basic.phpt
820
B
-rw-rw-r--
2022-10-31 11:36
openssl_x509_check_private_key_basic.phpt
746
B
-rw-rw-r--
2022-10-31 11:36
openssl_x509_checkpurpose_basic.phpt
6.68
KB
-rw-rw-r--
2022-10-31 11:36
openssl_x509_export_basic.phpt
1.18
KB
-rw-rw-r--
2022-10-31 11:36
openssl_x509_export_to_file_basic.phpt
1.26
KB
-rw-rw-r--
2022-10-31 11:36
openssl_x509_fingerprint_basic.phpt
1.55
KB
-rw-rw-r--
2022-10-31 11:36
openssl_x509_free_basic.phpt
433
B
-rw-rw-r--
2022-10-31 11:36
openssl_x509_parse_basic.phpt
5.96
KB
-rw-rw-r--
2022-10-31 11:36
openssl_x509_read_basic.phpt
1.15
KB
-rw-rw-r--
2022-10-31 11:36
openssl_x509_verify.phpt
754
B
-rw-rw-r--
2022-10-31 11:36
p12_with_extra_certs.p12
3.13
KB
-rw-rw-r--
2022-10-31 11:36
peer_verification.phpt
2.57
KB
-rw-rw-r--
2022-10-31 11:36
private.crt
1.66
KB
-rw-rw-r--
2022-10-31 11:36
private_ec.key
227
B
-rw-rw-r--
2022-10-31 11:36
private_rsa_1024.key
887
B
-rw-rw-r--
2022-10-31 11:36
private_rsa_2048.key
1.64
KB
-rw-rw-r--
2022-10-31 11:36
private_rsa_2048_pass_php.key
1.72
KB
-rw-rw-r--
2022-10-31 11:36
private_rsa_4096.key
3.17
KB
-rw-rw-r--
2022-10-31 11:36
public.crt
1.28
KB
-rw-rw-r--
2022-10-31 11:36
public.key
272
B
-rw-rw-r--
2022-10-31 11:36
public_ec.key
178
B
-rw-rw-r--
2022-10-31 11:36
public_rsa_2048.key
451
B
-rw-rw-r--
2022-10-31 11:36
san_peer_matching.phpt
2.03
KB
-rw-rw-r--
2022-10-31 11:36
session_meta_capture.phpt
2.77
KB
-rw-rw-r--
2022-10-31 11:36
session_meta_capture_tlsv13.phpt
1.99
KB
-rw-rw-r--
2022-10-31 11:36
signed.eml
3.65
KB
-rw-rw-r--
2022-10-31 11:36
sni_server.phpt
2.09
KB
-rw-rw-r--
2022-10-31 11:36
sni_server_ca.pem
3.81
KB
-rw-rw-r--
2022-10-31 11:36
sni_server_cs.pem
3.44
KB
-rw-rw-r--
2022-10-31 11:36
sni_server_cs_cert.pem
1.8
KB
-rw-rw-r--
2022-10-31 11:36
sni_server_cs_key.pem
1.64
KB
-rw-rw-r--
2022-10-31 11:36
sni_server_key_cert.phpt
2.3
KB
-rw-rw-r--
2022-10-31 11:36
sni_server_uk.pem
3.43
KB
-rw-rw-r--
2022-10-31 11:36
sni_server_uk_cert.pem
1.8
KB
-rw-rw-r--
2022-10-31 11:36
sni_server_uk_key.pem
1.64
KB
-rw-rw-r--
2022-10-31 11:36
sni_server_us.pem
3.44
KB
-rw-rw-r--
2022-10-31 11:36
sni_server_us_cert.pem
1.8
KB
-rw-rw-r--
2022-10-31 11:36
sni_server_us_key.pem
1.64
KB
-rw-rw-r--
2022-10-31 11:36
stream_crypto_flags_001.phpt
2.23
KB
-rw-rw-r--
2022-10-31 11:36
stream_crypto_flags_002.phpt
2.72
KB
-rw-rw-r--
2022-10-31 11:36
stream_crypto_flags_003.phpt
2.72
KB
-rw-rw-r--
2022-10-31 11:36
stream_crypto_flags_004.phpt
2.95
KB
-rw-rw-r--
2022-10-31 11:36
stream_security_level.phpt
2.58
KB
-rw-rw-r--
2022-10-31 11:36
stream_server_reneg_limit.phpt
3.36
KB
-rw-rw-r--
2022-10-31 11:36
stream_verify_peer_name_001.phpt
1.56
KB
-rw-rw-r--
2022-10-31 11:36
stream_verify_peer_name_002.phpt
1.82
KB
-rw-rw-r--
2022-10-31 11:36
stream_verify_peer_name_003.phpt
2.06
KB
-rw-rw-r--
2022-10-31 11:36
streams_crypto_method.phpt
1.92
KB
-rw-rw-r--
2022-10-31 11:36
tls_min_v1.0_max_v1.1_wrapper.phpt
2.36
KB
-rw-rw-r--
2022-10-31 11:36
tls_wrapper.phpt
2.25
KB
-rw-rw-r--
2022-10-31 11:36
tls_wrapper_with_tls_v1.3.phpt
2.46
KB
-rw-rw-r--
2022-10-31 11:36
tlsv1.0_wrapper.phpt
1.73
KB
-rw-rw-r--
2022-10-31 11:36
tlsv1.1_wrapper.phpt
1.73
KB
-rw-rw-r--
2022-10-31 11:36
tlsv1.2_wrapper.phpt
1.67
KB
-rw-rw-r--
2022-10-31 11:36
tlsv1.3_wrapper.phpt
1.72
KB
-rw-rw-r--
2022-10-31 11:36
Save
Rename
--TEST-- openssl_error_string() tests --SKIPIF-- <?php if (!extension_loaded("openssl")) print "skip"; ?> --FILE-- <?php // helper function to check openssl errors function expect_openssl_errors($name, $expected_error_codes) { $expected_errors = array_fill_keys($expected_error_codes, false); $all_errors = array(); while (($error_string = openssl_error_string()) !== false) { if (preg_match(",.+:([0-9A-F]+):.+,", $error_string, $m) > 0) { $error_code = $m[1]; if (isset($expected_errors[$error_code])) { $expected_errors[$error_code] = true; } $all_errors[$error_code] = $error_string; } else { $all_errors[] = $error_string; } } $fail = false; foreach ($expected_errors as $error_code => $error_code_found) { if (!$error_code_found) { $fail = true; echo "$name: no error code $error_code\n"; } } if (!$fail) { echo "$name: ok\n"; } else { echo "$name: uncaught errors\n"; foreach ($all_errors as $code => $str) { if (!isset($expected_errors[$code]) || !$expected_errors[$code]) { echo "\t", $code, ": ", $str, "\n"; } } } } // helper for debugging errors function dump_openssl_errors($name) { echo "\n$name\n"; while (($error_string = openssl_error_string()) !== false) { var_dump($error_string); } } // common output file $output_file = __DIR__ . "/openssl_error_string_basic_output.tmp"; // invalid file for read is something that does not exist in current directory $invalid_file_for_read = __DIR__ . "/invalid_file_for_read_operation.txt"; // invalid file for is the test dir as writting file to existing dir should alway fail $invalid_file_for_write = __DIR__; // crt file $crt_file = "file://" . __DIR__ . "/cert.crt"; // csr file $csr_file = "file://" . __DIR__ . "/cert.csr"; // public key file $public_key_file = "file://" .__DIR__ . "/public.key"; // private key file $private_key_file = "file://" .__DIR__ . "/private_rsa_1024.key"; // private key file with password (password is 'php') $private_key_file_with_pass = "file://" .__DIR__ . "/private_rsa_2048_pass_php.key"; // ENCRYPTION $data = "test"; $method = "AES-128-ECB"; $enc_key = str_repeat('x', 40); // error because password is longer then key length and // EVP_CIPHER_CTX_set_key_length fails for AES openssl_encrypt($data, $method, $enc_key); $enc_error = openssl_error_string(); var_dump($enc_error); // make sure that error is cleared now var_dump(openssl_error_string()); // internally OpenSSL ERR won't save more than 15 (16 - 1) errors so lets test it for ($i = 0; $i < 20; $i++) { openssl_encrypt($data, $method, $enc_key); } $error_queue_size = 0; while (($enc_error_new = openssl_error_string()) !== false) { if ($enc_error_new !== $enc_error) { echo "The new encoding error doesn't match the expected one\n"; } ++$error_queue_size; } var_dump($error_queue_size); echo "\n"; $is_111 = OPENSSL_VERSION_NUMBER >= 0x10101000; $err_pem_no_start_line = $is_111 ? '0909006C': '0906D06C'; // PKEY echo "PKEY errors\n"; // file for pkey (file:///) fails when opennig (BIO_new_file) @openssl_pkey_export_to_file("file://" . $invalid_file_for_read, $output_file); expect_openssl_errors('openssl_pkey_export_to_file opening', ['02001002', '2006D080']); // file or private pkey is not correct PEM - failing PEM_read_bio_PrivateKey @openssl_pkey_export_to_file($csr_file, $output_file); expect_openssl_errors('openssl_pkey_export_to_file pem', [$err_pem_no_start_line]); // file to export cannot be written @openssl_pkey_export_to_file($private_key_file, $invalid_file_for_write); expect_openssl_errors('openssl_pkey_export_to_file write', ['2006D002']); // successful export @openssl_pkey_export($private_key_file_with_pass, $out, 'wrong pwd'); expect_openssl_errors('openssl_pkey_export', ['06065064', '0906A065']); // invalid x509 for getting public key @openssl_pkey_get_public($private_key_file); expect_openssl_errors('openssl_pkey_get_public', [$err_pem_no_start_line]); // private encrypt with unknown padding @openssl_private_encrypt("data", $crypted, $private_key_file, 1000); expect_openssl_errors('openssl_private_encrypt', ['04066076']); // private decrypt with failed padding check @openssl_private_decrypt("data", $crypted, $private_key_file); expect_openssl_errors('openssl_private_decrypt', ['04065072']); // public encrypt and decrypt with failed padding check and padding @openssl_public_encrypt("data", $crypted, $public_key_file, 1000); @openssl_public_decrypt("data", $crypted, $public_key_file); expect_openssl_errors('openssl_private_(en|de)crypt padding', [$err_pem_no_start_line, '04068076', '04067072']); // X509 echo "X509 errors\n"; // file for x509 (file:///) fails when opennig (BIO_new_file) @openssl_x509_export_to_file("file://" . $invalid_file_for_read, $output_file); expect_openssl_errors('openssl_x509_export_to_file open', ['02001002']); // file or str cert is not correct PEM - failing PEM_read_bio_X509 or PEM_ASN1_read_bio @openssl_x509_export_to_file($csr_file, $output_file); expect_openssl_errors('openssl_x509_export_to_file pem', [$err_pem_no_start_line]); // file to export cannot be written @openssl_x509_export_to_file($crt_file, $invalid_file_for_write); expect_openssl_errors('openssl_x509_export_to_file write', ['2006D002']); // checking purpose fails because there is no such purpose 1000 @openssl_x509_checkpurpose($crt_file, 1000); expect_openssl_errors('openssl_x509_checkpurpose purpose', ['0B086079']); // CSR echo "CSR errors\n"; // file for csr (file:///) fails when opennig (BIO_new_file) @openssl_csr_get_subject("file://" . $invalid_file_for_read); expect_openssl_errors('openssl_csr_get_subject open', ['02001002', '2006D080']); // file or str csr is not correct PEM - failing PEM_read_bio_X509_REQ @openssl_csr_get_subject($crt_file); expect_openssl_errors('openssl_csr_get_subjec pem', [$err_pem_no_start_line]); // other possible cuases that are difficult to catch: // - ASN1_STRING_to_UTF8 fails in add_assoc_name_entry // - invalid php_x509_request field (NULL) would cause error with CONF_get_string ?> --CLEAN-- <?php $output_file = __DIR__ . "/openssl_error_string_basic_output.tmp"; if (is_file($output_file)) { unlink($output_file); } ?> --EXPECT-- string(89) "error:0607A082:digital envelope routines:EVP_CIPHER_CTX_set_key_length:invalid key length" bool(false) int(15) PKEY errors openssl_pkey_export_to_file opening: ok openssl_pkey_export_to_file pem: ok openssl_pkey_export_to_file write: ok openssl_pkey_export: ok openssl_pkey_get_public: ok openssl_private_encrypt: ok openssl_private_decrypt: ok openssl_private_(en|de)crypt padding: ok X509 errors openssl_x509_export_to_file open: ok openssl_x509_export_to_file pem: ok openssl_x509_export_to_file write: ok openssl_x509_checkpurpose purpose: ok CSR errors openssl_csr_get_subject open: ok openssl_csr_get_subjec pem: ok