Re: [go-nuts] TLS server to save client certificates after a request is received

2017-02-15 Thread Janne Snabb
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

[go-nuts] TLS server to save client certificates after a request is received

2017-02-14 Thread Naveen Shivegowda
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