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
crypto/tls: Sometimes fails to parse private key #17279
Comments
x509.ParsePKCS1PrivateKey fails with |
So is this a problem with node-forge? Or Go? OpenSSL says that they key is valid... |
/cc @agl I think from recent issues that this is WAI and the key is incorrectly generated. But I'll let Adam confirm. |
This was an issue in Node-forge, which has now been resolved. So I'm closing this issue. |
Found the same issue, just using openssl and go 1.9, besides openssl validating the key the http server failed to parse it. Tried again with a key generated in the same way and worked. Seems the issue is still present |
I'm also still seeing this issue with go 1.9. Openssl reports |
@jeroiraz, @izaaklauer, you're either using an old version of Node-forge before it was fixed (digitalbazaar/forge@4dfc87c) or you're commenting on the wrong bug. In any case, this bug is closed and no longer tracked. If you're having an issue, file a new bug with complete details. |
What version of Go are you using (
go version
)?go version go1.7 darwin/amd64
What did you do?
I'm trying to load X.509 key pairs using tls.LoadX509KeyPair. The key pairs have been generated using node-forge, and are generated using the same options each time. In most cases tls.LoadX509KeyPair works and loads the key pair, but for some of the key pairs it cannot parse the private key. All of the generated keys are parsed correctly by openssl though.
This is the program I run:
I've also attached both the key pair that is not working, and a key pair that is working (and is correctly opened by tls.LoadX509KeyPair) which has been generated using the same options.
keys.zip
What did you expect to see?
2016/09/29 14:31:49 Go loaded key successfully
What did you see instead?
The text was updated successfully, but these errors were encountered: