Documentation
¶
Overview ¶
Package selfsign exposes a GetCertificate function that generates self-signed certificates and is suitable for use in the *tls.Config of an HTTPS server.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCertificate ¶
func GetCertificate(hello *tls.ClientHelloInfo) (*tls.Certificate, error)
GetCertificate generates a self-signed certificate
Example ¶
package main import ( "crypto/tls" "net/http" "github.com/davars/selfsign" ) func main() { s := &http.Server{ Addr: ":https", TLSConfig: &tls.Config{GetCertificate: selfsign.GetCertificate}, } s.ListenAndServeTLS("", "") }
Output:
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.