This commit is contained in:
techknowlogick
2020-12-21 01:02:40 -05:00
committed by GitHub
parent 55d7e53d99
commit 70038719bf
37 changed files with 162 additions and 51 deletions

View File

@@ -363,6 +363,10 @@ func AcceptTOS(tosURL string) bool { return true }
// Also see Error's Instance field for when a CA requires already registered accounts to agree
// to an updated Terms of Service.
func (c *Client) Register(ctx context.Context, acct *Account, prompt func(tosURL string) bool) (*Account, error) {
if c.Key == nil {
return nil, errors.New("acme: client.Key must be set to Register")
}
dir, err := c.Discover(ctx)
if err != nil {
return nil, err