diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-08-08 23:10:52 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-08-09 09:13:51 +0200 |
commit | 954f59db6cddc79d1f629fafc53ad20b6c4a14de (patch) | |
tree | f0e299dc691c63c9ef8ebf22d4e65e01fcd9f8a2 /svl | |
parent | menubar draw: add choosemodebar commands (diff) | |
download | core-954f59db6cddc79d1f629fafc53ad20b6c4a14de.tar.gz core-954f59db6cddc79d1f629fafc53ad20b6c4a14de.zip |
svl windows: remove last traces of pre-CNG signing
Mostly only the certificate selector was left + the global runtime switch.
Change-Id: I11e8e0920806eb61848512df6dea48c594febfe4
Reviewed-on: https://gerrit.libreoffice.org/58751
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/crypto/cryptosign.cxx | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/svl/source/crypto/cryptosign.cxx b/svl/source/crypto/cryptosign.cxx index a9258a5c607c..0e86664c28c1 100644 --- a/svl/source/crypto/cryptosign.cxx +++ b/svl/source/crypto/cryptosign.cxx @@ -1402,15 +1402,9 @@ bool Signing::Sign(OStringBuffer& rCMSHexBuffer) aPara.cMsgCert = 1; aPara.rgpMsgCert = &pCertContext; - HCRYPTPROV hCryptProv = 0; NCRYPT_KEY_HANDLE hCryptKey = 0; - DWORD dwFlags = CRYPT_ACQUIRE_CACHE_FLAG; - HCRYPTPROV_OR_NCRYPT_KEY_HANDLE* phCryptProvOrNCryptKey = &hCryptProv; - if (svl::crypto::isMSCng()) - { - dwFlags |= CRYPT_ACQUIRE_ONLY_NCRYPT_KEY_FLAG; - phCryptProvOrNCryptKey = &hCryptKey; - } + DWORD dwFlags = CRYPT_ACQUIRE_CACHE_FLAG | CRYPT_ACQUIRE_ONLY_NCRYPT_KEY_FLAG; + HCRYPTPROV_OR_NCRYPT_KEY_HANDLE* phCryptProvOrNCryptKey = &hCryptKey; DWORD nKeySpec; BOOL bFreeNeeded; @@ -1432,10 +1426,7 @@ bool Signing::Sign(OStringBuffer& rCMSHexBuffer) memset(&aSignerInfo, 0, sizeof(aSignerInfo)); aSignerInfo.cbSize = sizeof(aSignerInfo); aSignerInfo.pCertInfo = pCertContext->pCertInfo; - if (!svl::crypto::isMSCng()) - aSignerInfo.hCryptProv = hCryptProv; - else - aSignerInfo.hNCryptKey = hCryptKey; + aSignerInfo.hNCryptKey = hCryptKey; aSignerInfo.dwKeySpec = nKeySpec; aSignerInfo.HashAlgorithm.pszObjId = const_cast<LPSTR>(szOID_NIST_sha256); aSignerInfo.HashAlgorithm.Parameters.cbData = 0; @@ -2421,12 +2412,6 @@ bool Signing::Verify(SvStream& rStream, #endif } -bool isMSCng() -{ - static bool bNoMSCng = getenv("SVL_CRYPTO_NOCNG"); - return !bNoMSCng; -} - } } |