summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-11-22 15:07:54 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-11-22 20:27:50 +0100
commit4234b099f1ced2c1929a98ef6133b5280697f00a (patch)
treef9c9e779c7524714f8ac467f63e8e0d80ffffcea /vcl
parent1ed86ee4ebfa215a634e7a0d80b5f7fb479d893a (diff)
tdf#99327 vcl PDF mscrypto sign: fix SHA-256 OID
The previous OID only worked with NSS as NSS_CMSUtil_MapSignAlgs() has a hack to accept it, saying Windows 2003 generates such OIDs. Don't depend on readers of the signature accepting that incorrect OID. Change-Id: I63e9a363e9e2ad233eeeacea1a354e3190da1ac1
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 496dd505160b..e5af4d4d0ff9 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -7306,7 +7306,7 @@ bool PDFWriter::Sign(PDFSignContext& rContext)
aPara.cbSize = sizeof(aPara);
aPara.dwMsgEncodingType = PKCS_7_ASN_ENCODING | X509_ASN_ENCODING;
aPara.pSigningCert = pCertContext;
- aPara.HashAlgorithm.pszObjId = const_cast<LPSTR>(szOID_RSA_SHA256RSA);
+ aPara.HashAlgorithm.pszObjId = const_cast<LPSTR>(szOID_NIST_sha256);
aPara.HashAlgorithm.Parameters.cbData = 0;
aPara.cMsgCert = 1;
aPara.rgpMsgCert = &pCertContext;
@@ -7335,7 +7335,7 @@ bool PDFWriter::Sign(PDFSignContext& rContext)
aSignerInfo.pCertInfo = pCertContext->pCertInfo;
aSignerInfo.hCryptProv = hCryptProv;
aSignerInfo.dwKeySpec = nKeySpec;
- aSignerInfo.HashAlgorithm.pszObjId = const_cast<LPSTR>(szOID_RSA_SHA256RSA);
+ aSignerInfo.HashAlgorithm.pszObjId = const_cast<LPSTR>(szOID_NIST_sha256);
aSignerInfo.HashAlgorithm.Parameters.cbData = 0;
CMSG_SIGNED_ENCODE_INFO aSignedInfo;