1
0
mirror of https://github.com/go-acme/lego.git synced 2024-12-25 11:02:56 +02:00

Fix panic

This commit is contained in:
Matt Holt 2015-10-17 20:58:14 -06:00
parent 7f6f790253
commit 5d31b0a04c

View File

@ -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)