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

Improve compatibility with some cards #1272

Merged
merged 1 commit into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions client/QSmartCard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,10 @@ QString QSmartCardData::typeString(QSmartCardData::PinType type)
return {};
}



const QByteArray Card::MASTER_FILE = APDU("00A4000C");// 00"); // Compatibilty for some cards
const QByteArray Card::MASTER_FILE = APDU("00A4000C");
const QByteArray Card::MUTUAL_AUTH = APDU("00880000 00 00");
const QByteArray Card::CHANGE = APDU("00240000 00");
const QByteArray Card::READBINARY = APDU("00B00000 00");
const QByteArray Card::READRECORD = APDU("00B20004 00");
const QByteArray Card::REPLACE = APDU("002C0000 00");
const QByteArray Card::VERIFY = APDU("00200000 00");

Expand Down Expand Up @@ -171,7 +168,7 @@ bool IDEMIACard::loadPerso(QPCSCReader *reader, QSmartCardDataPrivate *d) const
return false;
if(d->data.isEmpty() && reader->transfer(APDU("00A4010C025000")))
{
QByteArray cmd = APDU("00A4010C025001");
QByteArray cmd = APDU("00A4020C025001");
for(char data = 1; data <= 8; ++data)
{
cmd[6] = data;
Expand Down
1 change: 0 additions & 1 deletion client/QSmartCard_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ class Card
static const QByteArray MUTUAL_AUTH;
static const QByteArray CHANGE;
static const QByteArray READBINARY;
static const QByteArray READRECORD;
static const QByteArray REPLACE;
static const QByteArray VERIFY;
};
Expand Down
Loading