summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-05-11 11:17:11 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-05-11 11:17:11 +0200
commit4345cdb85a19fd311244d9cdaa45d82f45309c80 (patch)
tree75c58e920753bde89dcaa54bd1df8f6ed9bf136e
parent311a9126dca1273593ac8deade5cb36ec740d786 (diff)
Clean up uses of SAL_U/SAL_W: xmlsecurity
Change-Id: I96043623a5b0e26ddc44de5c71743f3b0d8e1e50
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/sanextension_mscryptimpl.cxx10
-rw-r--r--xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx20
2 files changed, 15 insertions, 15 deletions
diff --git a/xmlsecurity/source/xmlsec/mscrypt/sanextension_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/sanextension_mscryptimpl.cxx
index fbff7f04f588..de0eb3873f2a 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/sanextension_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/sanextension_mscryptimpl.cxx
@@ -93,11 +93,14 @@ css::uno::Sequence< css::security::CertAltNameEntry > SAL_CALL SanExtensionImpl:
}
case CERT_ALT_NAME_RFC822_NAME :
arrCertAltNameEntry[i].Type = ExtAltNameType_RFC822_NAME;
- arrCertAltNameEntry[i].Value <<= OUString(SAL_U(pEntry->pwszRfc822Name));
+ arrCertAltNameEntry[i].Value <<= OUString(
+ reinterpret_cast<sal_Unicode const *>(
+ pEntry->pwszRfc822Name));
break;
case CERT_ALT_NAME_DNS_NAME :
arrCertAltNameEntry[i].Type = ExtAltNameType_DNS_NAME;
- arrCertAltNameEntry[i].Value <<= OUString(SAL_U(pEntry->pwszDNSName));
+ arrCertAltNameEntry[i].Value <<= OUString(
+ reinterpret_cast<sal_Unicode const *>(pEntry->pwszDNSName));
break;
case CERT_ALT_NAME_DIRECTORY_NAME :
{
@@ -106,7 +109,8 @@ css::uno::Sequence< css::security::CertAltNameEntry > SAL_CALL SanExtensionImpl:
}
case CERT_ALT_NAME_URL :
arrCertAltNameEntry[i].Type = ExtAltNameType_URL;
- arrCertAltNameEntry[i].Value <<= OUString(SAL_U(pEntry->pwszURL));
+ arrCertAltNameEntry[i].Value <<= OUString(
+ reinterpret_cast<sal_Unicode const *>(pEntry->pwszURL));
break;
case CERT_ALT_NAME_IP_ADDRESS :
{
diff --git a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
index 721f9f32bbaa..55b732987d0f 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/securityenvironment_mscryptimpl.cxx
@@ -282,22 +282,21 @@ void SecurityEnvironment_MSCryptImpl::setCertDb( HCERTSTORE aCertDb ) {
// Based on sample code from MSDN
-static void get_system_name(const void *pvSystemStore,
- DWORD dwFlags,
- LPCWSTR *ppwszSystemName)
+static OUString get_system_name(const void *pvSystemStore,
+ DWORD dwFlags)
{
- *ppwszSystemName = nullptr;
-
+ LPCWSTR ppwszSystemName;
if (dwFlags & CERT_SYSTEM_STORE_RELOCATE_FLAG)
{
_CERT_SYSTEM_STORE_RELOCATE_PARA const * pRelocatePara;
pRelocatePara = static_cast<_CERT_SYSTEM_STORE_RELOCATE_PARA const *>(pvSystemStore);
- *ppwszSystemName = pRelocatePara->pwszSystemStore;
+ ppwszSystemName = pRelocatePara->pwszSystemStore;
}
else
{
- *ppwszSystemName = static_cast<LPCWSTR>(pvSystemStore);
+ ppwszSystemName = static_cast<LPCWSTR>(pvSystemStore);
}
+ return reinterpret_cast<sal_Unicode const *>(ppwszSystemName);
}
extern "C" BOOL WINAPI cert_enum_physical_store_callback(const void *,
@@ -307,7 +306,7 @@ extern "C" BOOL WINAPI cert_enum_physical_store_callback(const void *,
void *,
void *)
{
- OUString name(SAL_U(pwszStoreName));
+ OUString name(reinterpret_cast<sal_Unicode const *>(pwszStoreName));
if (dwFlags & CERT_PHYSICAL_STORE_PREDEFINED_ENUM_FLAG)
name += " (implicitly created)";
SAL_INFO("xmlsecurity.xmlsec", " Physical store: " << name);
@@ -321,10 +320,7 @@ extern "C" BOOL WINAPI cert_enum_system_store_callback(const void *pvSystemStore
void *,
void *)
{
- LPCWSTR pwszSystemStore;
-
- get_system_name(pvSystemStore, dwFlags, &pwszSystemStore);
- SAL_INFO("xmlsecurity.xmlsec", "System store: " << OUString(SAL_U(pwszSystemStore)));
+ SAL_INFO("xmlsecurity.xmlsec", "System store: " << get_system_name(pvSystemStore, dwFlags));
if (!CertEnumPhysicalStore(pvSystemStore,
dwFlags,