@@ -1497,7 +1497,7 @@ PHP_FUNCTION(openssl_x509_export_to_file)
1497
1497
1498
1498
cert = php_openssl_x509_from_param (cert_obj , cert_str );
1499
1499
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" );
1501
1501
RETURN_THROWS ();
1502
1502
}
1503
1503
@@ -1811,7 +1811,7 @@ PHP_FUNCTION(openssl_x509_export)
1811
1811
1812
1812
cert = php_openssl_x509_from_param (cert_obj , cert_str );
1813
1813
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" );
1815
1815
RETURN_THROWS ();
1816
1816
}
1817
1817
@@ -1889,7 +1889,7 @@ PHP_FUNCTION(openssl_x509_fingerprint)
1889
1889
1890
1890
cert = php_openssl_x509_from_param (cert_obj , cert_str );
1891
1891
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" );
1893
1893
RETURN_THROWS ();
1894
1894
}
1895
1895
@@ -2087,7 +2087,7 @@ PHP_FUNCTION(openssl_x509_parse)
2087
2087
2088
2088
cert = php_openssl_x509_from_param (cert_obj , cert_str );
2089
2089
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 " );
2091
2091
RETURN_THROWS ();
2092
2092
}
2093
2093
array_init (return_value );
@@ -2348,7 +2348,7 @@ PHP_FUNCTION(openssl_x509_checkpurpose)
2348
2348
}
2349
2349
cert = php_openssl_x509_from_param (cert_obj , cert_str );
2350
2350
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 " );
2352
2352
goto clean_exit ;
2353
2353
}
2354
2354
@@ -2455,7 +2455,7 @@ PHP_FUNCTION(openssl_x509_read)
2455
2455
2456
2456
cert = php_openssl_x509_from_param (cert_obj , cert_str );
2457
2457
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" );
2459
2459
RETURN_THROWS ();
2460
2460
}
2461
2461
@@ -2575,7 +2575,7 @@ PHP_FUNCTION(openssl_pkcs12_export_to_file)
2575
2575
2576
2576
cert = php_openssl_x509_from_param (cert_obj , cert_str );
2577
2577
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" );
2579
2579
RETURN_THROWS ();
2580
2580
}
2581
2581
@@ -2678,7 +2678,7 @@ PHP_FUNCTION(openssl_pkcs12_export)
2678
2678
2679
2679
cert = php_openssl_x509_from_param (cert_obj , cert_str );
2680
2680
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" );
2682
2682
RETURN_THROWS ();
2683
2683
}
2684
2684
@@ -3088,7 +3088,7 @@ PHP_FUNCTION(openssl_csr_export_to_file)
3088
3088
3089
3089
csr = php_openssl_csr_from_param (csr_obj , csr_str );
3090
3090
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" );
3092
3092
RETURN_THROWS ();
3093
3093
}
3094
3094
@@ -3140,9 +3140,7 @@ PHP_FUNCTION(openssl_csr_export)
3140
3140
3141
3141
csr = php_openssl_csr_from_param (csr_obj , csr_str );
3142
3142
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" );
3146
3144
RETURN_THROWS ();
3147
3145
}
3148
3146
@@ -3204,7 +3202,7 @@ PHP_FUNCTION(openssl_csr_sign)
3204
3202
3205
3203
csr = php_openssl_csr_from_param (csr_obj , csr_str );
3206
3204
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" );
3208
3206
RETURN_THROWS ();
3209
3207
}
3210
3208
@@ -3213,7 +3211,7 @@ PHP_FUNCTION(openssl_csr_sign)
3213
3211
if (cert_str || cert_obj ) {
3214
3212
cert = php_openssl_x509_from_param (cert_obj , cert_str );
3215
3213
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" );
3217
3215
goto cleanup ;
3218
3216
}
3219
3217
}
@@ -5074,7 +5072,7 @@ PHP_FUNCTION(openssl_pkcs7_encrypt)
5074
5072
5075
5073
cert = php_openssl_x509_from_zval (zcertval , & free_cert );
5076
5074
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 " );
5078
5076
goto clean_exit ;
5079
5077
}
5080
5078
@@ -5095,7 +5093,7 @@ PHP_FUNCTION(openssl_pkcs7_encrypt)
5095
5093
5096
5094
cert = php_openssl_x509_from_zval (zrecipcerts , & free_cert );
5097
5095
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 " );
5099
5097
goto clean_exit ;
5100
5098
}
5101
5099
@@ -5317,7 +5315,7 @@ PHP_FUNCTION(openssl_pkcs7_sign)
5317
5315
5318
5316
cert = php_openssl_x509_from_param (cert_obj , cert_str );
5319
5317
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 " );
5321
5319
goto clean_exit ;
5322
5320
}
5323
5321
@@ -5420,7 +5418,7 @@ PHP_FUNCTION(openssl_pkcs7_decrypt)
5420
5418
5421
5419
cert = php_openssl_x509_from_zval (recipcert , & free_recipcert );
5422
5420
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" );
5424
5422
goto clean_exit ;
5425
5423
}
5426
5424
0 commit comments