-
Notifications
You must be signed in to change notification settings - Fork 803
Add support for RSA D-Trust Card 4.1 & 4.4 #2943
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
Conversation
1525905 to
ffcf523
Compare
Jakuje
left a comment
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.
few nits, but otherwise looks good.
Jakuje
left a comment
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.
thanks! Looks good
|
Hi Thank you, Thank you, Thank you very much @hamarituc - good job ! All thumbs up! |
frankmorgner
left a comment
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.
I applied |
|
@hamarituc can you rebase the PR on the current master. I think this is also ready for the release, but I would like to re-trigger the recent CI updates to avoid a need to fix it in the master afterward. |
|
Hi, Before recent rebase (today in the morning) I got an error After rebase there is now a memory access error when using pinpad, still same error as before when setting pin on commandline. Reader and card info: Operating system is Linux Mint. Please let me know if I should provide any more details. |
Can you please retry it with a smart card reader without a pin pad please. I experience a problem with my Cherry Secure Board as well which implements a pin pad reader. I thought it was a problem with the keyboard since the driver worked well for all other readers I tested.
Interesting, a Cherry reader as well. We should first rule out it depends on the hardware. |
Please try with one of these mechanisms
instead of |
149a251 to
30339f3
Compare
|
All remaining CI failures seem not to be related to the patch and also failing in From my point of view, all issues resulting from the rebase are fixed. |
Jakuje
left a comment
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.
thank you. Looks good code wise. Would be great to get confirmation that it works for others though.
|
Thank you for the hints about hashes. Signing of piped string or file works fine when using the Hashes SHA256-RSA-PKCS, SHA384-RSA-PKCS and SHA512-RSA-PKCS when specifying the pin via When omitting the Unfortunately, I do not have another card reader besides the cherry with pinpad. But I would be happy to buy one if you have a suggestion that you do not already own yourself. |
The D-Trust driver doesn't handle the PIN entry logic so it's very likely you hit some issue not related to this patch. To get more evidence I would like you to enable the debugging output and paste the debug trace so we have an idea where the Segfault comes from. But I am unsure whether we should handle this issue in the Pull Request thread or if it is more appropriate to open a separate issue.
I have tested with:
|
|
I tested with proper hashes on master branch and it showed the same memory access error as on this pull request when omitting the pin on commandline. When specifying the pin on commandline it failed expectedly of course because that's what this pull request is about to fix. Therefore, I will open a new issue regarding the memory problem. And I will order another reader to check. Thanks for your support and sorry for the confusion. |
|
I merged #3023 so if you rebase this on top of master, memory issues should be gone and you could verify this works also with your reader. |
The driver is derived from the CardOS and the SKEID driver. This commit implements the card identification procedure.
|
to whom it concerns.... Note: I don't want to say that this is a NEW issue of the merge because since start of d-trust driver implementation I was not able to sign more than one pdf without restarting acrobat. Just my personal fault that I reported this finding not before. Sorry for that. Attaching the /usr/local/lib/opensc-pkcs11.so to Acrobat ("PKCS#11-Module and Token") shows the following information ... ID des Modulherstellers: OpenSC Project By the way: Hardware is a Reiner SCT cyberJack Komfort. If this info is interesting and I could help analyzing the issue please let me know. As a regular user of OpenSC I think I am not able to provide more "technical" information without support from one of the professionals here. |
I think you should open a separate issue on this bug. A colleague of mine experienced a similar issue, but with the old version. We couldn't it reproduce with the new version. I would like to ask you to try the following when signing two documents.
Please tell in which cases you experience the error. I think it has to do with the PIN caching. The card requires a PIN entry for each single signing operation. But OpenSC is able to cache that PIN an just transfers it to the card, when needed without querying the card holder again. |
|
Please check the card's PKCS#15 profile ( |
|
FYI: 0x101 means CKR_USER_NOT_LOGGED_IN |
|
Ok, issue created - see #3030 (comment) |


This PR adds support for the D-Trust RSA qualified signature and sealing cards.
The driver is a stripped down version of the CardOS driver similar to the Slovakian eID card driver, which deals with special behavior of this card type. Although the
skeid,dtrustandcardoscards are all based on the CardOS platform, it seems easier to maintain different drivers in my judgment (see discussion in #2784 (comment) and #2672 (comment)).Fixes #2784
Checklist