Documentation ¶
Index ¶
Constants ¶
View Source
const ( // HTTPConfTLSCAFile the TLS certificate authority file for the HTTP server HTTPConfTLSCAFile = "caFile" // HTTPConfTLSCertFile the TLS certificate file for the HTTP server HTTPConfTLSCertFile = "certFile" // HTTPConfTLSClientAuth whether the HTTP server requires a mutual TLS connection HTTPConfTLSClientAuth = "clientAuth" // HTTPConfTLSEnabled whether TLS is enabled for the HTTP server HTTPConfTLSEnabled = "enabled" // HTTPConfTLSKeyFile the private key file for TLS on the server HTTPConfTLSKeyFile = "keyFile" // HTTPConfTLSRequiredDNAttributes provides a set of regular expressions, to match against the DN of the client. Requires HTTPConfTLSClientAuth HTTPConfTLSRequiredDNAttributes = "requiredDNAttributes" )
View Source
const ( ServerType = "server" ClientType = "client" )
Variables ¶
View Source
var SubjectDNKnownAttributes = map[string]func(pkix.Name) []string{ "C": func(n pkix.Name) []string { return n.Country }, "O": func(n pkix.Name) []string { return n.Organization }, "OU": func(n pkix.Name) []string { return n.OrganizationalUnit }, "CN": func(n pkix.Name) []string { if n.CommonName == "" { return []string{} } return []string{n.CommonName} }, "SERIALNUMBER": func(n pkix.Name) []string { if n.SerialNumber == "" { return []string{} } return []string{n.SerialNumber} }, "L": func(n pkix.Name) []string { return n.Locality }, "ST": func(n pkix.Name) []string { return n.Province }, "STREET": func(n pkix.Name) []string { return n.StreetAddress }, "POSTALCODE": func(n pkix.Name) []string { return n.PostalCode }, }
Functions ¶
func ConstructTLSConfig ¶
func InitTLSConfig ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.