Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool is a representation of a CA Cert Pool that can have multiple items appended into it
func New ¶
func New() *Pool
New returns a newly initialized CA Pool that can then have additional actions performed on it
Example ¶
package main
import (
"crypto/tls"
"net/http"
"github.com/gomicro/trust"
)
var client *http.Client
func main() {
pool := trust.New()
certs, err := pool.CACerts()
if err != nil {
panic(err)
}
client = &http.Client{
Transport: &http.Transport{
TLSClientConfig: &tls.Config{RootCAs: certs},
},
}
}
Click to show internal directories.
Click to hide internal directories.