]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/x509: add Ed25519 to ExampleParsePKIXPublicKey
authorFilippo Valsorda <filippo@golang.org>
Thu, 20 Jun 2019 19:48:29 +0000 (15:48 -0400)
committerFilippo Valsorda <filippo@golang.org>
Mon, 29 Jul 2019 16:52:01 +0000 (16:52 +0000)
ParsePKIXPublicKey gained Ed25519 support in CL 175478.

Change-Id: I11ffe0a62743292367b3adb103956e61bad57cc4
Reviewed-on: https://go-review.googlesource.com/c/go/+/183243
Reviewed-by: Katie Hockman <katie@golang.org>
src/crypto/x509/example_test.go

index 97c2ea2442e28ac38fd6bc083be18c5f4f215315..19d249af7a65274ea9dfd09e53ea8a33bb808529 100644 (file)
@@ -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")
        }