Skip to content

Commit f0aca64

Browse files
metsmamrts
authored andcommitted
Add FinEID 4.1 support
WE2-1126, WE2-1133 Signed-off-by: Raul Metsma <[email protected]>
1 parent e7490d0 commit f0aca64

File tree

2 files changed

+9
-21
lines changed

2 files changed

+9
-21
lines changed

src/electronic-id.cpp

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,10 @@ const std::map<byte_vector, ElectronicIDConstructor, VectorComparator> SUPPORTED
6565
{{0x3b, 0xff, 0x96, 0x00, 0x00, 0x80, 0x31, 0xfe, 0x43, 0x80, 0x31, 0xb8, 0x53,
6666
0x65, 0x49, 0x44, 0x64, 0xb0, 0x85, 0x05, 0x10, 0x12, 0x23, 0x3f, 0x1d},
6767
constructor<EstEIDThales>},
68-
// FinEID v3.0
69-
{{0x3B, 0x7F, 0x96, 0x00, 0x00, 0x80, 0x31, 0xB8, 0x65, 0xB0,
70-
0x85, 0x03, 0x00, 0xEF, 0x12, 0x00, 0xF6, 0x82, 0x90, 0x00},
71-
constructor<FinEIDv3>},
7268
// FinEID v3.1
7369
{{0x3B, 0x7F, 0x96, 0x00, 0x00, 0x80, 0x31, 0xB8, 0x65, 0xB0,
7470
0x85, 0x04, 0x02, 0x1B, 0x12, 0x00, 0xF6, 0x82, 0x90, 0x00},
7571
constructor<FinEIDv3>},
76-
// FinEID v4.0
77-
{{0x3B, 0x7F, 0x96, 0x00, 0x00, 0x80, 0x31, 0xB8, 0x65, 0xB0,
78-
0x85, 0x05, 0x00, 0x11, 0x12, 0x24, 0x60, 0x82, 0x90, 0x00},
79-
constructor<FinEIDv4>},
8072
// LatEID Idemia v2.0
8173
{{0x3b, 0xdb, 0x96, 0x00, 0x80, 0xb1, 0xfe, 0x45, 0x1f, 0x83, 0x00,
8274
0x12, 0x42, 0x8f, 0x53, 0x65, 0x49, 0x44, 0x0f, 0x90, 0x00, 0x20},
@@ -93,12 +85,6 @@ const std::map<byte_vector, ElectronicIDConstructor, VectorComparator> SUPPORTED
9385
{{0x3b, 0xff, 0x13, 0x00, 0x00, 0x81, 0x31, 0xfe, 0x45, 0x00, 0x31, 0xb9, 0x64,
9486
0x04, 0x44, 0xec, 0xc1, 0x73, 0x94, 0x01, 0x80, 0x82, 0x90, 0x00, 0x12},
9587
constructor<ElectronicID::Type::HrvEID>},
96-
// BelEID
97-
{{0x3B, 0x98, 0x94, 0x40, 0x0A, 0xA5, 0x03, 0x01, 0x01, 0x01, 0xAD, 0x13, 0x10},
98-
constructor<ElectronicID::Type::BelEID>},
99-
// BelEID
100-
{{0x3B, 0x98, 0x94, 0x40, 0xFF, 0xA5, 0x03, 0x01, 0x01, 0x01, 0xAD, 0x13, 0x10},
101-
constructor<ElectronicID::Type::BelEID>},
10288
// BelEID - https://github.com/Fedict/eid-mw/wiki/Applet-1.8
10389
{{0x3b, 0x7f, 0x96, 0x00, 0x00, 0x80, 0x31, 0x80, 0x65, 0xb0,
10490
0x85, 0x04, 0x01, 0x20, 0x12, 0x0f, 0xff, 0x82, 0x90, 0x00},
@@ -137,6 +123,12 @@ struct MaskedATREntry
137123
};
138124

139125
const std::vector<MaskedATREntry> MASKED_ATRS = {
126+
// FinEID Thales v4.0/v4.1
127+
{{0x3B, 0x7F, 0x96, 0x00, 0x00, 0x80, 0x31, 0xB8, 0x65, 0xB0,
128+
0x85, 0x05, 0x00, 0x11, 0x12, 0x24, 0x60, 0x82, 0x90, 0x00},
129+
{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
130+
0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF},
131+
constructor<FinEIDv4>},
140132
// BelEID v1.7
141133
{{0x3b, 0x98, 0x13, 0x40, 0x0a, 0xa5, 0x03, 0x01, 0x01, 0x01, 0xad, 0x13, 0x11},
142134
{0xff, 0xff, 0x00, 0xff, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00},

tests/mock/atrs.hpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,13 @@ const PcscMock::byte_vector ESTEID_IDEMIA_V1_ATR {0x3b, 0xdb, 0x96, 0x00, 0x80,
3131
0x1f, 0x83, 0x00, 0x12, 0x23, 0x3f, 0x53, 0x65,
3232
0x49, 0x44, 0x0f, 0x90, 0x00, 0xf1};
3333

34-
const PcscMock::byte_vector LATEID_IDEMIA_V1_ATR {0x3b, 0xdd, 0x18, 0x00, 0x81, 0x31, 0xfe, 0x45,
35-
0x90, 0x4c, 0x41, 0x54, 0x56, 0x49, 0x41, 0x2d,
36-
0x65, 0x49, 0x44, 0x90, 0x00, 0x8c};
37-
3834
const PcscMock::byte_vector LATEID_IDEMIA_V2_ATR {0x3b, 0xdb, 0x96, 0x00, 0x80, 0xb1, 0xfe, 0x45,
3935
0x1f, 0x83, 0x00, 0x12, 0x42, 0x8f, 0x53, 0x65,
4036
0x49, 0x44, 0x0f, 0x90, 0x00, 0x20};
4137

42-
const PcscMock::byte_vector FINEID_V3_ATR {0x3b, 0x7f, 0x96, 0x00, 0x00, 0x80, 0x31,
43-
0xb8, 0x65, 0xb0, 0x85, 0x03, 0x00, 0xef,
44-
0x12, 0x00, 0xf6, 0x82, 0x90, 0x00};
38+
const PcscMock::byte_vector FINEID_V3_ATR {0x3B, 0x7F, 0x96, 0x00, 0x00, 0x80, 0x31,
39+
0xB8, 0x65, 0xB0, 0x85, 0x04, 0x02, 0x1B,
40+
0x12, 0x00, 0xF6, 0x82, 0x90, 0x00};
4541

4642
const PcscMock::byte_vector FINEID_V4_ATR {0x3B, 0x7F, 0x96, 0x00, 0x00, 0x80, 0x31,
4743
0xB8, 0x65, 0xB0, 0x85, 0x05, 0x00, 0x11,

0 commit comments

Comments
 (0)