[pkg-opensc-commit] [opensc] 266/295: sc-hsm: add GoID ATRs

Eric Dorland eric at moszumanska.debian.org
Sat Jun 24 21:11:38 UTC 2017


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository opensc.

commit 3131282760e5958e2178ef802ae7d23a7bb3061b
Author: Frank Morgner <frankmorgner at gmail.com>
Date:   Mon May 29 12:30:24 2017 +0200

    sc-hsm: add GoID ATRs
    
    disables forcing sc-hsm for standard JCOP ATRs, see
    https://github.com/OpenSC/OpenSC/commit/b7de5888a0d9012c99e5f624bab1b98671fc7446#commitcomment-22258928
---
 src/libopensc/card-sc-hsm.c | 74 ++++++++++++++++++++++++++++++++++++---------
 win32/customactions.cpp     | 24 +++++++++++++++
 2 files changed, 84 insertions(+), 14 deletions(-)

diff --git a/src/libopensc/card-sc-hsm.c b/src/libopensc/card-sc-hsm.c
index b23c8f7..cd1988c 100644
--- a/src/libopensc/card-sc-hsm.c
+++ b/src/libopensc/card-sc-hsm.c
@@ -64,16 +64,66 @@ static struct sc_atr_table sc_hsm_atrs[] = {
 	/* standard version */
 	{"3B:FE:18:00:00:81:31:FE:45:80:31:81:54:48:53:4D:31:73:80:21:40:81:07:FA", NULL, NULL, SC_CARD_TYPE_SC_HSM, 0, NULL},
 	{"3B:8E:80:01:80:31:81:54:48:53:4D:31:73:80:21:40:81:07:18", NULL, NULL, SC_CARD_TYPE_SC_HSM, 0, NULL},
-	{NULL, NULL, NULL, 0, 0, NULL}
-};
-
-/* Known ATRs for JavaCards that qualify for SmartCard-HSMs */
-static struct sc_atr_table sc_hsm_jc_atrs[] = {
-	/* standard version */
-	{"3b:f8:13:00:00:81:31:fe:45:4a:43:4f:50:76:32:34:31:b7", NULL, NULL, SC_CARD_TYPE_SC_HSM, 0, NULL},	// JCOP 2.4.1 Default ATR contact based
-	{"3b:88:80:01:4a:43:4f:50:76:32:34:31:5e", NULL, NULL, SC_CARD_TYPE_SC_HSM, 0, NULL},	// JCOP 2.4.1 Default ATR contactless
-	/* SoC Sample Card */
-	{"3B:80:80:01:01", NULL, NULL, SC_CARD_TYPE_SC_HSM_SOC, 0, NULL},
+	{
+		"3B:84:80:01:47:6f:49:44:00",
+		"FF:FF:FF:FF:FF:FF:FF:FF:00",
+		"GoID", SC_CARD_TYPE_SC_HSM_SOC, 0, NULL
+	},
+	{
+		"3B:85:80:01:47:6f:49:44:00:00",
+		"FF:FF:FF:FF:FF:FF:FF:FF:00:00",
+		"GoID", SC_CARD_TYPE_SC_HSM_SOC, 0, NULL
+	},
+	{
+		"3B:86:80:01:47:6f:49:44:00:00:00",
+		"FF:FF:FF:FF:FF:FF:FF:FF:00:00:00",
+		"GoID", SC_CARD_TYPE_SC_HSM_SOC, 0, NULL
+	},
+	{
+		"3B:87:80:01:47:6f:49:44:00:00:00:00",
+		"FF:FF:FF:FF:FF:FF:FF:FF:00:00:00:00",
+		"GoID", SC_CARD_TYPE_SC_HSM_SOC, 0, NULL
+	},
+	{
+		"3B:88:80:01:47:6f:49:44:00:00:00:00:00",
+		"FF:FF:FF:FF:FF:FF:FF:FF:00:00:00:00:00",
+		"GoID", SC_CARD_TYPE_SC_HSM_SOC, 0, NULL
+	},
+	{
+		"3B:89:80:01:47:6f:49:44:00:00:00:00:00:00",
+		"FF:FF:FF:FF:FF:FF:FF:FF:00:00:00:00:00:00",
+		"GoID", SC_CARD_TYPE_SC_HSM_SOC, 0, NULL
+	},
+	{
+		"3B:8a:80:01:47:6f:49:44:00:00:00:00:00:00:00",
+		"FF:FF:FF:FF:FF:FF:FF:FF:00:00:00:00:00:00:00",
+		"GoID", SC_CARD_TYPE_SC_HSM_SOC, 0, NULL
+	},
+	{
+		"3B:8b:80:01:47:6f:49:44:00:00:00:00:00:00:00:00",
+		"FF:FF:FF:FF:FF:FF:FF:FF:00:00:00:00:00:00:00:00",
+		"GoID", SC_CARD_TYPE_SC_HSM_SOC, 0, NULL
+	},
+	{
+		"3B:8c:80:01:47:6f:49:44:00:00:00:00:00:00:00:00:00",
+		"FF:FF:FF:FF:FF:FF:FF:FF:00:00:00:00:00:00:00:00:00",
+		"GoID", SC_CARD_TYPE_SC_HSM_SOC, 0, NULL
+	},
+	{
+		"3B:8d:80:01:47:6f:49:44:00:00:00:00:00:00:00:00:00:00",
+		"FF:FF:FF:FF:FF:FF:FF:FF:00:00:00:00:00:00:00:00:00:00",
+		"GoID", SC_CARD_TYPE_SC_HSM_SOC, 0, NULL
+	},
+	{
+		"3B:8e:80:01:47:6f:49:44:00:00:00:00:00:00:00:00:00:00:00",
+		"FF:FF:FF:FF:FF:FF:FF:FF:00:00:00:00:00:00:00:00:00:00:00",
+		"GoID", SC_CARD_TYPE_SC_HSM_SOC, 0, NULL
+	},
+	{
+		"3B:8f:80:01:47:6f:49:44:00:00:00:00:00:00:00:00:00:00:00:00",
+		"FF:FF:FF:FF:FF:FF:FF:FF:00:00:00:00:00:00:00:00:00:00:00:00",
+		"GoID", SC_CARD_TYPE_SC_HSM_SOC, 0, NULL
+	},
 	{NULL, NULL, NULL, 0, 0, NULL}
 };
 
