To see all certificates available on the token:
smctl.exe list-certificatesCheck details of a specific certificate:
smctl.exe cert-details -cert "My Digital Signature"Digitally sign an executable or document:
smctl.exe sign -file input.exe -o signed.exe -cert "CN=MyCompany"Specify the hashing algorithm for signing:
smctl.exe sign -file input.exe -o signed.exe -cert "My Digital Signature" -hash SHA256To sign a PDF file:
smctl.exe sign -file document.pdf -o signed_document.pdf -cert "My Digital Signature"Sign a PowerShell script for execution policy compliance:
smctl.exe sign -file script.ps1 -o signed_script.ps1 -cert "My Digital Signature"smctl.exe sign -file software.exe -o signed_software.exe -cert "Code Signing Certificate"Check if a file is properly signed:
smctl.exe verify -file signed.exeTo ensure the correct publisher is used for signing:
smctl.exe sign -file input.exe -o signed.exe -cert "CN=MyCompany, O=MyOrganization"Use Windows SignTool to verify a signed file:
signtool verify /pa signed.exeTo automate signing in a DevOps pipeline:
smctl.exe sign -file build_output.exe -o signed_output.exe -cert "My Digital Signature" -pin "TOKEN_PIN"To extract a certificate for external use:
smctl.exe export-cert -cert "My Digital Signature" -o my_cert.pemIf a certificate needs to be revoked:
smctl.exe revoke-cert -cert "My Digital Signature"Try reconnecting the token and restarting the service:
sc stop SafenetAuthenticationService
sc start SafenetAuthenticationServiceReset the token if you forget the PIN:
smctl.exe reset-token