cryptui: Display <None> for a cert's friendly name if no friendly name property is set.

This commit is contained in:
Juan Lang 2009-10-27 11:13:00 -07:00 committed by Alexandre Julliard
parent 0359a47d0d
commit 7690ff2f0e
9 changed files with 17 additions and 5 deletions

View File

@ -119,6 +119,7 @@ STRINGTABLE DISCARDABLE
IDS_WARN_REMOVE_DEFAULT "Sind Sie sicher, dass Sie dieses Zertifikat entfernen möchten?"
IDS_WARN_REMOVE_PLURAL_DEFAULT "Sind Sie sicher, dass Sie diese Zertifikate entfernen möchten?"
IDS_CERT_MGR "Zertifikate"
IDS_FRIENDLY_NAME_NONE "<Keine>"
IDS_PURPOSE_SERVER_AUTH "Garantiert die Identität eines entfernten Computers"
IDS_PURPOSE_CLIENT_AUTH "Beweist Ihre Identität für einen entfernten Computers"
IDS_PURPOSE_CODE_SIGNING "Schützt Software vor Manipulation nach der Veröffentlichung"

View File

@ -117,6 +117,7 @@ STRINGTABLE DISCARDABLE
IDS_WARN_REMOVE_DEFAULT "Are you sure you want to remove this certificate?"
IDS_WARN_REMOVE_PLURAL_DEFAULT "Are you sure you want to remove these certificates?"
IDS_CERT_MGR "Certificates"
IDS_FRIENDLY_NAME_NONE "<None>"
IDS_PURPOSE_SERVER_AUTH "Ensures the identify of a remote computer"
IDS_PURPOSE_CLIENT_AUTH "Proves your identity to a remote computer"
IDS_PURPOSE_CODE_SIGNING "Ensures software came from software publisher\nProtects software from alteration after publication"

View File

@ -120,6 +120,7 @@ STRINGTABLE DISCARDABLE
IDS_WARN_REMOVE_DEFAULT "Voulez-vous réellement supprimer ce certificat ?"
IDS_WARN_REMOVE_PLURAL_DEFAULT "Voulez-vous réellement supprimer ces certificats ?"
IDS_CERT_MGR "Certificats"
IDS_FRIENDLY_NAME_NONE "<Aucun>"
IDS_PURPOSE_SERVER_AUTH "Prouve l'identité d'un ordinateur distant"
IDS_PURPOSE_CLIENT_AUTH "Prouve votre identité à un ordinateur distant"
IDS_PURPOSE_CODE_SIGNING "Garantit que des logiciels proviennent bien d'un éditeur de logiciels donné\nProtège le logiciel contre toute altération après publication"

View File

@ -118,6 +118,7 @@ STRINGTABLE DISCARDABLE
IDS_WARN_REMOVE_DEFAULT "이 인증거를 제거하기를 원합니까?"
IDS_WARN_REMOVE_PLURAL_DEFAULT "이 인증서들를 제거하기를 원합니까?"
IDS_CERT_MGR "인증서"
IDS_FRIENDLY_NAME_NONE "<없음>"
IDS_PURPOSE_SERVER_AUTH "원격 컴퓨터의 동일성 보증"
IDS_PURPOSE_CLIENT_AUTH "당신의 신원을 원격컴퓨터로 인증"
IDS_PURPOSE_CODE_SIGNING "소프트웨어 발행자로부터 온 소프트웨어 보증\n발행된 후의 소프트웨어를 개조로부터 보호"

View File

@ -120,6 +120,7 @@ STRINGTABLE DISCARDABLE
IDS_WARN_REMOVE_DEFAULT "Ar tikrai norite pašalinti šį liudijimą?"
IDS_WARN_REMOVE_PLURAL_DEFAULT "Ar tikrai norite pašalinti šiuos liudijimus?"
IDS_CERT_MGR "Liudijimai"
IDS_FRIENDLY_NAME_NONE "<jokios>"
IDS_PURPOSE_SERVER_AUTH "Garantuoja nutolusio kompiuterio tapatumą"
IDS_PURPOSE_CLIENT_AUTH "Įrodo jūsų tapatumą nutolusiam kompiuteriui"
IDS_PURPOSE_CODE_SIGNING "Garantuoja, kad programinė įranga yra iš šio leidėjo\nApsaugo programinę įrangą nuo pakeitimų po išleidimo"

