/* This function is largely borrowed from the one used in OpenSSL's "s_client"
* and "s_server" utilities. */
/* This function is largely borrowed from the one used in OpenSSL's "s_client"
* and "s_server" utilities. */
if(!ok) {
fprintf(fp_cb_ssl_verify,"verify error:num=%d:%s\n",err,
X509_verify_cert_error_string(err));
if(!ok) {
fprintf(fp_cb_ssl_verify,"verify error:num=%d:%s\n",err,
X509_verify_cert_error_string(err));
- if(verify_depth >= depth) {
- ok = 1;
- verify_error = X509_V_OK;
- } else {
- ok=0;
- verify_error = X509_V_ERR_CERT_CHAIN_TOO_LONG;
- }
+ if((int)int_verify_depth >= depth)
+ int_verify_error = err;
+ else
+ int_verify_error = X509_V_ERR_CERT_CHAIN_TOO_LONG;