-
Notifications
You must be signed in to change notification settings - Fork 25
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
Error response: '006282', protocol 2 in src/SmartCard.cpp #119
Comments
Can you capture the APDU trace? Note: If you enter a PIN, it may be logged. |
It fails before needing PIN. auto cardInfo = autoSelectSupportedCard();
byte_vector cert = cardInfo->eid().getCertificate(CertificateType::AUTHENTICATION);
Here this is ... when using Latvian I see differences even starting with 1st command
vs
|
Does master branch and latest tag fail same way? |
Yeah I tried
Also note that it wasn't trivial to build v1.2.0, there's test build issue with https://github.com/web-eid/libpcsc-cpp/tree/v1.2.0 I worked around by commenting out some stuff.
What do you mean with this? It's my first eID I got in 2020 year. Original certificates expired (5 year validity) but I renewed them so they're still valid till 2030 year. |
If I change diff --git i/src/electronic-ids/pcsc/EIDIDEMIA.cpp w/src/electronic-ids/pcsc/EIDIDEMIA.cpp
index 74dd589..71e7ce6 100644
--- i/src/electronic-ids/pcsc/EIDIDEMIA.cpp
+++ w/src/electronic-ids/pcsc/EIDIDEMIA.cpp
@@ -42,7 +42,9 @@ const auto ADF1_AID = CommandApdu::select(
const auto ADF2_AID = CommandApdu::select(0x04,
{0x51, 0x53, 0x43, 0x44, 0x20, 0x41, 0x70, 0x70, 0x6C,
0x69, 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E});
-const auto AUTH_CERT = CommandApdu::select(0x09, {0xAD, 0xF1, 0x34, 0x01});
+const auto AUTH_CERT = CommandApdu::select(0x09, {0x2F, 0x01});
const auto SIGN_CERT = CommandApdu::select(0x09, {0xAD, 0xF2, 0x34, 0x1F});
} // namespace Then we successfully get data
But we fail with And +const auto AUTH_CERT = CommandApdu::select(0x01, {0x34, 0x02}); Fails with |
Fixes: web-eid#119 Signed-off-by: Raul Metsma <raul@metsma.ee>
Can you test this PR? |
Fixes: web-eid#119 Signed-off-by: Raul Metsma <raul@metsma.ee>
Fixes: web-eid#119 Signed-off-by: Raul Metsma <raul@metsma.ee>
Fixes: web-eid#119 Signed-off-by: Raul Metsma <raul@metsma.ee>
Fixes: web-eid#119 Signed-off-by: Raul Metsma <raul@metsma.ee>
It failed with
But this fixed it diff --git i/src/electronic-ids/pcsc/EIDIDEMIA.cpp w/src/electronic-ids/pcsc/EIDIDEMIA.cpp
index daf0e6d..5480590 100644
--- i/src/electronic-ids/pcsc/EIDIDEMIA.cpp
+++ w/src/electronic-ids/pcsc/EIDIDEMIA.cpp
@@ -61,6 +61,7 @@ void EIDIDEMIA::selectADF2() const
byte_vector EIDIDEMIA::getCertificateImpl(const CertificateType type) const
{
+ transmitApduWithExpectedResponse(*card, MAIN_AID);
type.isAuthentication() ? selectADF1() : selectADF2();
return electronic_id::getCertificate(
*card, CommandApdu::select(0x02, type.isAuthentication() ? authCertRef() : signCertRef())); And now it works perfectly. I was able to authenticate and sign. Thanks! 💓 |
Fixes: web-eid#119 Signed-off-by: Raul Metsma <raul@metsma.ee>
Fixes: web-eid#119 Signed-off-by: Raul Metsma <raul@metsma.ee>
Fixes: web-eid#119 Signed-off-by: Raul Metsma <raul@metsma.ee>
Fixes: web-eid#119 Signed-off-by: Raul Metsma <raul@metsma.ee>
Fixes: web-eid#119 Signed-off-by: Raul Metsma <raul@metsma.ee>
Fixes: web-eid#119 Signed-off-by: Raul Metsma <raul@metsma.ee>
Fixes: web-eid#119 Signed-off-by: Raul Metsma <raul@metsma.ee>
Fixes: web-eid#119 Signed-off-by: Raul Metsma <raul@metsma.ee>
For some reason my Latvian eID fails with this software while it works with
latvia-eid-middleware
.I submitted web-eid/web-eid-app#357
but now I tested that issue is here as I tried
libelectronic-id-test-integration
test and it fails very early.The text was updated successfully, but these errors were encountered: