Commit c985f6ae authored by fetke's avatar fetke
Browse files

codec should work now; there is no validation of the checksum upon receiving a...

codec should work now; there is no validation of the checksum upon receiving a command, though (one TODO left)
parent dc842b7b
Loading
Loading
Loading
Loading
+6 −17
Original line number Diff line number Diff line
@@ -1128,26 +1128,16 @@ module ePassport_Types {
	}

	group auxiliary {
		type record PaddingContentIndicatorTLV {
		type record CryptogramTLV {
			TlvType tlvType ('86'O, '87'O), // 0x86 or 0x87
			TlvLength tlvLength,
			Oct1 paddingIndicatorByte ('01'O),
			octetstring tlvValue
		}
		with {
			variant "present=bytes(1,0x86)||bytes(1,0x87)"
			variant (tlvLength) "intTag='tlvLength'"
			variant (tlvValue) "length=getIntTag('tlvLength')"
		}

		type record CryptogramTLV {
			TlvType tlvType ('82'O, '83'O, '84'O, '85'O), // 0x82 or 0x83 or 0x84 or 0x85
			TlvLength tlvLength,
			octetstring tlvValue
		}
		with {
			variant "present=bytesRange(0,1,0x82,0x85)"
			variant (tlvLength) "intTag='tlvLength'"
			variant (tlvValue) "length=getIntTag('tlvLength')"
			variant (tlvValue) "length=(getIntTag('tlvLength')-1)"
		}

		type record LengthETLV {
@@ -1168,7 +1158,7 @@ module ePassport_Types {
					"decode=EPassportCodecHelper.decodeTlvLengthE();"
		}

		type record CCTLV {
		type record CryptographicChecksumTLV {
			TlvType tlvType ('8E'O), // 0x8E
			TlvLength tlvLength,
			octetstring tlvValue
@@ -1180,10 +1170,9 @@ module ePassport_Types {
		}

		type set SMData {
			PaddingContentIndicatorTLV pci optional,
			CryptogramTLV cryptogram optional,
			LengthETLV lengthE optional,
			CCTLV cc optional
			CryptographicChecksumTLV cc optional
		}
	}
}