From c9aed4f5aa17f3ffd484d700df57a3d798318187 Mon Sep 17 00:00:00 2001 From: Frank Morgner Date: Fri, 28 Feb 2014 23:07:51 +0100 Subject: [PATCH] fix return code for blocked PIN --- virtualsmartcard/src/vpicc/virtualsmartcard/cards/nPA.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/virtualsmartcard/src/vpicc/virtualsmartcard/cards/nPA.py b/virtualsmartcard/src/vpicc/virtualsmartcard/cards/nPA.py index 6763184..8462bd8 100644 --- a/virtualsmartcard/src/vpicc/virtualsmartcard/cards/nPA.py +++ b/virtualsmartcard/src/vpicc/virtualsmartcard/cards/nPA.py @@ -104,7 +104,7 @@ class nPA_SE(Security_Environment): if self.at.keyref_is_pin(): if self.sam.counter <= 0: print "Must use PUK to unblock" - raise SwError(SW["WARN_NOINFO63"]) + return 0x63c0, "" if self.sam.counter == 1 and not self.sam.active: print "Must use CAN to activate" return 0x63c1, "" @@ -167,7 +167,7 @@ class nPA_SE(Security_Environment): elif self.at.keyref_is_pin(): if self.sam.counter <= 0: print "Must use PUK to unblock" - raise SwError(SW["WARN_NOINFO63"]) + return 0x63c0, "" if self.sam.counter == 1 and not self.sam.active: print "Must use CAN to activate" return 0x63c1, ""