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:
parent
dfedaea239
commit
81ab902811
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue