Author: cwittich
Date: Wed Mar 3 21:55:29 2010
New Revision: 45803
URL:
http://svn.reactos.org/svn/reactos?rev=45803&view=rev
Log:
[CRYPTUI]
sync cryptui to wine 1.1.39
Modified:
trunk/reactos/dll/win32/cryptui/cryptui.rc
trunk/reactos/dll/win32/cryptui/cryptui_De.rc
trunk/reactos/dll/win32/cryptui/cryptui_En.rc
trunk/reactos/dll/win32/cryptui/cryptui_Fr.rc
trunk/reactos/dll/win32/cryptui/cryptui_Ko.rc
trunk/reactos/dll/win32/cryptui/cryptui_Lt.rc
trunk/reactos/dll/win32/cryptui/cryptui_Nl.rc
trunk/reactos/dll/win32/cryptui/cryptui_Pt.rc
trunk/reactos/dll/win32/cryptui/cryptuires.h
trunk/reactos/dll/win32/cryptui/main.c
Modified: trunk/reactos/dll/win32/cryptui/cryptui.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cryptui/cryptui.…
==============================================================================
--- trunk/reactos/dll/win32/cryptui/cryptui.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/cryptui/cryptui.rc [iso-8859-1] Wed Mar 3 21:55:29 2010
@@ -46,10 +46,13 @@
/* @makedep: certheader.bmp */
IDB_CERT_HEADER BITMAP LOADONCALL DISCARDABLE certheader.bmp
+#include "cryptui_En.rc"
+#include "cryptui_Ko.rc"
+
+/* UTF-8 */
#include "cryptui_De.rc"
-#include "cryptui_En.rc"
#include "cryptui_Fr.rc"
-#include "cryptui_Ko.rc"
#include "cryptui_Lt.rc"
#include "cryptui_Nl.rc"
#include "cryptui_Pt.rc"
+
Modified: trunk/reactos/dll/win32/cryptui/cryptui_De.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cryptui/cryptui_…
==============================================================================
--- trunk/reactos/dll/win32/cryptui/cryptui_De.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/cryptui/cryptui_De.rc [iso-8859-1] Wed Mar 3 21:55:29 2010
@@ -119,6 +119,7 @@
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 "<Keiner>"
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"
Modified: trunk/reactos/dll/win32/cryptui/cryptui_En.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cryptui/cryptui_…
==============================================================================
--- trunk/reactos/dll/win32/cryptui/cryptui_En.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/cryptui/cryptui_En.rc [iso-8859-1] Wed Mar 3 21:55:29 2010
@@ -31,7 +31,7 @@
IDS_CERT_INFO_UNTRUSTED_ROOT "This certificate could not be validated to a
trusted root certificate."
IDS_CERT_INFO_PARTIAL_CHAIN "This certificate's issuer could not be
found."
IDS_CERT_INFO_BAD_PURPOSES "All the intended purposes of this certificate could
not be verified."
- IDS_CERT_INFO_PURPOSES "This cerificate is intended for the following
purposes:"
+ IDS_CERT_INFO_PURPOSES "This certificate is intended for the following
purposes:"
IDS_SUBJECT_HEADING "Issued to: "
IDS_ISSUER_HEADING "Issued by: "
IDS_VALID_FROM "Valid from "
@@ -117,6 +117,7 @@
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"
Modified: trunk/reactos/dll/win32/cryptui/cryptui_Fr.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cryptui/cryptui_…
==============================================================================
--- trunk/reactos/dll/win32/cryptui/cryptui_Fr.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/cryptui/cryptui_Fr.rc [iso-8859-1] Wed Mar 3 21:55:29 2010
@@ -120,6 +120,7 @@
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"
@@ -464,4 +465,3 @@
LVS_REPORT|LVS_NOCOLUMNHEADER|LVS_SINGLESEL|WS_CHILD|WS_VISIBLE|WS_TABSTOP|WS_BORDER,
115,67,174,100
END
-#pragma code_page(default)
Modified: trunk/reactos/dll/win32/cryptui/cryptui_Ko.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cryptui/cryptui_…
==============================================================================
--- trunk/reactos/dll/win32/cryptui/cryptui_Ko.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/cryptui/cryptui_Ko.rc [iso-8859-1] Wed Mar 3 21:55:29 2010
@@ -118,6 +118,7 @@
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¹ßÇàµÈ
ÈÄÀÇ ¼ÒÇÁÆ®¿þ¾î¸¦ °³Á¶·ÎºÎÅÍ º¸È£"
Modified: trunk/reactos/dll/win32/cryptui/cryptui_Lt.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cryptui/cryptui_…
==============================================================================
--- trunk/reactos/dll/win32/cryptui/cryptui_Lt.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/cryptui/cryptui_Lt.rc [iso-8859-1] Wed Mar 3 21:55:29 2010
@@ -120,6 +120,7 @@
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 "<joks>"
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"
Modified: trunk/reactos/dll/win32/cryptui/cryptui_Nl.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cryptui/cryptui_…
==============================================================================
--- trunk/reactos/dll/win32/cryptui/cryptui_Nl.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/cryptui/cryptui_Nl.rc [iso-8859-1] Wed Mar 3 21:55:29 2010
@@ -119,6 +119,7 @@
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"
Modified: trunk/reactos/dll/win32/cryptui/cryptui_Pt.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cryptui/cryptui_…
==============================================================================
--- trunk/reactos/dll/win32/cryptui/cryptui_Pt.rc [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/cryptui/cryptui_Pt.rc [iso-8859-1] Wed Mar 3 21:55:29 2010
@@ -119,6 +119,7 @@
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"
Modified: trunk/reactos/dll/win32/cryptui/cryptuires.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cryptui/cryptuir…
==============================================================================
--- trunk/reactos/dll/win32/cryptui/cryptuires.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/cryptui/cryptuires.h [iso-8859-1] Wed Mar 3 21:55:29 2010
@@ -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
Modified: trunk/reactos/dll/win32/cryptui/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/cryptui/main.c?r…
==============================================================================
--- trunk/reactos/dll/win32/cryptui/main.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/cryptui/main.c [iso-8859-1] Wed Mar 3 21:55:29 2010
@@ -104,6 +104,7 @@
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 @@
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,9 +168,11 @@
}
if (*str)
{
- CertGetNameStringW(cert, CERT_NAME_FRIENDLY_DISPLAY_TYPE, 0, NULL,
- *str, len);
- item.pszText = *str;
+ 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);
}
@@ -348,6 +352,8 @@
return advancedUsage;
}
+static int CALLBACK cert_mgr_sort_by_subject(LPARAM lp1, LPARAM lp2, LPARAM lp);
+
static void show_store_certs(HWND hwnd, HCERTSTORE store)
{
HWND lv = GetDlgItem(hwnd, IDC_MGR_CERTS);
@@ -443,6 +449,8 @@
HeapFree(GetProcessHeap(), 0, advanced->rgpszUsageIdentifier);
HeapFree(GetProcessHeap(), 0, advanced);
}
+ SendMessageW(lv, LVM_SORTITEMSEX, (WPARAM)lv,
+ (LPARAM)cert_mgr_sort_by_subject);
}
static const WCHAR my[] = { 'M','y',0 };
@@ -1062,6 +1070,48 @@
}
}
+static int cert_mgr_sort_by_text(HWND lv, int col, int index1, int index2)
+{
+ LVITEMW item;
+ WCHAR buf1[MAX_STRING_LEN];
+ WCHAR buf2[MAX_STRING_LEN];
+
+ item.cchTextMax = sizeof(buf1) / sizeof(buf1[0]);
+ item.mask = LVIF_TEXT;
+ item.pszText = buf1;
+ item.iItem = index1;
+ item.iSubItem = col;
+ SendMessageW(lv, LVM_GETITEMW, 0, (LPARAM)&item);
+ item.pszText = buf2;
+ item.iItem = index2;
+ SendMessageW(lv, LVM_GETITEMW, 0, (LPARAM)&item);
+ return strcmpW(buf1, buf2);
+}
+
+static int CALLBACK cert_mgr_sort_by_subject(LPARAM lp1, LPARAM lp2, LPARAM lp)
+{
+ return cert_mgr_sort_by_text((HWND)lp, 0, lp1, lp2);
+}
+
+static int CALLBACK cert_mgr_sort_by_issuer(LPARAM lp1, LPARAM lp2, LPARAM lp)
+{
+ return cert_mgr_sort_by_text((HWND)lp, 1, lp1, lp2);
+}
+
+static int CALLBACK cert_mgr_sort_by_date(LPARAM lp1, LPARAM lp2, LPARAM lp)
+{
+ PCCERT_CONTEXT cert1 = (PCCERT_CONTEXT)lp1;
+ PCCERT_CONTEXT cert2 = (PCCERT_CONTEXT)lp2;
+ return CompareFileTime(&cert1->pCertInfo->NotAfter,
+ &cert2->pCertInfo->NotAfter);
+}
+
+static int CALLBACK cert_mgr_sort_by_friendly_name(LPARAM lp1, LPARAM lp2,
+ LPARAM lp)
+{
+ return cert_mgr_sort_by_text((HWND)lp, 3, lp1, lp2);
+}
+
static LRESULT CALLBACK cert_mgr_dlg_proc(HWND hwnd, UINT msg, WPARAM wp,
LPARAM lp)
{
@@ -1139,6 +1189,35 @@
if (lvk->wVKey == VK_DELETE)
cert_mgr_do_remove(hwnd);
+ break;
+ }
+ case LVN_COLUMNCLICK:
+ {
+ NMLISTVIEW *nmlv = (NMLISTVIEW *)lp;
+ HWND lv = GetDlgItem(hwnd, IDC_MGR_CERTS);
+
+ /* FIXME: doesn't support swapping sort order between ascending
+ * and descending.
+ */
+ switch (nmlv->iSubItem)
+ {
+ case 0:
+ SendMessageW(lv, LVM_SORTITEMSEX, (WPARAM)lv,
+ (LPARAM)cert_mgr_sort_by_subject);
+ break;
+ case 1:
+ SendMessageW(lv, LVM_SORTITEMSEX, (WPARAM)lv,
+ (LPARAM)cert_mgr_sort_by_issuer);
+ break;
+ case 2:
+ SendMessageW(lv, LVM_SORTITEMS, 0,
+ (LPARAM)cert_mgr_sort_by_date);
+ break;
+ case 3:
+ SendMessageW(lv, LVM_SORTITEMSEX, (WPARAM)lv,
+ (LPARAM)cert_mgr_sort_by_friendly_name);
+ break;
+ }
break;
}
}
@@ -1385,7 +1464,7 @@
static void free_store_info(HWND tree)
{
HTREEITEM next = (HTREEITEM)SendMessageW(tree, TVM_GETNEXTITEM, TVGN_CHILD,
- (LPARAM)NULL);
+ 0);
while (next)
{
@@ -1473,7 +1552,7 @@
{
HWND tree = GetDlgItem(hwnd, IDC_STORE_LIST);
HTREEITEM selection = (HTREEITEM)SendMessageW(tree,
- TVM_GETNEXTITEM, TVGN_CARET, (LPARAM)NULL);
+ TVM_GETNEXTITEM, TVGN_CARET, 0);
selectInfo = (struct SelectStoreInfo *)GetWindowLongPtrW(hwnd,
DWLP_USER);
@@ -4034,8 +4113,7 @@
memset(&item, 0, sizeof(item));
item.mask = TVIF_HANDLE | TVIF_PARAM;
- item.hItem = (HTREEITEM)SendMessageW(tree, TVM_GETNEXTITEM, TVGN_CARET,
- (LPARAM)NULL);
+ item.hItem = (HTREEITEM)SendMessageW(tree, TVM_GETNEXTITEM, TVGN_CARET, 0);
SendMessageW(tree, TVM_GETITEMW, 0, (LPARAM)&item);
data = get_hierarchy_data_from_tree_item(tree, item.hItem);
selection = lparam_to_index(data, item.lParam);
@@ -4137,7 +4215,7 @@
memset(&item, 0, sizeof(item));
item.mask = TVIF_HANDLE | TVIF_PARAM;
item.hItem = (HTREEITEM)SendMessageW(tree, TVM_GETNEXTITEM, TVGN_ROOT,
- (LPARAM)NULL);
+ 0);
data = get_hierarchy_data_from_tree_item(tree, item.hItem);
/* Delete the contents of the tree */
SendMessageW(tree, TVM_DELETEITEM, 0, (LPARAM)TVI_ROOT);