Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PKCS7 Signature Verification Failure in C

44 views
Skip to first unread message

cengineer

unread,
Jan 25, 2017, 10:28:52 AM1/25/17
to
Hi all,

I am trying to verify PKCS7 signature in C. I am use PKCS_signatureVerify(). However, an error is occured.

The error:

"140736204891696:error:21071065:PKCS7 routines:PKCS7_signatureVerify:digest failure:pk7_doit.c:1106"

The source:

...

BIO * p7Bio = NULL;

//Signer certificate
X509 * certificate = ...

p7Bio=PKCS7_dataInit(pkcs7,NULL);

//Fetch signer info from pkcs7
STACK_OF(PKCS7_SIGNER_INFO) * signerInfoStack = PKCS7_get_signer_info(pkcs7);
int numberOfSignerInfo = sk_PKCS7_SIGNER_INFO_num(signerInfoStack);

for (int i=0; i<numberOfSignerInfo; ++i)
{

PKCS7_SIGNER_INFO * signerInfo = sk_PKCS7_SIGNER_INFO_value(signerInfoStack, i);
int verificationResult = PKCS7_signatureVerify(p7Bio, pkcs7, signerInfo, certificate);

}

...

Anyone have advice on how to solve verification problem?

Robert Rodriguez

unread,
Jul 19, 2023, 7:35:08 AM7/19/23
to
When your garage door springs go bad, it’s important https://garagedoorsrepairnorfolk.com/garage-door-replacement/ to bring the problem and its solution to the attention of a professional so that the problem doesn’t worsen.
0 new messages