]> Cypherpunks repositories - gostls13.git/commit
crypto/tls: add examples for [Load]X509KeyPair
authorKevin Burke <kev@inburke.com>
Fri, 20 Oct 2017 19:56:38 +0000 (12:56 -0700)
committerFilippo Valsorda <filippo@golang.org>
Mon, 30 Apr 2018 17:25:27 +0000 (17:25 +0000)
commit4154727e1b125a7d3398c9cc143eb36343c82bcc
tree35370d0450c541777cfda4584e7e31651884bd4e
parent3334eee400ad4dc202f53d3efa34fddb013f9c17
crypto/tls: add examples for [Load]X509KeyPair

I was confused about how to start an HTTP server if the server
cert/key are in memory, not on disk. I thought it would be good to
show an example of how to use these two functions to accomplish that.

example-cert.pem and example-key.pem were generated using
crypto/tls/generate_cert.go.

Change-Id: I850e1282fb1c38aff8bd9aeb51988d21fe307584
Reviewed-on: https://go-review.googlesource.com/72252
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/crypto/tls/example_test.go
src/crypto/tls/testdata/example-cert.pem [new file with mode: 0644]
src/crypto/tls/testdata/example-key.pem [new file with mode: 0644]