diff options
author | Tor Lillqvist <tml@collabora.com> | 2015-02-19 11:34:52 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2015-02-19 14:07:42 +0200 |
commit | 2ddfaa6d323b5db2f59f06f7708c5209549abeee (patch) | |
tree | 3b83a02d89e054d02da5f256fb0dab627f5507a5 | |
parent | 159a4c3c75e3a7aecbf1656f3254331892098ba7 (diff) |
tdf#84881: reqPolicy and certReq are optional
Change-Id: Ia5687bf2d68eef06aeb618d5387c663807d24560
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 48659189f26d..2f74f941ff01 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -6156,9 +6156,9 @@ const SEC_ASN1Template TimeStampReq_Template[] = { SEC_ASN1_SEQUENCE, 0, NULL, sizeof(TimeStampReq) }, { SEC_ASN1_INTEGER, offsetof(TimeStampReq, version), 0, 0 }, { SEC_ASN1_INLINE | SEC_ASN1_XTRN, offsetof(TimeStampReq, messageImprint), SEC_ASN1_SUB(MessageImprint_Template), 0 }, - { SEC_ASN1_OBJECT_ID, offsetof(TimeStampReq, reqPolicy), 0, 0 }, + { SEC_ASN1_OBJECT_ID | SEC_ASN1_OPTIONAL, offsetof(TimeStampReq, reqPolicy), 0, 0 }, { SEC_ASN1_INTEGER | SEC_ASN1_OPTIONAL, offsetof(TimeStampReq, nonce), 0, 0 }, - { SEC_ASN1_BOOLEAN, offsetof(TimeStampReq, certReq), 0, 0 }, + { SEC_ASN1_BOOLEAN | SEC_ASN1_OPTIONAL, offsetof(TimeStampReq, certReq), 0, 0 }, { SEC_ASN1_XTRN | SEC_ASN1_OPTIONAL | SEC_ASN1_CONTEXT_SPECIFIC | 0, offsetof(TimeStampReq, extensions), SEC_ASN1_SUB(Extensions_Template), 0 }, { 0, 0, 0, 0 } }; @@ -6339,10 +6339,9 @@ bool PDFWriterImpl::finalizeSignature() src.nonce.data = reinterpret_cast<unsigned char*>(&nNonce); src.nonce.len = sizeof(nNonce); - unsigned char cFalse = false; - src.certReq.type = siUnsignedInteger; - src.certReq.data = &cFalse; - src.certReq.len = sizeof(cFalse); + src.certReq.type = siBuffer; + src.certReq.data = NULL; + src.certReq.len = 0; src.extensions = NULL; |