View File

@ -119,6 +119,7 @@ STRINGTABLE DISCARDABLE
IDS_WARN_REMOVE_DEFAULT "Weet u zeker dat u dit certificaat wilt verwijderen?"
IDS_WARN_REMOVE_PLURAL_DEFAULT "Weet u zeker dat u deze certificaten wilt verwijderen?"
IDS_CERT_MGR "Certificaten"
IDS_FRIENDLY_NAME_NONE "<Geen>"
IDS_PURPOSE_SERVER_AUTH "Bewijst de identiteit van een remote computer"
IDS_PURPOSE_CLIENT_AUTH "Bewijst uw identiteit aan een remote computer"
IDS_PURPOSE_CODE_SIGNING "Bewijst dat de software kwam van de software uitgever\nBeschermt software tegen wijzigingen na publicatie"

View File

@ -119,6 +119,7 @@ STRINGTABLE DISCARDABLE
IDS_WARN_REMOVE_DEFAULT "Tem a certeza que deseja remover este certificado?"
IDS_WARN_REMOVE_PLURAL_DEFAULT "Tem a certeza que deseja remover estes certificados?"
IDS_CERT_MGR "Certificados"
IDS_FRIENDLY_NAME_NONE "<Nenhum>"
IDS_PURPOSE_SERVER_AUTH "Assegura a identidade de um computador remoto"
IDS_PURPOSE_CLIENT_AUTH "Prova a sua identidade a um computador remoto"
IDS_PURPOSE_CODE_SIGNING "Assegura que o software veio de uma editora de software\nProtege o software de alterações após publicação"

View File

@ -116,6 +116,7 @@
#define IDS_WARN_REMOVE_DEFAULT 1092
#define IDS_WARN_REMOVE_PLURAL_DEFAULT 1093
#define IDS_CERT_MGR 1094
#define IDS_FRIENDLY_NAME_NONE 1095
#define IDS_PURPOSE_SERVER_AUTH 1100
#define IDS_PURPOSE_CLIENT_AUTH 1101

View File

@ -104,6 +104,7 @@ static void add_cert_to_view(HWND lv, PCCERT_CONTEXT cert, DWORD *allocatedLen,
WCHAR dateFmt[80]; /* sufficient for LOCALE_SSHORTDATE */
WCHAR date[80];
SYSTEMTIME sysTime;
LPWSTR none;
item.mask = LVIF_IMAGE | LVIF_PARAM | LVIF_TEXT;
item.iItem = SendMessageW(lv, LVM_GETITEMCOUNT, 0, 0);
@ -155,8 +156,9 @@ static void add_cert_to_view(HWND lv, PCCERT_CONTEXT cert, DWORD *allocatedLen,
item.iSubItem = 2;
SendMessageW(lv, LVM_SETITEMTEXTW, item.iItem, (LPARAM)&item);
len = CertGetNameStringW(cert, CERT_NAME_FRIENDLY_DISPLAY_TYPE, 0, NULL,
NULL, 0);
if (!CertGetCertificateContextProperty(cert, CERT_FRIENDLY_NAME_PROP_ID,
NULL, &len))
len = LoadStringW(hInstance, IDS_FRIENDLY_NAME_NONE, (LPWSTR)&none, 0);
if (len > *allocatedLen)
{
HeapFree(GetProcessHeap(), 0, *str);
@ -166,8 +168,10 @@ static void add_cert_to_view(HWND lv, PCCERT_CONTEXT cert, DWORD *allocatedLen,
}
if (*str)
{
CertGetNameStringW(cert, CERT_NAME_FRIENDLY_DISPLAY_TYPE, 0, NULL,
*str, len);
if (!CertGetCertificateContextProperty(cert, CERT_FRIENDLY_NAME_PROP_ID,
*str, &len))
item.pszText = none;
else
item.pszText = *str;
item.iSubItem = 3;
SendMessageW(lv, LVM_SETITEMTEXTW, item.iItem, (LPARAM)&item);