Intercepted X509_V_FLAG_CHECK_SS_SIGNATURE verify error

This commit is contained in:
olszomal 2024-03-08 09:53:09 +01:00 committed by Michał Trojnara
parent 093ed12c66
commit f51e2a4869

View File

@ -1467,6 +1467,9 @@ static int verify_ca_callback(int ok, X509_STORE_CTX *ctx)
if (!ok) {
if (trusted_cert(current_cert, error)) {
return 1;
} else if (error == X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN) {
printf("\tError: Unable to get local CA certificate; %s\n",
X509_verify_cert_error_string(error));
} else {
printf("\tError: %s\n", X509_verify_cert_error_string(error));
}
@ -1488,7 +1491,11 @@ static int verify_crl_callback(int ok, X509_STORE_CTX *ctx)
printf("\tWarning: Ignoring %s error for CRL validation\n",
X509_verify_cert_error_string(error));
return 1;
} else {
} else if (error == X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN) {
printf("\tError: Unable to get local CA certificate; %s\n",
X509_verify_cert_error_string(error));
}
else {
printf("\tError: %s\n", X509_verify_cert_error_string(error));
}
}