Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Card not recognized by this middleware #37

Closed
callegar opened this issue Feb 11, 2022 · 2 comments
Closed

Card not recognized by this middleware #37

callegar opened this issue Feb 11, 2022 · 2 comments

Comments

@callegar
Copy link

callegar commented Feb 11, 2022

My ID card appears not to be recognized by this middleware.

Matching the ATR with those in

uint8_t NXP_ATR[] = { 0x80, 0x31, 0x80, 0x65, 0x49, 0x54, 0x4E, 0x58, 0x50, 0x12, 0x0F, 0xFF, 0x82, 0x90 };
uint8_t Gemalto_ATR[] = { 0x80, 0x31, 0x80, 0x65, 0xB0, 0x85, 0x04, 0x00, 0x11, 0x12, 0x0F, 0xFF, 0x82, 0x90, 0x00 };
uint8_t Gemalto2_ATR[] = { 0x80, 0x31, 0x80, 0x65, 0xB0, 0x85, 0x03, 0x00, 0xEF, 0x12, 0x0F, 0xFF, 0x82, 0x90, 0x00 };
uint8_t STM_ATR[] = {0x80, 0x66, 0x47, 0x50, 0x00, 0xB8, 0x00, 0x7F};
uint8_t STM2_ATR[] = { 0x80, 0x80, 0x01, 0x01 };
ByteArray baNXP_ATR(NXP_ATR, sizeof(NXP_ATR));
ByteArray baGemalto_ATR(Gemalto_ATR, sizeof(Gemalto_ATR));
ByteArray baGemalto2_ATR(Gemalto2_ATR, sizeof(Gemalto2_ATR));
ByteArray baSTM_ATR(STM_ATR, sizeof(STM_ATR));
ByteArray baSTM2_ATR(STM2_ATR, sizeof(STM2_ATR));
void IAS::ReadCIEType() {
init_func
size_t position;
if (ATR.indexOf(baNXP_ATR,position))
type = CIE_Type::CIE_NXP;
else if (ATR.indexOf(baGemalto_ATR, position))
type = CIE_Type::CIE_Gemalto;
else if (ATR.indexOf(baGemalto2_ATR, position))
type = CIE_Type::CIE_Gemalto;
else if (ATR.indexOf(baSTM_ATR, position))
type = CIE_Type::CIE_STM;
else if (ATR.indexOf(baSTM2_ATR, position))
type = CIE_Type::CIE_STM2;
else
throw logged_error("CIE non riconosciuta");
}
there seems to provide a complete match.

My ATR is 3B 8F 80 01 80 31 80 65 B0 85 04 00 11 12 0F FF 82 90 00 8A

Do valid CIE ID cards exist that are not supported by this middleware? The card appears to work with the android CIEID app. Does that app support a superset of the CIEs supported by this middleware?

@aantetomaso
Copy link
Contributor

Risolta nella release 1.4.3.1

@callegar
Copy link
Author

Still not working. Note that I am trying to use the card with the remotesmartcardreader in https://frankmorgner.github.io/vsmartcard/remote-reader/README.html as I do not have a stand alone reader. Applied the latest out of tree patch (frankmorgner/vsmartcard#201 (comment)) there too.

Weird enough, now trying to debug with pkcs11-tool --module /usr/local/lib/libcie-pkcs11.so -I -L aborts

File INI:/usr/local/lib/ciepki.ini
Inizio Sessione - versione: May 13 2022 21:18:01Lib log level: 3
Lib log level: 3
Lib log level: 3
Lib log level: 3
Lib log level: 3
Lib log level: 3
Lib log level: 3
Lib log level: 3
Cryptoki version 2.10
Manufacturer     IPZS
Library          CIE PKCS11 (ver 1.0)
Lib log level: 3
Lib log level: 3
Available slots:
Slot 0 (0x2): Lib log level: 3
Lib log level: 3
Virtual PCD 00 0
  (empty)
Slot 1 (0x1): Lib log level: 3
Lib log level: 3
Virtual PCD 00 0
Lib log level: 3
Lib log level: 3
Lib log level: 3
Lib log level: 3
Lib log level: 3
Lib log level: 3
  (token not recognized)
Lib log level: 3
Lib log level: 3
Lib log level: 3
Lib log level: 3
Using slot 1 with a present token (0x1)
Lib log level: 3
Lib log level: 3
free(): double free detected in tcache 2
Aborted (core dumped)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants