aboutsummaryrefslogblamecommitdiff
path: root/pem_marshal.go
blob: 54ce1e0eda40a6463d3ea1ddad8bebc282a32070 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
           










                                                                            


                                                                      
 
package pki

import (
  "io"
)

type (
  marshalledPemBlock []byte
)

// This function writes the marshalled pem block to a writer and returns the
// number of written bytes and eventual errors.
func (b marshalledPemBlock) WriteTo(stream io.Writer) (int64, error) {
  numBytes, err := stream.Write(b)
  return int64(numBytes), err
}