diff --git a/osslsigncode.c b/osslsigncode.c index b02a2f7..6dd3934 100644 --- a/osslsigncode.c +++ b/osslsigncode.c @@ -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)); } }