|
|
|
@ -48,6 +48,7 @@ func Bootstrap(token string) (*Client, error) {
|
|
|
|
|
// certificate after 2/3rd of the certificate's lifetime has expired.
|
|
|
|
|
//
|
|
|
|
|
// Usage:
|
|
|
|
|
//
|
|
|
|
|
// // Default example with certificate rotation.
|
|
|
|
|
// client, err := ca.BootstrapClient(ctx.Background(), token)
|
|
|
|
|
//
|
|
|
|
@ -96,6 +97,7 @@ func BootstrapClient(ctx context.Context, token string, options ...TLSOption) (*
|
|
|
|
|
// ca.AddClientCA(*x509.Certificate).
|
|
|
|
|
//
|
|
|
|
|
// Usage:
|
|
|
|
|
//
|
|
|
|
|
// // Default example with certificate rotation.
|
|
|
|
|
// srv, err := ca.BootstrapServer(context.Background(), token, &http.Server{
|
|
|
|
|
// Addr: ":443",
|
|
|
|
@ -152,6 +154,7 @@ func BootstrapServer(ctx context.Context, token string, base *http.Server, optio
|
|
|
|
|
// ca.AddClientCA(*x509.Certificate).
|
|
|
|
|
//
|
|
|
|
|
// Usage:
|
|
|
|
|
//
|
|
|
|
|
// inner, err := net.Listen("tcp", ":443")
|
|
|
|
|
// if err != nil {
|
|
|
|
|
// return nil
|
|
|
|
|