diff options
author | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2017-12-07 14:31:36 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2017-12-07 16:17:19 +0100 |
commit | ac761ccb088deeb5f363a648feadde327d59a1ea (patch) | |
tree | e42b72ac26ef5dfc6c178bed74dc7cd74cfeaeaa /xmlsecurity | |
parent | a50c1c1b34a01dc2d8ffa59aa4421bc4906fd236 (diff) |
gpg4libre: return key fingerprint / hashes including null character
feature/gpg4libre-6-0
Change-Id: I6b32444bab6848e2b5ddec02fd949c71114a66b2
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/source/gpg/CertificateImpl.cxx | 6 |
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() |