diff options
| author | Anmol Sethi <hi@nhooyr.io> | 2023-01-24 22:08:39 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2023-03-13 12:45:00 +0000 |
| commit | c6a20f9984ce6da2ddf94d411c9ffc473e87d15e (patch) | |
| tree | 490b19f902d8d17ec4224439918e3a829458de87 | |
| parent | 776e461a4e6d8b372a43c72122c5c28cfc40dca2 (diff) | |
| download | go-x-crypto-c6a20f9984ce6da2ddf94d411c9ffc473e87d15e.tar.xz | |
ssh: document that ParseRawPrivateKey supports Ed25519 keys
From CL 173457 and CL 235358.
Change-Id: Ia46ab9c7e2c57472df3126ddc7050f0068fcaab9
GitHub-Last-Rev: c38e379355602fe4ff11ff65f98c296d5c326281
GitHub-Pull-Request: golang/crypto#146
Reviewed-on: https://go-review.googlesource.com/c/crypto/+/241282
Auto-Submit: Han-Wen Nienhuys <hanwen@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Han-Wen Nienhuys <hanwen@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Han-Wen Nienhuys <hanwen@google.com>
| -rw-r--r-- | ssh/keys.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ssh/keys.go b/ssh/keys.go index 7296980..dac8ee7 100644 --- a/ssh/keys.go +++ b/ssh/keys.go @@ -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 { |
