Skip to content
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

Handle encrypted signing keys #12

Open
nsheridan opened this issue May 29, 2016 · 3 comments
Open

Handle encrypted signing keys #12

nsheridan opened this issue May 29, 2016 · 3 comments

Comments

@nsheridan
Copy link
Owner

Right now trying to use a private key with a passphrase will produce errors like:

ecdsa key:

2016/05/29 18:22:53 unable to parse CA key: asn1: structure error: tags don't match (16 vs {class:3 tag:2629 length:91 isCompound:false}) {optional:false explicit:false application:false defaultValue:<nil> tag:<nil> stringType:0 timeType:0 set:false omitEmpty:false} pkcs1PrivateKey @4
exit status 1

rsa or ed25519 key:

2016/05/29 18:23:47 unable to parse CA key: asn1: structure error: length too large
@patrickod
Copy link
Collaborator

This would appear to require a patch to the golang ssh codebase to take into account the DEK-Info header that's included in the PEM block for encrypted SSH keys. Investigating a patch - would love to contribute such a thing into the golang project.

@nsheridan
Copy link
Owner Author

Yeah it's more effort than I'm willing to expend currently, especially as the signing key can be stored unencrypted in a reasonably safe medium (e.g. a Hashicorp vault or on S3 encrypted with kms).

Also usual annoyances of requirement to either set the passphrase in the config or be present to decrypt the key manually.

@lyda
Copy link
Contributor

lyda commented Jan 25, 2017

I think you'll need golang/go#18692 fixed first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants