MCPcopy Create free account
hub / github.com/imroc/req / appendRootCertData

Method appendRootCertData

client.go:289–295  ·  view source on GitHub ↗
(data []byte)

Source from the content-addressed store, hash-verified

287}
288
289func (c *Client) appendRootCertData(data []byte) {
290 config := c.GetTLSClientConfig()
291 if config.RootCAs == nil {
292 config.RootCAs = x509.NewCertPool()
293 }
294 config.RootCAs.AppendCertsFromPEM(data)
295}
296
297// SetRootCertFromString set root certificates from string.
298func (c *Client) SetRootCertFromString(pemContent string) *Client {

Callers 2

SetRootCertFromStringMethod · 0.95
SetRootCertsFromFileMethod · 0.95

Calls 1

GetTLSClientConfigMethod · 0.95

Tested by

no test coverage detected