From 077783aa2aef342adf1a0fc3920ada1c3d1327bb Mon Sep 17 00:00:00 2001 From: olszomal Date: Fri, 3 Apr 2020 12:31:59 +0200 Subject: [PATCH] signer extended key usage XKU_CODE_SIGN --- osslsigncode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osslsigncode.c b/osslsigncode.c index b0a10d5..1892e51 100644 --- a/osslsigncode.c +++ b/osslsigncode.c @@ -2130,7 +2130,7 @@ static int verify_authenticode(PKCS7 *p7, ASN1_UTCTIME *timestamp_time, GLOBAL_O signers = PKCS7_get0_signers(p7, NULL, 0); if (!signers || sk_X509_num(signers) != 1) ret = 1; /* FAILED */ - if (!(X509_get_extension_flags(sk_X509_value(signers, 0)) && XKU_CODE_SIGN)) { + if (!(X509_get_extended_key_usage(sk_X509_value(signers, 0)) & XKU_CODE_SIGN)) { fprintf(stderr, "Unsupported Signer's certificate purpose\n"); ret = 1; /* FAILED */ }