diff options
Diffstat (limited to 'xmlsecurity/source')
-rw-r--r-- | xmlsecurity/source/xmlsec/mscrypt/sanextension_mscryptimpl.cxx | 2 | ||||
-rw-r--r-- | xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/xmlsecurity/source/xmlsec/mscrypt/sanextension_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/sanextension_mscryptimpl.cxx index 4b6ef98cf905..8c58ffada322 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/sanextension_mscryptimpl.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/sanextension_mscryptimpl.cxx @@ -69,7 +69,7 @@ css::uno::Sequence< css::security::CertAltNameEntry > SAL_CALL SanExtensionImpl: DWORD size; CryptDecodeObjectEx(X509_ASN_ENCODING, X509_ALTERNATE_NAME, reinterpret_cast<unsigned char*>(m_xExtnValue.getArray()), m_xExtnValue.getLength(), CRYPT_DECODE_ALLOC_FLAG | CRYPT_DECODE_NOCOPY_FLAG, nullptr,&subjectName, &size); - auto arrCertAltNameEntry = std::unique_ptr<CertAltNameEntry[]>(new CertAltNameEntry[subjectName->cAltEntry]); + auto arrCertAltNameEntry = std::make_unique<CertAltNameEntry[]>(subjectName->cAltEntry); for (unsigned int i = 0; i < static_cast<unsigned int>(subjectName->cAltEntry); i++){ PCERT_ALT_NAME_ENTRY pEntry = &subjectName->rgAltEntry[i]; diff --git a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx index d44d093641c1..17c8eea1b71b 100644 --- a/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx +++ b/xmlsecurity/source/xmlsec/mscrypt/x509certificate_mscryptimpl.cxx @@ -213,7 +213,7 @@ OUString SAL_CALL X509Certificate_MSCryptImpl::getIssuerName() { // Here the cbIssuer count the last 0x00 , take care. if( cchIssuer != 0 ) { - auto issuer = std::unique_ptr<wchar_t[]>(new wchar_t[ cchIssuer ]); + auto issuer = std::make_unique<wchar_t[]>(cchIssuer); cchIssuer = CertNameToStrW( X509_ASN_ENCODING | PKCS_7_ASN_ENCODING , @@ -251,7 +251,7 @@ OUString SAL_CALL X509Certificate_MSCryptImpl::getSubjectName() if( cchSubject != 0 ) { - auto subject = std::unique_ptr<wchar_t[]>(new wchar_t[ cchSubject ]); + auto subject = std::make_unique<wchar_t[]>(cchSubject); cchSubject = CertNameToStrW( X509_ASN_ENCODING | PKCS_7_ASN_ENCODING , |