I'm looking to write the windows logon certificate on VirtualSmartCard by APDU. I already found the command structure How to send a command APDU to a HCE device? also read the document about the APDU (https://cardwerk.com/smart-card-standard-iso7816-4-section-6-basic-interindustry-commands/), but couldn't find any specific command for X.509 certificate.
Asked
Active
Viewed 510 times
1 Answers
1
but couldn't find any specific command for X.509 certificate.
That's right. But that's just because a certificate to the smart card is just data. The verification etc. of the certificate is performed on the host, not on the smart card. So usually it is stored in a file (an EF in ISO 7816-4 terms). If that file needs to be found, it can be referenced by putting a PKCS#15 compatible file structure on the card.

Maarten Bodewes
- 90,524
- 13
- 150
- 263
-
Thanks for you response. But I want to simulate physical Smart Card by Virtual SC reader and virtual card to login to the windows. I already used APDU command to create the virtual card but the windows shows cannot find the certificate which it makes sense. So looking for solution to store or link X509 certificate on ISO=7816 card. – Peyman Nov 01 '19 at 00:03
-
Emulation is not different, you need to use PKCS#15 and (probably) make sure that Windows recognizes the ATR. – Maarten Bodewes Nov 01 '19 at 00:28
-
when I use PKCS#15 I get this error: Using reader with a card: Fabio Ottavi Pipe Reader 0 Failed to connect to card: Card is invalid or cannot be handled – Peyman Nov 01 '19 at 03:09
-
I cannot help you debug that from here, but it seems that the structure on the card is still not correct somehow. That doesn't mean that PKCS#15 is not the solution. These are not technologies you fully understand in one day and mistakes are easy to make. – Maarten Bodewes Nov 01 '19 at 14:31
-
Yes I do agree with you. And I'm sure PKCS#15 is my solution. But don't know how to fix my card's structure. Appreciate you if could share any link or sample which could help me? – Peyman Nov 01 '19 at 21:56