@@ -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_type_error (1 , "X.509 Certificate cannot be retrieved" );
1500
+ zend_argument_value_error (1 , "X.509 Certificate cannot be retrieved" );
1501
1501
RETURN_THROWS ();
1502
1502
}
1503
1503
@@ -1922,8 +1922,7 @@ PHP_FUNCTION(openssl_x509_check_private_key)
1922
1922
1923
1923
cert = php_openssl_x509_from_param (cert_obj , cert_str );
1924
1924
if (cert == NULL ) {
1925
- zend_argument_type_error (1 , "cannot be coerced into an X509 certificate" );
1926
- RETURN_THROWS ();
1925
+ RETURN_FALSE ;
1927
1926
}
1928
1927
1929
1928
RETVAL_FALSE ;
@@ -1961,8 +1960,7 @@ PHP_FUNCTION(openssl_x509_verify)
1961
1960
1962
1961
cert = php_openssl_x509_from_param (cert_obj , cert_str );
1963
1962
if (cert == NULL ) {
1964
- zend_argument_type_error (1 , "cannot be coerced into an X509 certificate" );
1965
- RETURN_THROWS ();
1963
+ RETURN_LONG (err );
1966
1964
}
1967
1965
1968
1966
key = php_openssl_pkey_from_zval (zkey , 1 , NULL , 0 , & free_pkey );
@@ -3090,9 +3088,7 @@ PHP_FUNCTION(openssl_csr_export_to_file)
3090
3088
3091
3089
csr = php_openssl_csr_from_param (csr_obj , csr_str );
3092
3090
if (csr == NULL ) {
3093
- if (!EG (exception )) {
3094
- zend_argument_type_error (1 , "X.509 Certificate Signing Request cannot be retrieved" );
3095
- }
3091
+ zend_argument_value_error (1 , "X.509 Certificate Signing Request cannot be retrieved" );
3096
3092
RETURN_THROWS ();
3097
3093
}
3098
3094
@@ -3208,9 +3204,7 @@ PHP_FUNCTION(openssl_csr_sign)
3208
3204
3209
3205
csr = php_openssl_csr_from_param (csr_obj , csr_str );
3210
3206
if (csr == NULL) {
3211
- if (!EG (exception )) {
3212
- zend_argument_type_error (1 , "X.509 Certificate Signing Request cannot be retrieved" );
3213
- }
3207
+ zend_argument_type_error (1 , "X.509 Certificate Signing Request cannot be retrieved" );
3214
3208
RETURN_THROWS ();
3215
3209
}
3216
3210
0 commit comments