mirror of
https://github.com/FiloSottile/age.git
synced 2026-09-20 06:54:17 +00:00
agessh: support PKCS#8-encoded Ed25519 private keys
OpenSSH never generated them (unencrypted, and golang.org/x/crypto/ssh doesn't support encrypted PKCS#8 for now, so the encrypted_keys.go change is technically superfluous) but there are other systems that produce them (for example, 1Password). Unfortunately, ParseRawPrivateKey returns a value type for PKCS#8 and a pointer type for the OpenSSH format (golang/go#51974), so we need to handle both. Fixes #429
This commit is contained in:
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
# https://github.com/FiloSottile/age/discussions/428
|
||||
# encrypt and decrypt a file with an Ed25519 key encoded with PKCS#8
|
||||
age -e -i key.pem -o test.age input
|
||||
age -d -i key.pem test.age
|
||||
stdout test
|
||||
|
||||
-- input --
|
||||
test
|
||||
-- key.pem --
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
MC4CAQAwBQYDK2VwBCIEIJT4Wpo+YG11yybKL/bYXQW7ekz4PAsmV/4tfmY1vU7x
|
||||
-----END PRIVATE KEY-----
|
||||
Reference in New Issue
Block a user