certreq -new works with -pin but certreq -accept -pin does not ?

Canada Mike 1 Reputation point
2021-04-04T23:42:58.807+00:00

I am using a SafeNet / Gemalto smartcard / token on Windows 10. I can generate a CSR off the token just fine without requiring user interaction by specifying -pin <pin> eg.

certreq -New -pin 1234 templatefile.txt output.csr

however, the corresponding -accept does not work. The user is prompted for the pin even though I specify it.
certreq -accept -pin 1234 thecert.cer

certreq -accept -? shows pin is an option, but the user is always prompted for the pin in the accept. Any idea why that might be and how I can work around it ?

Basically my goal is to wipe the token and generate a private key, generate a csr, send the csr to my pki to be signed, retrive the cert and install it without user interaction.

Windows 10 Security
Windows 10 Security
Windows 10: A Microsoft operating system that runs on personal computers and tablets.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
2,754 questions
{count} votes