1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-25 08:19:40 +02:00

feat(global): add container exec support (#97)

This commit is contained in:
Anthony Lapenna 2016-08-03 15:12:53 +12:00 committed by GitHub
parent b0ebbdf68c
commit 1aaa5acbef
16 changed files with 438 additions and 75 deletions

View file

@ -7,13 +7,13 @@ import (
"log"
)
// newTLSConfig initializes a tls.Config from the TLS flags
func newTLSConfig(tlsFlags TLSFlags) *tls.Config {
cert, err := tls.LoadX509KeyPair(tlsFlags.certPath, tlsFlags.keyPath)
// newTLSConfig initializes a tls.Config using a CA certificate, a certificate and a key
func newTLSConfig(caCertPath, certPath, keyPath string) *tls.Config {
cert, err := tls.LoadX509KeyPair(certPath, keyPath)
if err != nil {
log.Fatal(err)
}
caCert, err := ioutil.ReadFile(tlsFlags.caPath)
caCert, err := ioutil.ReadFile(caCertPath)
if err != nil {
log.Fatal(err)
}