mirror of
https://github.com/mtrojnar/osslsigncode
synced 2026-06-08 16:13:39 +00:00
Print current CRL during certificate verification
This commit is contained in:
committed by
Michał Trojnara
parent
d787541107
commit
feebbcd4d9
+12
-1
@@ -1901,11 +1901,22 @@ static int verify_ca_callback(int ok, X509_STORE_CTX *ctx)
|
||||
|
||||
static int verify_crl_callback(int ok, X509_STORE_CTX *ctx)
|
||||
{
|
||||
X509_CRL *crl;
|
||||
int error = X509_STORE_CTX_get_error(ctx);
|
||||
int depth = X509_STORE_CTX_get_error_depth(ctx);
|
||||
|
||||
X509 *current_cert = X509_STORE_CTX_get_current_cert(ctx);
|
||||
|
||||
print_cert(current_cert, depth);
|
||||
|
||||
crl = X509_STORE_CTX_get0_current_crl(ctx);
|
||||
if (crl) {
|
||||
BIO *bio = BIO_new_fp(stdout, BIO_NOCLOSE);
|
||||
|
||||
X509_CRL_print(bio, crl);
|
||||
BIO_free(bio);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
if (!ok) {
|
||||
if (trusted_cert(current_cert, error)) {
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user