[pkg-opensc-commit] [opensc] 173/295: pteid: order objects by address (supersede #949) (#954)

Eric Dorland eric at moszumanska.debian.org
Sat Jun 24 21:11:28 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 4202ea25d0142fc2e4bafb59e61c5827ffa2a612
Author: Nuno Goncalves <nunojpg at gmail.com>
Date:   Thu Feb 9 20:54:06 2017 +0100

    pteid: order objects by address (supersede #949) (#954)
    
    * pteid: remove OID setting for data objects as they are not defined for this token
    
    Signed-off-by: Nuno Goncalves <nunojpg at gmail.com>
    
    * pteid: order data objects code list by address and rename new objects
    
    The ICAO MRTD specification defines the Security Object Document
    abreviation as SOd and not SOD. This is a breaking change since
    the labels are case sensitive, but this object was not yet available
    on the last stable release.
    
    Trace is also not a acronym or abreviation, so it should be defined with
    normal casing. Also a breaking change and also acceptable because it is
    unstable code only.
    
    Signed-off-by: Nuno Goncalves <nunojpg at gmail.com>
---
 src/libopensc/pkcs15-pteid.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/src/libopensc/pkcs15-pteid.c b/src/libopensc/pkcs15-pteid.c
index 8ad5a2c..d1b8f3b 100644
--- a/src/libopensc/pkcs15-pteid.c
+++ b/src/libopensc/pkcs15-pteid.c
@@ -288,26 +288,25 @@ static int sc_pkcs15emu_pteid_init(sc_pkcs15_card_t * p15card)
 
 	/* Add data objects */
 	for (i = 0; i < 5; i++) {
-		static const char *object_ids[5] = {"1", "2", "3", "4", "5"};
 		static const char *object_labels[5] = {
+			"Trace",
 			"Citizen Data",
 			"Citizen Address Data",
+			"SOd",
 			"Citizen Notepad",
-			"SOD",
-			"TRACE",
 		};
-		static const char *object_authids[5] = {NULL, "3", NULL, NULL, NULL};
+		static const char *object_authids[5] = {NULL, NULL, "3", NULL, NULL};
 		static const char *object_paths[5] = {
+			"3f000003",
 			"3f005f00ef02",
 			"3f005f00ef05",
-			"3f005f00ef07",
 			"3f005f00ef06",
-			"3F000003",
+			"3f005f00ef07",
 		};
 		static const int object_flags[5] = {
 			0,
-			SC_PKCS15_CO_FLAG_PRIVATE,
 			0,
+			SC_PKCS15_CO_FLAG_PRIVATE,
 			0,
 			0,
 		};
@@ -317,7 +316,6 @@ static int sc_pkcs15emu_pteid_init(sc_pkcs15_card_t * p15card)
 		memset(&obj_info, 0, sizeof(obj_info));
 		memset(&obj_obj, 0, sizeof(obj_obj));
 
-		sc_pkcs15_format_id(object_ids[i], &obj_info.id);
 		sc_format_path(object_paths[i], &obj_info.path);
 		strlcpy(obj_info.app_label, object_labels[i], SC_PKCS15_MAX_LABEL_SIZE);
 		if (object_authids[i] != NULL)

-- 
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