@@ -1497,7 +1497,7 @@ PHP_FUNCTION(openssl_x509_export_to_file)
14971497
14981498 cert = php_openssl_x509_from_param (cert_obj , cert_str );
14991499 if (cert == NULL ) {
1500- zend_argument_value_error (1 , "X.509 Certificate cannot be retrieved " );
1500+ zend_argument_type_error (1 , "cannot be coerced into an X.509 Certificate" );
15011501 RETURN_THROWS ();
15021502 }
15031503
@@ -1811,7 +1811,7 @@ PHP_FUNCTION(openssl_x509_export)
18111811
18121812 cert = php_openssl_x509_from_param (cert_obj , cert_str );
18131813 if (cert == NULL ) {
1814- zend_argument_type_error (1 , "X.509 Certificate cannot be retrieved " );
1814+ zend_argument_type_error (1 , "cannot be coerced into an X.509 Certificate" );
18151815 RETURN_THROWS ();
18161816 }
18171817
@@ -1889,7 +1889,7 @@ PHP_FUNCTION(openssl_x509_fingerprint)
18891889
18901890 cert = php_openssl_x509_from_param (cert_obj , cert_str );
18911891 if (cert == NULL) {
1892- zend_argument_type_error (1 , "X.509 Certificate cannot be retrieved " );
1892+ zend_argument_type_error (1 , "cannot be coerced into an X.509 Certificate" );
18931893 RETURN_THROWS ();
18941894 }
18951895
@@ -2087,7 +2087,7 @@ PHP_FUNCTION(openssl_x509_parse)
20872087
20882088 cert = php_openssl_x509_from_param (cert_obj , cert_str );
20892089 if (cert == NULL ) {
2090- zend_argument_type_error (1 , "cannot be coerced into an X509 certificate " );
2090+ zend_argument_type_error (1 , "cannot be coerced into an X.509 Certificate " );
20912091 RETURN_THROWS ();
20922092 }
20932093 array_init (return_value );
@@ -2348,7 +2348,7 @@ PHP_FUNCTION(openssl_x509_checkpurpose)
23482348 }
23492349 cert = php_openssl_x509_from_param (cert_obj , cert_str );
23502350 if (cert == NULL ) {
2351- zend_argument_type_error (1 , "cannot be coerced into an X509 certificate " );
2351+ zend_argument_type_error (1 , "cannot be coerced into an X.509 Certificate " );
23522352 goto clean_exit ;
23532353 }
23542354
@@ -2455,7 +2455,7 @@ PHP_FUNCTION(openssl_x509_read)
24552455
24562456 cert = php_openssl_x509_from_param (cert_obj , cert_str );
24572457 if (cert == NULL ) {
2458- zend_argument_type_error (1 , "X.509 Certificate cannot be retrieved " );
2458+ zend_argument_type_error (1 , "cannot be coerced into an X.509 Certificate" );
24592459 RETURN_THROWS ();
24602460 }
24612461
@@ -2575,7 +2575,7 @@ PHP_FUNCTION(openssl_pkcs12_export_to_file)
25752575
25762576 cert = php_openssl_x509_from_param (cert_obj , cert_str );
25772577 if (cert == NULL) {
2578- zend_argument_type_error (1 , "X.509 Certificate cannot be retrieved " );
2578+ zend_argument_type_error (1 , "cannot be coerced into an X.509 Certificate" );
25792579 RETURN_THROWS ();
25802580 }
25812581
@@ -2678,7 +2678,7 @@ PHP_FUNCTION(openssl_pkcs12_export)
26782678
26792679 cert = php_openssl_x509_from_param (cert_obj , cert_str );
26802680 if (cert == NULL ) {
2681- zend_argument_type_error (1 , "X.509 Certificate cannot be retrieved " );
2681+ zend_argument_type_error (1 , "cannot be coerced into an X.509 Certificate" );
26822682 RETURN_THROWS ();
26832683 }
26842684
@@ -3088,7 +3088,7 @@ PHP_FUNCTION(openssl_csr_export_to_file)
30883088
30893089 csr = php_openssl_csr_from_param (csr_obj , csr_str );
30903090 if (csr == NULL ) {
3091- zend_argument_value_error (1 , "X.509 Certificate Signing Request cannot be retrieved " );
3091+ zend_argument_type_error (1 , "cannot be coerced into an X.509 Certificate Signing Request" );
30923092 RETURN_THROWS ();
30933093 }
30943094
@@ -3140,9 +3140,7 @@ PHP_FUNCTION(openssl_csr_export)
31403140
31413141 csr = php_openssl_csr_from_param (csr_obj , csr_str );
31423142 if (csr == NULL ) {
3143- if (!EG (exception )) {
3144- zend_argument_type_error (1 , "X.509 Certificate Signing Request cannot be retrieved" );
3145- }
3143+ zend_argument_type_error (1 , "cannot be coerced into an X.509 Certificate Signing Request" );
31463144 RETURN_THROWS ();
31473145 }
31483146
@@ -3204,7 +3202,7 @@ PHP_FUNCTION(openssl_csr_sign)
32043202
32053203 csr = php_openssl_csr_from_param (csr_obj , csr_str );
32063204 if (csr == NULL) {
3207- zend_argument_type_error (1 , "X.509 Certificate Signing Request cannot be retrieved " );
3205+ zend_argument_type_error (1 , "cannot be coerced into an X.509 Certificate Signing Request" );
32083206 RETURN_THROWS ();
32093207 }
32103208
@@ -3213,7 +3211,7 @@ PHP_FUNCTION(openssl_csr_sign)
32133211 if (cert_str || cert_obj ) {
32143212 cert = php_openssl_x509_from_param (cert_obj , cert_str );
32153213 if (cert == NULL ) {
3216- zend_argument_type_error (2 , "X.509 Certificate cannot be retrieved " );
3214+ zend_argument_type_error (2 , "cannot be coerced into an X.509 Certificate" );
32173215 goto cleanup ;
32183216 }
32193217 }
@@ -5074,7 +5072,7 @@ PHP_FUNCTION(openssl_pkcs7_encrypt)
50745072
50755073 cert = php_openssl_x509_from_zval (zcertval , & free_cert );
50765074 if (cert == NULL ) {
5077- zend_argument_value_error (3 , "must be a valid certificate " );
5075+ zend_argument_value_error (3 , "must be a valid X.509 Certificate " );
50785076 goto clean_exit ;
50795077 }
50805078
@@ -5095,7 +5093,7 @@ PHP_FUNCTION(openssl_pkcs7_encrypt)
50955093
50965094 cert = php_openssl_x509_from_zval (zrecipcerts , & free_cert );
50975095 if (cert == NULL ) {
5098- zend_argument_value_error (3 , "must be a valid certificate " );
5096+ zend_argument_value_error (3 , "must be a valid X.509 Certificate " );
50995097 goto clean_exit ;
51005098 }
51015099
@@ -5317,7 +5315,7 @@ PHP_FUNCTION(openssl_pkcs7_sign)
53175315
53185316 cert = php_openssl_x509_from_param (cert_obj , cert_str );
53195317 if (cert == NULL ) {
5320- zend_argument_type_error (3 , "cannot be coerced into an X509 certificate " );
5318+ zend_argument_type_error (3 , "cannot be coerced into an X.509 Certificate " );
53215319 goto clean_exit ;
53225320 }
53235321
@@ -5420,7 +5418,7 @@ PHP_FUNCTION(openssl_pkcs7_decrypt)
54205418
54215419 cert = php_openssl_x509_from_zval (recipcert , & free_recipcert );
54225420 if (cert == NULL ) {
5423- zend_argument_type_error (3 , "X.509 Certificate cannot be retrieved " );
5421+ zend_argument_type_error (3 , "cannot be coerced into an X.509 Certificate" );
54245422 goto clean_exit ;
54255423 }
54265424
0 commit comments