Skip to content

Commit feebbcd

Browse files
olszomalmtrojnar
authored andcommitted
Print current CRL during certificate verification
1 parent d787541 commit feebbcd

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

osslsigncode.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1901,11 +1901,22 @@ static int verify_ca_callback(int ok, X509_STORE_CTX *ctx)
19011901

19021902
static int verify_crl_callback(int ok, X509_STORE_CTX *ctx)
19031903
{
1904+
X509_CRL *crl;
19041905
int error = X509_STORE_CTX_get_error(ctx);
19051906
int depth = X509_STORE_CTX_get_error_depth(ctx);
1906-
19071907
X509 *current_cert = X509_STORE_CTX_get_current_cert(ctx);
1908+
19081909
print_cert(current_cert, depth);
1910+
1911+
crl = X509_STORE_CTX_get0_current_crl(ctx);
1912+
if (crl) {
1913+
BIO *bio = BIO_new_fp(stdout, BIO_NOCLOSE);
1914+
1915+
X509_CRL_print(bio, crl);
1916+
BIO_free(bio);
1917+
printf("\n");
1918+
}
1919+
19091920
if (!ok) {
19101921
if (trusted_cert(current_cert, error)) {
19111922
return 1;

0 commit comments

Comments
 (0)