Skip to content

Commit 993dd45

Browse files
metsmamrts
authored andcommitted
Add Latvia Cosmo X card support
WE2-1127 Signed-off-by: Raul Metsma <[email protected]>
1 parent f0aca64 commit 993dd45

File tree

3 files changed

+284
-295
lines changed

3 files changed

+284
-295
lines changed

src/electronic-id.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ constexpr auto constructor(const Reader& /*reader*/)
5353

5454
// Supported cards.
5555
const std::map<byte_vector, ElectronicIDConstructor, VectorComparator> SUPPORTED_ATRS {
56-
// EstEID Idemia v1.0
56+
// EstEID Idemia Cosmo 8.1/8.2
5757
{{0x3b, 0xdb, 0x96, 0x00, 0x80, 0xb1, 0xfe, 0x45, 0x1f, 0x83, 0x00,
5858
0x12, 0x23, 0x3f, 0x53, 0x65, 0x49, 0x44, 0x0f, 0x90, 0x00, 0xf1},
5959
constructor<EstEIDIDEMIAV1>},
60-
// EstEID Idemia v2.0
60+
// EstEID Idemia Cosmo X
6161
{{0x3b, 0xdc, 0x96, 0x00, 0x80, 0xb1, 0xfe, 0x45, 0x1f, 0x83, 0x00, 0x12,
6262
0x23, 0x3f, 0x54, 0x65, 0x49, 0x44, 0x32, 0x0f, 0x90, 0x00, 0xc3},
6363
constructor<EstEIDIDEMIAV1>},
@@ -69,10 +69,14 @@ const std::map<byte_vector, ElectronicIDConstructor, VectorComparator> SUPPORTED
6969
{{0x3B, 0x7F, 0x96, 0x00, 0x00, 0x80, 0x31, 0xB8, 0x65, 0xB0,
7070
0x85, 0x04, 0x02, 0x1B, 0x12, 0x00, 0xF6, 0x82, 0x90, 0x00},
7171
constructor<FinEIDv3>},
72-
// LatEID Idemia v2.0
72+
// LatEID Idemia Cosmo 8.1/8.2
7373
{{0x3b, 0xdb, 0x96, 0x00, 0x80, 0xb1, 0xfe, 0x45, 0x1f, 0x83, 0x00,
7474
0x12, 0x42, 0x8f, 0x53, 0x65, 0x49, 0x44, 0x0f, 0x90, 0x00, 0x20},
7575
constructor<LatEIDIDEMIAV2>},
76+
// LatEID Idemia Cosmo X
77+
{{0x3b, 0xdc, 0x96, 0x00, 0x80, 0xb1, 0xfe, 0x45, 0x1f, 0x83, 0x00, 0x12,
78+
0x42, 0x8f, 0x54, 0x65, 0x49, 0x44, 0x32, 0x0f, 0x90, 0x00, 0x12},
79+
constructor<LatEIDIDEMIAV2>},
7680
// LitEID
7781
{{0x3B, 0x9D, 0x18, 0x81, 0x31, 0xFC, 0x35, 0x80, 0x31, 0xC0, 0x69,
7882
0x4D, 0x54, 0x43, 0x4F, 0x53, 0x73, 0x02, 0x05, 0x05, 0xD3},

src/electronic-ids/pcsc/LatEIDIDEMIAv2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ byte_vector LatEIDIDEMIAV2::getCertificateImpl(const SmartCard::Session& session
6464
auto info = readDCODInfo(session, CERT_FILE_REF,
6565
type.isAuthentication() ? data->authCache : data->signCache);
6666
if (TLV id = info.find(0x30)[0xA1][0x30][0x30][0x04]) {
67-
return readFile(session, CommandApdu::selectEF(0x02, {id.begin, id.end}));
67+
return readFile(session, CommandApdu::selectEF(0x02, {id.begin, id.end}), 0xC0);
6868
}
6969
THROW(SmartCardError, "EF.CD reference not found");
7070
}

0 commit comments

Comments
 (0)