From 2c135644ce847fc5ea1eeae63bbecc84e120206c Mon Sep 17 00:00:00 2001 From: psytester Date: Thu, 23 Oct 2014 20:13:27 +0200 Subject: [PATCH 1/2] Some ATR values for nPA OS different ATR (Answer To Reset) values depending on used Chip version It's just a playground, because in past eID client 'Open eCard App' did not recognize the card correctly with newest ATR values. --- .../src/vpicc/virtualsmartcard/VirtualSmartcard.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/virtualsmartcard/src/vpicc/virtualsmartcard/VirtualSmartcard.py b/virtualsmartcard/src/vpicc/virtualsmartcard/VirtualSmartcard.py index fbf18d9..c848320 100644 --- a/virtualsmartcard/src/vpicc/virtualsmartcard/VirtualSmartcard.py +++ b/virtualsmartcard/src/vpicc/virtualsmartcard/VirtualSmartcard.py @@ -504,7 +504,14 @@ class NPAOS(Iso7816OS): Iso7816OS.__init__(self, mf, sam, ins2handler, maxle) self.ins2handler[0x86] = self.SAM.general_authenticate self.ins2handler[0x2c] = self.SAM.reset_retry_counter + + # different ATR (Answer To Reset) values depending on used Chip version + # It's just a playground, because in past eID client 'Open eCard App' did not recognize the card correctly with newest ATR values self.atr = '\x3B\x8A\x80\x01\x80\x31\xF8\x73\xF7\x41\xE0\x82\x90\x00\x75' + #self.atr = '\x3B\x8A\x80\x01\x80\x31\xB8\x73\x84\x01\xE0\x82\x90\x00\x06' + #self.atr = '\x3B\x88\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x09' + #self.atr = '\x3B\x87\x80\x01\x80\x31\xB8\x73\x84\x01\xE0\x19' + self.SAM.current_SE.disable_checks = disable_checks if ef_cardsecurity: ef = self.mf.select('fid', 0x011d) From 22f1d17c3914b3aa62da3b8f31854e7d8f104825 Mon Sep 17 00:00:00 2001 From: psytester Date: Sat, 25 Oct 2014 21:43:07 +0200 Subject: [PATCH 2/2] ATR problem not for Open eCard, but another one --- virtualsmartcard/src/vpicc/virtualsmartcard/VirtualSmartcard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtualsmartcard/src/vpicc/virtualsmartcard/VirtualSmartcard.py b/virtualsmartcard/src/vpicc/virtualsmartcard/VirtualSmartcard.py index c848320..62a511f 100644 --- a/virtualsmartcard/src/vpicc/virtualsmartcard/VirtualSmartcard.py +++ b/virtualsmartcard/src/vpicc/virtualsmartcard/VirtualSmartcard.py @@ -506,7 +506,7 @@ class NPAOS(Iso7816OS): self.ins2handler[0x2c] = self.SAM.reset_retry_counter # different ATR (Answer To Reset) values depending on used Chip version - # It's just a playground, because in past eID client 'Open eCard App' did not recognize the card correctly with newest ATR values + # It's just a playground, because in past one of all those eID clients did not recognize the card correctly with newest ATR values self.atr = '\x3B\x8A\x80\x01\x80\x31\xF8\x73\xF7\x41\xE0\x82\x90\x00\x75' #self.atr = '\x3B\x8A\x80\x01\x80\x31\xB8\x73\x84\x01\xE0\x82\x90\x00\x06' #self.atr = '\x3B\x88\x80\x01\x00\x00\x00\x00\x00\x00\x00\x00\x09'