MCPcopy Create free account
hub / github.com/bytebase/bytebase / applyPGTLSConfigForHost

Function applyPGTLSConfigForHost

backend/plugin/db/util/ssl.go:249–258  ·  view source on GitHub ↗
(dst *tls.Config, host string, src *tls.Config)

Source from the content-addressed store, hash-verified

247}
248
249func applyPGTLSConfigForHost(dst *tls.Config, host string, src *tls.Config) {
250 if len(src.Certificates) > 0 {
251 dst.Certificates = append([]tls.Certificate(nil), src.Certificates...)
252 }
253 if src.VerifyPeerCertificate != nil {
254 dst.RootCAs = src.RootCAs
255 dst.InsecureSkipVerify = src.InsecureSkipVerify
256 dst.VerifyPeerCertificate = CreateCertificateVerifier(src.RootCAs, host)
257 }
258}

Callers 1

ApplyPGTLSConfigFunction · 0.85

Calls 1

Tested by

no test coverage detected