1
0
Fork 0
mirror of https://github.com/Mic92/sops-nix.git synced 2025-04-08 09:54:35 +00:00

don't panic when ssh key is encrypted

This commit is contained in:
Jörg Thalheim 2020-07-13 06:14:23 +01:00
parent dfedaea239
commit 81ab902811
No known key found for this signature in database
GPG key ID: 003F2096411B5F92

View file

@ -44,7 +44,7 @@ func SSHPublicKeyToPGP(sshPublicKey []byte) (*packet.PublicKey, error) {
func parsePrivateKey(sshPrivateKey []byte) (*rsa.PrivateKey, error) {
privateKey, err := ssh.ParseRawPrivateKey(sshPrivateKey)
if err != nil {
panic(err)
return nil, err
}
rsaKey, ok := privateKey.(*rsa.PrivateKey)