diff options
Diffstat (limited to 'internal/cmd/cert.go')
-rw-r--r-- | internal/cmd/cert.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/cmd/cert.go b/internal/cmd/cert.go index f13d8949..ef3f2a2a 100644 --- a/internal/cmd/cert.go +++ b/internal/cmd/cert.go @@ -41,7 +41,7 @@ Outputs to 'cert.pem' and 'key.pem' and will overwrite existing files.`, }, } -func publicKey(priv interface{}) interface{} { +func publicKey(priv any) any { switch k := priv.(type) { case *rsa.PrivateKey: return &k.PublicKey @@ -52,7 +52,7 @@ func publicKey(priv interface{}) interface{} { } } -func pemBlockForKey(priv interface{}) *pem.Block { +func pemBlockForKey(priv any) *pem.Block { switch k := priv.(type) { case *rsa.PrivateKey: return &pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(k)} @@ -72,7 +72,7 @@ func runCert(ctx *cli.Context) error { log.Fatal("Missing required --host parameter") } - var priv interface{} + var priv any var err error switch ctx.String("ecdsa-curve") { case "": |