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:
parent
7f6f790253
commit
5d31b0a04c
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user