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.

Change-Id: Ia46ab9c7e2c57472df3126ddc7050f0068fcaab9
GitHub-Last-Rev: c38e379
GitHub-Pull-Request: #146
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/241282
Auto-Submit: Han-Wen Nienhuys <[email protected]>
Reviewed-by: Bryan Mills <[email protected]>
Reviewed-by: Han-Wen Nienhuys <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Run-TryBot: Han-Wen Nienhuys <[email protected]>
  • Loading branch information
nhooyr authored and gopherbot committed Mar 13, 2023
1 parent 776e461 commit c6a20f9
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 c6a20f9

Please sign in to comment.