1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 07:49:41 +02:00

feat(global): add container exec support

This commit is contained in:
Anthony Lapenna 2016-08-03 15:11:09 +12:00
parent b0ebbdf68c
commit 5878eed7ec
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)
}