From 5d31b0a04cf910d46f7f86cbc0b8fe48bad8a10d Mon Sep 17 00:00:00 2001 From: Matt Holt Date: Sat, 17 Oct 2015 20:58:14 -0600 Subject: [PATCH] Fix panic --- acme/crypto.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/acme/crypto.go b/acme/crypto.go index 27ae6bc0..d595874f 100644 --- a/acme/crypto.go +++ b/acme/crypto.go @@ -33,7 +33,7 @@ func pemEncode(data interface{}) []byte { pemBlock = &pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(key)} break case derCertificateBytes: - pemBlock = &pem.Block{Type: "CERTIFICATE", Bytes: data.([]byte)} + pemBlock = &pem.Block{Type: "CERTIFICATE", Bytes: []byte(data.(derCertificateBytes))} } return pem.EncodeToMemory(pemBlock)