F-11907 - Fail PKCS7 examples when the output file cannot be opened

pull/598/head
Aidan Garske 2026-09-08 11:06:28 -07:00
parent 90baab8d4b
commit 4e073434bd
1 changed files with 8 additions and 0 deletions

View File

@ -221,6 +221,10 @@ static int PKCS7_SignVerifyEx(WOLFTPM2_DEV* dev, int tpmDevId,
XFCLOSE(pemFile);
}
else {
printf("Failed to open %s for writing\n", outFile);
rc = -1; goto exit;
}
#else
(void)outFile;
#endif
@ -306,6 +310,10 @@ static int PKCS7_SignVerify(WOLFTPM2_DEV* dev, int tpmDevId,
rc = -1; goto exit;
}
}
else {
printf("Failed to open %s for writing\n", outFile);
rc = -1; goto exit;
}
#else
(void)outFile;
#endif