Skip to content

Conversation

@AlexandreGonzalo
Copy link

I am using the pkcs11-tool to list the certificates stored in my PKCS#11 token.
I have this patch which displays the certificate serial number and maybe that's something which could be merged to master.

Certificate Object; type = X.509 cert
subject: DN: C=FR, ST=PACA, L=Valbonne, O=Trustonic, CN=*.trustonic.com
serial: 54E67E7F3DB8F07D11D473717C71E057FD7D22C9
ID: 01

Checklist
  • Documentation is added or updated
  • New files have a LGPL 2.1 license statement
  • PKCS#11 module is tested
  • Windows minidriver is tested
  • macOS tokend is tested

@frankmorgner
Copy link
Member

can we do this without being dependant on OpenSSL?

@Jakuje
Copy link
Member

Jakuje commented Oct 30, 2022

can you rebase the changes on current master to remove the needless commits (adding support for SHA3, merge commits)?

xhanulik and others added 28 commits November 14, 2022 08:44
Fixes CID 377385, Thanks coverity
Fixes CID 374845, Thanks coverity
fuzz_pkcs15init uses API that is not exported by libopensc.
Local build on RHEL8 and Fedora36 fails with errors
on these two tests.
Issue OpenSC#2517 reports that minidriver may be presented with new handles
to PCSC, even if card is moved from one reader to another.

The previous code assumed a change in handles would always point at same reader.
and if reader was changed, caller would do two operations: card is removed from one
reader i.e. call CardDeleteContext and some time later when card is inserted,
call CardAcquireContext. Thus previous code would not to call reinit_card_for.

But this is not the case. So when handles change, the new handles are used to probe
the new reader to obtain reader name to compare to old reader name.
If they are the same returns to not call reinit_card.
If they are different returns to call reinit_card.

The assumption is if card is removed, it could be modified on another system
then inserted on original system which changed data.
Eitot and others added 25 commits November 14, 2022 08:45
This fixes an omission in e05574d. The names of these files have changed, so they are not deregistered from LaunchServices and uninstalled when running the opensc-uninstall script.
`launchctl remove` is executed by the root user. This will not affect loaded LaunchAgents of the logged-in user.
Include a fix for OpenSC#2625

OpenSC definitions of ATRs have been lax in "sc_atr_table" entries by allowing
1 bits in the ATR that need to be 0 bits when used with Windows compare
Do the equivalent reduction of the table ATR done in card.c by "tbin[s] = (tbin[s] & mbin[s]);"
before adding to registry.

This will then allow lax definitions of ATRs to be copied to customactions.cpp
and fixed before adding to registry.

 Changes to be committed:
	modified:   win32/customactions.cpp
@AlexandreGonzalo AlexandreGonzalo deleted the trustonic_pkcs11_cko_serial branch November 14, 2022 08:10
@AlexandreGonzalo
Copy link
Author

I am using the pkcs11-tool to list the certificates stored in my PKCS#11 token. I have this patch which displays the certificate serial number and maybe that's something which could be merged to master.

Certificate Object; type = X.509 cert subject: DN: C=FR, ST=PACA, L=Valbonne, O=Trustonic, CN=*.trustonic.com serial: 54E67E7F3DB8F07D11D473717C71E057FD7D22C9 ID: 01

can you rebase the changes on current master to remove the needless commits (adding support for SHA3, merge commits)?

I created this new PR
#2641

@AlexandreGonzalo
Copy link
Author

can we do this without being dependant on OpenSSL?

I did the same as getSUBJECT() above and it is an easy win.
I don't think that it is worth to try to avoid OpenSSL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.