Removed incorrect sanity check
git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@492 96b47cad-a561-4643-ad3b-153ac7d7599c
This commit is contained in:
@@ -591,10 +591,6 @@ class Security_Environment(object):
|
|||||||
for tlv in structure:
|
for tlv in structure:
|
||||||
tag, length, value = tlv
|
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
|
if tag % 2 == 1: #Include object in checksum calculation
|
||||||
to_authenticate += inttostring(tag) + inttostring(length) + value
|
to_authenticate += inttostring(tag) + inttostring(length) + value
|
||||||
|
|
||||||
@@ -621,6 +617,8 @@ class Security_Environment(object):
|
|||||||
ins = value[2:4]
|
ins = value[2:4]
|
||||||
p1 = value[4:6]
|
p1 = value[4:6]
|
||||||
p2 = value[6:8]
|
p2 = value[6:8]
|
||||||
|
else:
|
||||||
|
raise SwError(SW["ERR_SECMESSOBJECTSINCORRECT"])
|
||||||
|
|
||||||
#SM data objects for confidentiality
|
#SM data objects for confidentiality
|
||||||
if tag in (SM_Class["CRYPTOGRAM_PLAIN_TLV_INCLUDING_SM"],
|
if tag in (SM_Class["CRYPTOGRAM_PLAIN_TLV_INCLUDING_SM"],
|
||||||
|
|||||||
Reference in New Issue
Block a user