Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
merged Liz's comment
Browse files Browse the repository at this point in the history
  • Loading branch information
candysmurf committed Aug 14, 2017
2 parents 0ed57be + c260cd9 commit afa5d01
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mgmt/rest/v2/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,10 @@ func (s *apiV2) loadPlugin(w http.ResponseWriter, r *http.Request, _ httprouter.
return
}

// check if one of TLS params (cert or key) has been provided; if not, skip the part related to TLS
if hasTLS(certPath, keyPath) {
// check if both of required params have been provided to setup TLS connection;
// if not, return an appropriate error
if isTLSEnabled(certPath, keyPath) {
rp.SetTLSEnabled(true)
rp.SetCACertPaths(caCertPaths)
Expand Down

0 comments on commit afa5d01

Please # to comment.