summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Behrens <Thorsten.Behrens@CIB.de>2017-12-07 14:31:36 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2017-12-07 15:00:44 +0100
commitd664cecb69a6f28cf06d2dcfb1ecd3801b1f5769 (patch)
treeb3a1afd2d36a654fe64aae42e24b5e5bd98cdedd
parent0e68f42446277a34747c5ecfb8f838f35d74f88d (diff)
return key fingerprint / hashes including null character
Change-Id: I6b32444bab6848e2b5ddec02fd949c71114a66b2
-rw-r--r--xmlsecurity/source/gpg/CertificateImpl.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/xmlsecurity/source/gpg/CertificateImpl.cxx b/xmlsecurity/source/gpg/CertificateImpl.cxx
index 16eeda80441f..c831011ca50e 100644
--- a/xmlsecurity/source/gpg/CertificateImpl.cxx
+++ b/xmlsecurity/source/gpg/CertificateImpl.cxx
@@ -158,7 +158,7 @@ Sequence< sal_Int8 > SAL_CALL CertificateImpl::getSHA1Thumbprint()
// This is mapped to the fingerprint for gpg
const char* keyId = m_pKey.primaryFingerprint();
return comphelper::arrayToSequence<sal_Int8>(
- keyId, strlen(keyId));
+ keyId, strlen(keyId)+1);
}
Sequence<sal_Int8> CertificateImpl::getSHA256Thumbprint()
@@ -167,7 +167,7 @@ Sequence<sal_Int8> CertificateImpl::getSHA256Thumbprint()
// SHA1 actually)
const char* keyId = m_pKey.primaryFingerprint();
return comphelper::arrayToSequence<sal_Int8>(
- keyId, strlen(keyId));
+ keyId, strlen(keyId)+1);
}
Sequence< sal_Int8 > SAL_CALL CertificateImpl::getMD5Thumbprint()
@@ -175,7 +175,7 @@ Sequence< sal_Int8 > SAL_CALL CertificateImpl::getMD5Thumbprint()
// This is mapped to the shorter keyID for gpg
const char* keyId = m_pKey.keyID();
return comphelper::arrayToSequence<sal_Int8>(
- keyId, strlen(keyId));
+ keyId, strlen(keyId)+1);
}
CertificateKind SAL_CALL CertificateImpl::getCertificateKind()