Fix panic
This commit is contained in:
parent
7f6f790253
commit
5d31b0a04c
1 changed files with 1 additions and 1 deletions
|
@ -33,7 +33,7 @@ func pemEncode(data interface{}) []byte {
|
||||||
pemBlock = &pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(key)}
|
pemBlock = &pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(key)}
|
||||||
break
|
break
|
||||||
case derCertificateBytes:
|
case derCertificateBytes:
|
||||||
pemBlock = &pem.Block{Type: "CERTIFICATE", Bytes: data.([]byte)}
|
pemBlock = &pem.Block{Type: "CERTIFICATE", Bytes: []byte(data.(derCertificateBytes))}
|
||||||
}
|
}
|
||||||
|
|
||||||
return pem.EncodeToMemory(pemBlock)
|
return pem.EncodeToMemory(pemBlock)
|
||||||
|
|
Loading…
Reference in a new issue