@@ -183,10 +233,6 @@ static int sc_hsm_match_card(struct sc_card *card)
 	if (i >= 0)
 		return 1;
 
-	i = _sc_match_atr(card, sc_hsm_jc_atrs, &card->type);
-	if (i >= 0)
-		return 1;
-
 	sc_path_set(&path, SC_PATH_TYPE_DF_NAME, sc_hsm_aid.value, sc_hsm_aid.len, 0, 0);
 	r = sc_hsm_select_file(card, &path, NULL);
 	LOG_TEST_RET(card->ctx, r, "Could not select SmartCard-HSM application");
diff --git a/win32/customactions.cpp b/win32/customactions.cpp
index 9c8377c..f576fc6 100644
--- a/win32/customactions.cpp
+++ b/win32/customactions.cpp
@@ -76,6 +76,30 @@ MD_REGISTRATION minidriver_registration[] = {
                                           19, {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff}},
 	{TEXT("SmartCard-HSM-FP"),                {0x3B,0x80,0x80,0x01,0x01},
                                            5, {0xff,0xff,0xff,0xff,0xff}},
+	{TEXT("GoID"),                            {0x3B,0x84,0x80,0x01,0x47,0x6f,0x49,0x44,0x00},
+                                           9, {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00}},
+	{TEXT("GoID (01)"),                       {0x3B,0x85,0x80,0x01,0x47,0x6f,0x49,0x44,0x00,0x00},
+                                          10, {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00}},
+	{TEXT("GoID (02)"),                       {0x3B,0x86,0x80,0x01,0x47,0x6f,0x49,0x44,0x00,0x00,0x00},
+                                          11, {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00}},
+	{TEXT("GoID (03)"),                       {0x3B,0x87,0x80,0x01,0x47,0x6f,0x49,0x44,0x00,0x00,0x00,0x00},
+                                          12, {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00}},
+	{TEXT("GoID (04)"),                       {0x3B,0x88,0x80,0x01,0x47,0x6f,0x49,0x44,0x00,0x00,0x00,0x00,0x00},
+                                          13, {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00}},
+	{TEXT("GoID (05)"),                       {0x3B,0x89,0x80,0x01,0x47,0x6f,0x49,0x44,0x00,0x00,0x00,0x00,0x00,0x00},
+                                          14, {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00}},
+	{TEXT("GoID (06)"),                       {0x3B,0x8a,0x80,0x01,0x47,0x6f,0x49,0x44,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+                                          15, {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+	{TEXT("GoID (07)"),                       {0x3B,0x8b,0x80,0x01,0x47,0x6f,0x49,0x44,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+                                          16, {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+	{TEXT("GoID (08)"),                       {0x3B,0x8c,0x80,0x01,0x47,0x6f,0x49,0x44,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+                                          17, {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+	{TEXT("GoID (09)"),                       {0x3B,0x8d,0x80,0x01,0x47,0x6f,0x49,0x44,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+                                          18, {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+	{TEXT("GoID (10)"),                       {0x3B,0x8e,0x80,0x01,0x47,0x6f,0x49,0x44,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+                                          19, {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
+	{TEXT("GoID (11)"),                       {0x3B,0x8f,0x80,0x01,0x47,0x6f,0x49,0x44,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
+                                          20, {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}},
 	/* from minidriver-westcos.reg */
 	{TEXT("CEV WESTCOS"),                     {0x3f,0x69,0x00,0x00,0x00,0x64,0x01,0x00,0x00,0x00,0x80,0x90,0x00},
                                           13, {0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0x00,0x00,0xf0,0xff,0xff}},

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/opensc.git



More information about the pkg-opensc-commit mailing list