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: ...@@ -93,11 +93,14 @@ css::uno::Sequence< css::security::CertAltNameEntry > SAL_CALL SanExtensionImpl:
} }
case CERT_ALT_NAME_RFC822_NAME : case CERT_ALT_NAME_RFC822_NAME :
arrCertAltNameEntry[i].Type = ExtAltNameType_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; break;
case CERT_ALT_NAME_DNS_NAME : case CERT_ALT_NAME_DNS_NAME :
arrCertAltNameEntry[i].Type = ExtAltNameType_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; break;
case CERT_ALT_NAME_DIRECTORY_NAME : case CERT_ALT_NAME_DIRECTORY_NAME :
{ {
...@@ -106,7 +109,8 @@ css::uno::Sequence< css::security::CertAltNameEntry > SAL_CALL SanExtensionImpl: ...@@ -106,7 +109,8 @@ css::uno::Sequence< css::security::CertAltNameEntry > SAL_CALL SanExtensionImpl:
} }
case CERT_ALT_NAME_URL : case CERT_ALT_NAME_URL :
arrCertAltNameEntry[i].Type = ExtAltNameType_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; break;
case CERT_ALT_NAME_IP_ADDRESS : case CERT_ALT_NAME_IP_ADDRESS :
{ {
......
...@@ -282,22 +282,21 @@ void SecurityEnvironment_MSCryptImpl::setCertDb( HCERTSTORE aCertDb ) { ...@@ -282,22 +282,21 @@ void SecurityEnvironment_MSCryptImpl::setCertDb( HCERTSTORE aCertDb ) {
// Based on sample code from MSDN // Based on sample code from MSDN
static void get_system_name(const void *pvSystemStore, static OUString get_system_name(const void *pvSystemStore,
DWORD dwFlags, DWORD dwFlags)
LPCWSTR *ppwszSystemName)
{ {
*ppwszSystemName = nullptr; LPCWSTR ppwszSystemName;
if (dwFlags & CERT_SYSTEM_STORE_RELOCATE_FLAG) if (dwFlags & CERT_SYSTEM_STORE_RELOCATE_FLAG)
{ {
_CERT_SYSTEM_STORE_RELOCATE_PARA const * pRelocatePara; _CERT_SYSTEM_STORE_RELOCATE_PARA const * pRelocatePara;
pRelocatePara = static_cast<_CERT_SYSTEM_STORE_RELOCATE_PARA const *>(pvSystemStore); pRelocatePara = static_cast<_CERT_SYSTEM_STORE_RELOCATE_PARA const *>(pvSystemStore);
*ppwszSystemName = pRelocatePara->pwszSystemStore; ppwszSystemName = pRelocatePara->pwszSystemStore;
} }
else 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 *, 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 *, ...@@ -307,7 +306,7 @@ extern "C" BOOL WINAPI cert_enum_physical_store_callback(const void *,
void *, void *,
void *) void *)
{ {
OUString name(SAL_U(pwszStoreName)); OUString name(reinterpret_cast<sal_Unicode const *>(pwszStoreName));
if (dwFlags & CERT_PHYSICAL_STORE_PREDEFINED_ENUM_FLAG) if (dwFlags & CERT_PHYSICAL_STORE_PREDEFINED_ENUM_FLAG)
name += " (implicitly created)"; name += " (implicitly created)";
SAL_INFO("xmlsecurity.xmlsec", " Physical store: " << name); SAL_INFO("xmlsecurity.xmlsec", " Physical store: " << name);
...@@ -321,10 +320,7 @@ extern "C" BOOL WINAPI cert_enum_system_store_callback(const void *pvSystemStore ...@@ -321,10 +320,7 @@ extern "C" BOOL WINAPI cert_enum_system_store_callback(const void *pvSystemStore
void *, void *,
void *) void *)
{ {
LPCWSTR pwszSystemStore; SAL_INFO("xmlsecurity.xmlsec", "System store: " << get_system_name(pvSystemStore, dwFlags));
get_system_name(pvSystemStore, dwFlags, &pwszSystemStore);
SAL_INFO("xmlsecurity.xmlsec", "System store: " << OUString(SAL_U(pwszSystemStore)));
if (!CertEnumPhysicalStore(pvSystemStore, if (!CertEnumPhysicalStore(pvSystemStore,
dwFlags, 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