summaryrefslogtreecommitdiffstats
path: root/svl/source/crypto
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 09:27:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 09:27:30 +0000
commita2baea7faff31d26459dab3668a39eae85e4991b (patch)
treeeaa2048ce9c715481f932dcfe20368e252b77d2f /svl/source/crypto
parentAdding upstream version 4:24.2.0. (diff)
downloadlibreoffice-a2baea7faff31d26459dab3668a39eae85e4991b.tar.xz
libreoffice-a2baea7faff31d26459dab3668a39eae85e4991b.zip
Adding upstream version 4:24.2.1.upstream/4%24.2.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'svl/source/crypto')
-rw-r--r--svl/source/crypto/cryptosign.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/svl/source/crypto/cryptosign.cxx b/svl/source/crypto/cryptosign.cxx
index a234afccbc..3fe6ae90ab 100644
--- a/svl/source/crypto/cryptosign.cxx
+++ b/svl/source/crypto/cryptosign.cxx
@@ -1037,6 +1037,7 @@ bool Signing::Sign(OStringBuffer& rCMSHexBuffer)
ts_digest.len = aTsHashResult.size();
unsigned char cOne = 1;
+ unsigned char cTRUE = 0xff; // under DER rules true is 0xff, false is 0x00
src.version.type = siUnsignedInteger;
src.version.data = &cOne;
src.version.len = sizeof(cOne);
@@ -1056,8 +1057,8 @@ bool Signing::Sign(OStringBuffer& rCMSHexBuffer)
src.nonce.len = sizeof(nNonce);
src.certReq.type = siUnsignedInteger;
- src.certReq.data = &cOne;
- src.certReq.len = sizeof(cOne);
+ src.certReq.data = &cTRUE;
+ src.certReq.len = sizeof(cTRUE);
src.extensions = nullptr;