-
Notifications
You must be signed in to change notification settings - Fork 8
Can't unlock token - wrong Pin was presented #9
Comments
I think its possible that a
When run on a CLI running graphically rather than headless, the windows Smartcard UI prompts for the pin... |
Yeah, the first problem might have been an escaping problem. The other looks more like the certificate cannot be found. Are you sure the certificate in question is in the User store and not the Machine store? |
It invokes the graphical windows smart card dialog prompt, so I'd presume |
If the regular UI comes up, it looks like the application either didn't set the correct PIN (the PIN was set, otherwise the process would exit sooner but there are several types of PINs for these providers) or maybe there is some other complication in the way which the tool cannot handle. As reported earlier by another user, it might be possible to use SignTool for the signing, would you mind giving that a try? See #8 . |
Suprisingly it seems like signtool works, though I had to try a few different versions of signtool.exe to get it to stick... When I had tried that method previously I couldn't get it to run without graphically prompting or failing. For anyone else reading this, I had issues with signtool.exe in windows-sdk versions earlier than early 2019. It might be relevant that the Digicert token was issued in the first week of October 2019 and my token does not allow exporting the cert as seen in some of the older stackoverflow posts. |
Thanks @mareklinka for your work on this tool, and your help! |
Glad you managed to to get it working! Yeah, if the token doesn't allow that kind of export, it's probably why my tool cannot deal with it. Probably requires different parameters when accessing the cert or something. That's the trouble with a tool like this - there is so many different token/cert setups out there and since they contain secrets, it's impossible to debug against them :) Nonetheless, glad you found a working solution. |
System Setup
go
, and a .msi generated bywixtoolset
Steps
"Digicert Certificate Utility for Windows" is able to sign the exe, with the normal OS smartcard prompt used for PIN entry.
Using the following command:
> C:\ev-sign\publish\SafenetSign.exe 0cf50ef7039ffc481654808c07acfb36530eee3c p1[ 16 chars redacted ]13 user wb[redacted pass]N3 http://timestamp.digicert.com pe arc.exe -v
Gives the following output:
I have validated multiple times that the PIN is correct, the container-name from SafeNet is correct, and the fingerprint is correct.
Any thoughts?
The text was updated successfully, but these errors were encountered: