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

Commit

Permalink
Added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
IzabellaRaulin committed Aug 11, 2017
1 parent 73259b1 commit 0a6f121
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 0a6f121

Please sign in to comment.