diff --git a/doc/tools/pkcs11-tool.1.xml b/doc/tools/pkcs11-tool.1.xml index 8db0e84a..6a1c5596 100644 --- a/doc/tools/pkcs11-tool.1.xml +++ b/doc/tools/pkcs11-tool.1.xml @@ -559,4 +559,26 @@ + + + Examples + + To list all certificates on the smart card: + pkcs11-tool --list-objects --type cert + + To read the certificate with ID KEY_ID + in DER format from smart card: + pkcs11-tool --read-object --id KEY_ID --type cert --outfile cert.der + + To convert the certificate in DER formato to PEM format, use OpenSSL + tools: + openssl x509 -inform DER -in cert.der -outform PEM > cert.pem + + To sign some data stored in file data + using the private key with ID ID and + using the RSA-PKCS mechanism: + pkcs11-tool --sign --id ID --mechanism RSA-PKCS --input-file data --output-file data.sig + + +