The certificate byte stream is available in the Raw field of the
Certificate struct.
You can for example output received certificates PEM encoded like this:
for _, c := range r.TLS.PeerCertificates {
pem.Encode(os.Stdout, &pem.Block{Type: "CERTIFICATE", Bytes: c.Raw})
}
Or you can just save
Hi,
I need to store the client certificates in a file for further
authentication purpose but I am not able to re-form the client certificates.
TLS.PeerCertificates has information related to client certificates but it
is separated by struct fields and is not present as byte stream which could
b