Kaydet (Commit) 4345cdb8 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Clean up uses of SAL_U/SAL_W: xmlsecurity

Change-Id: I96043623a5b0e26ddc44de5c71743f3b0d8e1e50
üst 311a9126
......@@ -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 :
{
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment