-
Notifications
You must be signed in to change notification settings - Fork 711
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
EstEID 2018+ driver #1635
EstEID 2018+ driver #1635
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use tabs for indenting. Looks quite OK, nothing serious.
It has been some time since I wrote C so my setup has changed. Using VS Code with clang-format seems pretty neat. Maybe we can add necessary tooling/config into the source tree so that code formatting would be automated with a tool (like clang-format) ? I'll keep using the default formatting of VScode+clang-format plugin until the PR is non-draft or until I figure out how to configure clang-format in a suitable way. |
57fd7f9
to
ccfc805
Compare
The way of achieving unified code style in OpenSC or recommendations thereof is still a todo. Sure, you can postpone a (somewhat) unified style for later. |
2ffdf7c
to
20526ae
Compare
src/libopensc/card-esteid2018.c
Outdated
|
||
static int esteid_select_file(struct sc_card *card, const struct sc_path *in_path, struct sc_file **file_out) { | ||
unsigned char pathbuf[SC_MAX_PATH_SIZE], *path = pathbuf; | ||
int pathlen; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
size_t pathlen;
src/libopensc/card-esteid2018.c
Outdated
LOG_TEST_RET(card->ctx, sc_transmit_apdu(card, &apdu), "APDU transmit failed"); | ||
LOG_TEST_RET(card->ctx, sc_check_sw(card, apdu.sw1, apdu.sw2), "PSO CDS/INTERNAL AUTHENTICATE failed"); | ||
|
||
LOG_FUNC_RETURN(card->ctx, apdu.resplen); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(int) apdu.resplen
9028627
to
31cb527
Compare
please also look at the two unresolved comments above |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment above. There is also this remark. Please exclude .clang-format
from this PR.
The rest looks good.
b3bc2ca
to
26d4e98
Compare
Addressed both, removed clang-format, rebased on master. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now. Only two minor remarks.
struct esteid_priv_data *priv; | ||
struct sc_apdu apdu; | ||
|
||
// XXX: could be const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not make it const
then?
This adds support for a minimalistic, small and fast card profile based on IAS-ECC. Based on information from https://installer.id.ee/media/id2019/TD-ID1-Chip-App.pdf and proprietary driver snoops. Thanks to @metsma and @frankmorgner. Change-Id: I2e4b4914d8a3b991d9a639728695abf4a2362ca0
and make sure the card is always handled emulated card first Change-Id: I60174c2793bb882fb73716f62a652d84e028382c
Change-Id: I5d4d3103692fc6db51f13fc5338360289c26af9a
Change-Id: I9aa97c8a9878dddd3e6f1a2baa877d188b9d7fe5
This adds card driver for Estonian eID from 2018 onwards.
Next iteration will merge pkcs15-esteid and get rid of Estonia related stuff in card-mcrd.c