Skip to content

Commit

Permalink
Merge pull request #5 from xhenner/master
Browse files Browse the repository at this point in the history
Implement ssl authentication
  • Loading branch information
nzlosh authored Dec 11, 2019
2 parents 2698c29 + 6ad4a85 commit 64eb7f8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spf_packer.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ func (c *PowerDNSClient) setConfiguration(cfg PdnsConfig) {
c.tls_config = tls.Config{
ServerName: "localhost",
}
cert, err := tls.LoadX509KeyPair(cfg.Client_cert, cfg.Client_key)
if err == nil {
c.tls_config.Certificates = []tls.Certificate{cert}
} else {
log.Println(err)
}
c.transport = &http.Transport{
MaxIdleConns: 10,
IdleConnTimeout: 30 * time.Second,
Expand Down

0 comments on commit 64eb7f8

Please sign in to comment.