Skip to content

Commit fa28f24

Browse files
add print out of certificate attempted to verify
1 parent f811807 commit fa28f24

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

pkcs7/smime-verify.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,18 @@ static int Verify(byte* smime, int smimeSz, byte* ca, int caSz, int detached)
9797
if (ret == WOLFSSL_SUCCESS) {
9898
ret = 0;
9999
}
100+
else {
101+
/* print out certificate that could not be verified */
102+
int i;
103+
byte* pt = pkcs7Compat->pkcs7.verifyCert;
104+
105+
printf("Could not verify certificate :");
106+
for (i = 0; i < pkcs7Compat->pkcs7.verifyCertSz; i++) {
107+
printf("%02X", pt[i]);
108+
}
109+
printf("\n");
110+
ret = -1;
111+
}
100112
}
101113

102114

0 commit comments

Comments
 (0)