Commit 5235501c authored by Filippo Valsorda's avatar Filippo Valsorda

crypto/x509: add Ed25519 to ExampleParsePKIXPublicKey

ParsePKIXPublicKey gained Ed25519 support in CL 175478.

Change-Id: I11ffe0a62743292367b3adb103956e61bad57cc4
Reviewed-on: https://go-review.googlesource.com/c/go/+/183243Reviewed-by: default avatarKatie Hockman <katie@golang.org>
parent c4ca6031
......@@ -7,6 +7,7 @@ package x509_test
import (
"crypto/dsa"
"crypto/ecdsa"
"crypto/ed25519"
"crypto/rsa"
"crypto/x509"
"encoding/pem"
......@@ -128,6 +129,8 @@ AIU+2GKjyT3iMuzZxxFxPFMCAwEAAQ==
fmt.Println("pub is of type DSA:", pub)
case *ecdsa.PublicKey:
fmt.Println("pub is of type ECDSA:", pub)
case ed25519.PublicKey:
fmt.Println("pub is of type Ed25519:", pub)
default:
panic("unknown type of public key")
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment