Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
rootcerts
✓ github.com/hashicorp/go-rootcerts
Configure TLS with system root certificates
package main
import (
"crypto/tls"
"fmt"
"github.com/hashicorp/go-rootcerts"
)
func main() {
config := &tls.Config{}
if err := rootcerts.ConfigureTLS(config, &rootcerts.Config{
CAFile: "/etc/ssl/certs/ca-certificates.crt",
CAPath: "/etc/ssl/certs",
}); err != nil {
panic(err)
}
fmt.Println("TLS configured with root certificates")
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
1.0.2latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.