Skip to content

Commit c6a20f9

Browse files
nhooyrgopherbot
authored andcommitted
ssh: document that ParseRawPrivateKey supports Ed25519 keys
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]>
1 parent 776e461 commit c6a20f9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ssh/keys.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1087,9 +1087,9 @@ func (*PassphraseMissingError) Error() string {
10871087
return "ssh: this private key is passphrase protected"
10881088
}
10891089

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

0 commit comments

Comments
 (0)