diff --git a/api/crypto/tls.go b/api/crypto/tls.go index 3d22091d8..976e1a075 100644 --- a/api/crypto/tls.go +++ b/api/crypto/tls.go @@ -12,30 +12,28 @@ import ( func CreateTLSConfiguration(config *portainer.TLSConfiguration) (*tls.Config, error) { TLSConfig := &tls.Config{} - if config.TLS { - if config.TLSCertPath != "" && config.TLSKeyPath != "" { - cert, err := tls.LoadX509KeyPair(config.TLSCertPath, config.TLSKeyPath) - if err != nil { - return nil, err - } - - TLSConfig.Certificates = []tls.Certificate{cert} + if config.TLSCertPath != "" && config.TLSKeyPath != "" { + cert, err := tls.LoadX509KeyPair(config.TLSCertPath, config.TLSKeyPath) + if err != nil { + return nil, err } - if !config.TLSSkipVerify { - caCert, err := ioutil.ReadFile(config.TLSCACertPath) - if err != nil { - return nil, err - } - - caCertPool := x509.NewCertPool() - caCertPool.AppendCertsFromPEM(caCert) - - TLSConfig.RootCAs = caCertPool - } - - TLSConfig.InsecureSkipVerify = config.TLSSkipVerify + TLSConfig.Certificates = []tls.Certificate{cert} } + if !config.TLSSkipVerify { + caCert, err := ioutil.ReadFile(config.TLSCACertPath) + if err != nil { + return nil, err + } + + caCertPool := x509.NewCertPool() + caCertPool.AppendCertsFromPEM(caCert) + + TLSConfig.RootCAs = caCertPool + } + + TLSConfig.InsecureSkipVerify = config.TLSSkipVerify + return TLSConfig, nil } diff --git a/api/portainer.go b/api/portainer.go index b641ef5cd..b2a2156a3 100644 --- a/api/portainer.go +++ b/api/portainer.go @@ -345,7 +345,7 @@ type ( const ( // APIVersion is the version number of the Portainer API. - APIVersion = "1.14.1" + APIVersion = "1.14.2" // DBVersion is the version number of the Portainer database. DBVersion = 4 // DefaultTemplatesURL represents the default URL for the templates definitions. diff --git a/api/swagger.yaml b/api/swagger.yaml index 255a62949..8679e7dd9 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -56,7 +56,7 @@ info: **NOTE**: You can find more information on how to query the Docker API in the [Docker official documentation](https://docs.docker.com/engine/api/v1.30/) as well as in [this Portainer example](https://gist.github.com/deviantony/77026d402366b4b43fa5918d41bc42f8). - version: "1.14.1" + version: "1.14.2" title: "Portainer API" contact: email: "info@portainer.io" @@ -1869,7 +1869,7 @@ definitions: description: "Is analytics enabled" Version: type: "string" - example: "1.14.1" + example: "1.14.2" description: "Portainer API version" PublicSettingsInspectResponse: type: "object" diff --git a/bower.json b/bower.json index afb3365e0..d1d63f88b 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "portainer", - "version": "1.14.1", + "version": "1.14.2", "homepage": "https://github.com/portainer/portainer", "authors": [ "Anthony Lapenna " diff --git a/package.json b/package.json index c1ea2d995..7f369a022 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Portainer.io", "name": "portainer", "homepage": "http://portainer.io", - "version": "1.14.1", + "version": "1.14.2", "repository": { "type": "git", "url": "git@github.com:portainer/portainer.git"