0
0
Fork 0

fix result type

The returned type must be io.WriterTo to make it fit the Pemmer
interface.
This commit is contained in:
Gibheer 2016-09-29 21:52:25 +02:00
parent 2ad03c8f80
commit fd88bca287
1 changed files with 1 additions and 1 deletions

View File

@ -151,7 +151,7 @@ func LoadCertificate(raw []byte) (*Certificate, error) {
} }
// marshal the certificate to a pem block // marshal the certificate to a pem block
func (c *Certificate) MarshalPem() (marshalledPemBlock, error) { func (c *Certificate) MarshalPem() (io.WriterTo, error) {
block := &pem.Block{Type: PemLabelCertificate, Bytes: c.Raw} block := &pem.Block{Type: PemLabelCertificate, Bytes: c.Raw}
return marshalledPemBlock(pem.EncodeToMemory(block)), nil return marshalledPemBlock(pem.EncodeToMemory(block)), nil
} }