Skip to content

Commit

Permalink
ssh: document that ParseRawPrivateKey supports Ed25519 keys
Browse files Browse the repository at this point in the history
From CL 173457 and CL 235358.
  • Loading branch information
nhooyr committed Jan 24, 2023
1 parent 3d872d0 commit c38e379
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ssh/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -1087,9 +1087,9 @@ func (*PassphraseMissingError) Error() string {
return "ssh: this private key is passphrase protected"
}

// ParseRawPrivateKey returns a private key from a PEM encoded private key. It
// supports RSA (PKCS#1), PKCS#8, DSA (OpenSSL), and ECDSA private keys. If the
// private key is encrypted, it will return a PassphraseMissingError.
// ParseRawPrivateKey returns a private key from a PEM encoded private key. It supports
// RSA, DSA, ECDSA, and Ed25519 private keys in PKCS#1, PKCS#8, OpenSSL, and OpenSSH
// formats. If the private key is encrypted, it will return a PassphraseMissingError.
func ParseRawPrivateKey(pemBytes []byte) (interface{}, error) {
block, _ := pem.Decode(pemBytes)
if block == nil {
Expand Down

0 comments on commit c38e379

Please sign in to comment.