-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot sign with signtool: No private key is available. #17
Comments
Hi @dantheperson, Here's what i have been doing to setup initially:
if you have done that, and have the KMS CNG installed, you can do the following to see if it is working ok: If it is, you should see some output similar to the below from the debug switch. If you don't, do a If it is working, and you attempt to sign, you should see more output this time hopefully. Here's the command I used for a test sign:
Hopefully this gives you some more output and points in the right direction. Cheers, |
I also suspect that the root cause is the root certs Sorry that this is opaque - we are going to do our best to fix it for the GA release |
Thanks for the input, you're right i had set the root certs when running certutil repair, as that gave me the error tha tthe FAQ mentions, but I hadn't tried that when running SignTool. Unfortuantly it make no difference, no extra debug output either.
For the service account, i'm using the service account assigned to the GCE VM, so i haven't set any variables for that. The glcoud kms commands against the key, e.g. get-public-key work ok from the machine. The SA is setup like so:
I've attached the certutil -csptest output, it's quite large, with quite a few log messages from the KMS provider. Not sure what is normal as I expect with only a few functions being implemented in the provider, a few failures/warnings would be normal? Windows Version in case it's relevant
|
Given that csptest is showing it's calling the KMS CNG library (the extra output is from the I'm not sure if its x86/x64 thing, or what.. but I've seen certain versions just act like the Google KMS provider doesn't exist. I've had the version (installed with the Windows SDK) work perfectly. I've also tried with older versions (that were pre-existing in our build pipeline) of |
Thank you so much @pwae |
+1 - thanks very much @pwae for documenting your findings. I'm going to leave this open for now, to remind us to do a better job of documenting the expected behavior from x86 versions of signtool. And as an update on the root certs issue, I think we have a solution that will make it into the GA release, so one fewer hurdle there. |
Thanks for those detailed explanations, it fixed the issue I was facing as well. There is one thing however: |
Hi @obones, an x86 version of the provider is technically possible, but not part of our core target CUJs for the initial GA launch. That said, we're definitely interested in hearing about potential areas of improvement and future work, do you mind creating a new issue in this repo so that we can track it as a feature request? Thank you! |
I have followed the example using a self signed cert to test: "Signing Windows Artifacts" https://cloud.google.com/kms/docs/reference/cng-signtool
But i get the error
SignTool Error: No private key is available.
if i then import the certificate using windows
mmc
and run repair to associate the private key, i get the following error regardingunsupported legacy key spec
Is there anything else i can do to debug the issue?
Public key matches
The text was updated successfully, but these errors were encountered: