Adds TLS support for VNC API communication#27
Adds TLS support for VNC API communication#27michaelhenkel wants to merge 8 commits intoJuniper:masterfrom
Conversation
Closes-jira-task: CEM-11391
|
Ignatious Johnson Christopher ok, How about https://github.com/Juniper/contrail-go-api/blob/master/cli/main.go,
Michael Henkel |
| port int | ||
| httpClient *http.Client | ||
| auth Authenticator | ||
| encrypt Encryptor |
There was a problem hiding this comment.
I am a bit confused about this field, didn't find the usage of it. From my understanding, the encryption setting is done by function AddEncryption, which is a member of Client, is it right?
| if certFile != "" && keyFile != "" { | ||
| cert, err := tls.LoadX509KeyPair(certFile, keyFile) | ||
| if err != nil { | ||
| return nil | ||
| } | ||
| tlsConfig.Certificates = []tls.Certificate{cert} | ||
| } else { | ||
| tlsConfig.InsecureSkipVerify = true | ||
| } |
There was a problem hiding this comment.
Ignatious talked with me about this part. We have question about why tlsConfig.InsecureSkipVerify is set back to true when we don't have certFile or keyFile, since we already have caFile, we can verify the server already.
changes the request header for v3
Closes-jira-task: CEM-11391