MCPcopy Index your code
hub / github.com/koding/kite / UseTLS

Method UseTLS

server.go:126–137  ·  view source on GitHub ↗
(certPEM, keyPEM string)

Source from the content-addressed store, hash-verified

124}
125
126func (k *Kite) UseTLS(certPEM, keyPEM string) {
127 if k.TLSConfig == nil {
128 k.TLSConfig = &tls.Config{}
129 }
130
131 cert, err := tls.X509KeyPair([]byte(certPEM), []byte(keyPEM))
132 if err != nil {
133 panic(err)
134 }
135
136 k.TLSConfig.Certificates = append(k.TLSConfig.Certificates, cert)
137}
138
139func (k *Kite) UseTLSFile(certFile, keyFile string) {
140 certData, err := ioutil.ReadFile(certFile)

Callers 1

UseTLSFileMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected