[rst-commit] r175 - /redwax-signtext-windows/trunk/Redwax SignText/Redwax SignText (MFC)/crypto.c
rst-commit at redwax.eu
rst-commit at redwax.eu
Fri Jul 5 12:29:09 CEST 2024
Author: minfrin at redwax.eu
Date: Fri Jul 5 12:29:08 2024
New Revision: 175
Log:
Use the hashing algorithm of the certificate for the PKCS7 signature.
Modified:
redwax-signtext-windows/trunk/Redwax SignText/Redwax SignText (MFC)/crypto.c
Modified: redwax-signtext-windows/trunk/Redwax SignText/Redwax SignText (MFC)/crypto.c
==============================================================================
--- redwax-signtext-windows/trunk/Redwax SignText/Redwax SignText (MFC)/crypto.c (original)
+++ redwax-signtext-windows/trunk/Redwax SignText/Redwax SignText (MFC)/crypto.c Fri Jul 5 12:29:08 2024
@@ -320,10 +320,13 @@
return;
}
-
CRYPT_ALGORITHM_IDENTIFIER hashAlgorithm;
memset(&hashAlgorithm, 0, sizeof(hashAlgorithm));
+#if 0
hashAlgorithm.pszObjId = szOID_RSA_SHA256RSA;
+#else
+ hashAlgorithm.pszObjId = cert->pCertInfo->SignatureAlgorithm.pszObjId;
+#endif
CRYPT_SIGN_MESSAGE_PARA signParam;
memset(&signParam, 0, sizeof(signParam));
More information about the rst-commit
mailing list