I am using
p11tool on CentOS to read a PIV smart card. The card is being read via the
coolkey package driver (using
I can get a listing of the certs on there using
p11tool --list-all-certs 'pkcs11:model=;manufacturer=;serial=;token=CoolKey'
The list of certs only includes the URL, Type, Label, and ID. Using the GUI Smart Card Manager from the RedHat Enterprise Security Client (
esc package, which requires
opensc)), I can drill down to view certificate details, like the cert's serial number and fingerprints.
p11tool --info <certurl> hoping that would provide the details, but that still only lists the four fields seen with
UPDATE: I also tried
openssl x509 -engine pkcs11 -keyform engine -text -in <certurl> but that failed, with the message
140067620280208:error:02001002:system library:fopen:No such file or directory:bss_file.c:402:fopen('<certurl>','r')
How can I view those details using p11tool and/or other command line tools?
openssltool expects a file as parameter after the
-inswitch. You should export the certificate from the smart card into a file.
openscinstalled, which gives you
pkcs15-toolamongst others. Use it with the
opensc. I'll need to look at whether installing
openscwill create any conflicts or problems.