From dcfc185389f628effd1cc5e97a68eae0d13a0218 Mon Sep 17 00:00:00 2001 From: oepen Date: Wed, 17 Aug 2011 11:02:08 +0000 Subject: [PATCH] Removed incorrect sanity check git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@492 96b47cad-a561-4643-ad3b-153ac7d7599c --- virtualsmartcard/src/vpicc/virtualsmartcard/SmartcardSAM.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/virtualsmartcard/src/vpicc/virtualsmartcard/SmartcardSAM.py b/virtualsmartcard/src/vpicc/virtualsmartcard/SmartcardSAM.py index 30ceb75..325c993 100644 --- a/virtualsmartcard/src/vpicc/virtualsmartcard/SmartcardSAM.py +++ b/virtualsmartcard/src/vpicc/virtualsmartcard/SmartcardSAM.py @@ -591,10 +591,6 @@ class Security_Environment(object): for tlv in structure: tag, length, value = tlv - #Sanity checking - if not SM_Class.has_key(tag): - raise SwError(SW["ERR_SECMESSOBJECTSINCORRECT"]) - if tag % 2 == 1: #Include object in checksum calculation to_authenticate += inttostring(tag) + inttostring(length) + value @@ -621,6 +617,8 @@ class Security_Environment(object): ins = value[2:4] p1 = value[4:6] p2 = value[6:8] + else: + raise SwError(SW["ERR_SECMESSOBJECTSINCORRECT"]) #SM data objects for confidentiality if tag in (SM_Class["CRYPTOGRAM_PLAIN_TLV_INCLUDING_SM"],