Commit a3a165fc authored by Alexander Nicolaysen Sørnes's avatar Alexander Nicolaysen Sørnes Committed by Alexandre Julliard

crypt32: Implement CryptFindLocalizedName.

parent 29b8c35b
......@@ -164,3 +164,11 @@ STRINGTABLE DISCARDABLE
IDS_LIFETIME_SIGNING "Lifetime Signing"
IDS_ANY_CERT_POLICY "All issuance policies"
}
STRINGTABLE DISCARDABLE
{
IDS_LOCALIZEDNAME_ROOT "Trusted Root Certification Authorities"
IDS_LOCALIZEDNAME_MY "Personal"
IDS_LOCALIZEDNAME_CA "Intermediate Certification Authorities"
IDS_LOCALIZEDNAME_ADDRESSBOOK "Other People"
}
......@@ -164,3 +164,11 @@ STRINGTABLE DISCARDABLE
IDS_LIFETIME_SIGNING "Livstidsignering"
IDS_ANY_CERT_POLICY "Alle framgangsmter for utsteding"
}
STRINGTABLE DISCARDABLE
{
IDS_LOCALIZEDNAME_ROOT "Klarerte rotsertifiseringsinstanser"
IDS_LOCALIZEDNAME_MY "Personlig"
IDS_LOCALIZEDNAME_CA "Mellomliggende sertifiseringsinstanser"
IDS_LOCALIZEDNAME_ADDRESSBOOK "Andre personer"
}
......@@ -160,4 +160,9 @@
#define IDS_LIFETIME_SIGNING 1139
#define IDS_ANY_CERT_POLICY 1140
#define IDS_LOCALIZEDNAME_ROOT 1141
#define IDS_LOCALIZEDNAME_MY 1142
#define IDS_LOCALIZEDNAME_CA 1143
#define IDS_LOCALIZEDNAME_ADDRESSBOOK 1144
#endif /* ndef __WINE_CRYPTRES_H__ */
......@@ -77,6 +77,13 @@ struct OIDFunction
struct list next;
};
static const WCHAR ROOT[] = {'R','O','O','T',0};
static const WCHAR MY[] = {'M','Y',0};
static const WCHAR CA[] = {'C','A',0};
static const WCHAR ADDRESSBOOK[] = {'A','D','D','R','E','S','S','B','O','O','K',0};
static const LPCWSTR LocalizedKeys[] = {ROOT,MY,CA,ADDRESSBOOK};
static WCHAR LocalizedNames[4][256];
static void free_function_sets(void)
{
struct OIDFunctionSet *setCursor, *setNext;
......@@ -987,12 +994,32 @@ BOOL WINAPI CryptUnregisterDefaultOIDFunction(DWORD dwEncodingType,
return ret;
}
static void oid_init_localizednames(HINSTANCE hInstance)
{
int i;
for(i = 0; i < sizeof(LocalizedKeys)/sizeof(LPCWSTR); i++)
{
LoadStringW(hInstance, IDS_LOCALIZEDNAME_ROOT+i, LocalizedNames[i], 256);
}
}
/********************************************************************
* CryptFindLocalizedName (CRYPT32.@)
*/
LPCWSTR WINAPI CryptFindLocalizedName(LPCWSTR pwszCryptName)
{
FIXME(" %s - stub\n",debugstr_w(pwszCryptName));
int i;
for(i = 0; i < sizeof(LocalizedKeys)/sizeof(LPCWSTR); i++)
{
if(!lstrcmpiW(LocalizedKeys[i], pwszCryptName))
{
return LocalizedNames[i];
}
}
FIXME("No name for: %s - stub\n",debugstr_w(pwszCryptName));
return NULL;
}
......@@ -1345,6 +1372,7 @@ static void init_oid_info(HINSTANCE hinst)
{
DWORD i;
oid_init_localizednames(hinst);
for (i = 0; i < sizeof(oidInfoConstructors) /
sizeof(oidInfoConstructors[0]); i++)
{
......
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