Present invokes the underlying solver's Present method and also stores domain, token, and keyAuth to the storage backing the certificate cache of dhs.acmeIssuer.
(ctx context.Context, chal acme.Challenge)
| 632 | // and also stores domain, token, and keyAuth to the storage |
| 633 | // backing the certificate cache of dhs.acmeIssuer. |
| 634 | func (dhs distributedSolver) Present(ctx context.Context, chal acme.Challenge) error { |
| 635 | infoBytes, err := json.Marshal(chal) |
| 636 | if err != nil { |
| 637 | return err |
| 638 | } |
| 639 | |
| 640 | err = dhs.storage.Store(ctx, dhs.challengeTokensKey(challengeKey(chal)), infoBytes) |
| 641 | if err != nil { |
| 642 | return err |
| 643 | } |
| 644 | |
| 645 | err = dhs.solver.Present(ctx, chal) |
| 646 | if err != nil { |
| 647 | return fmt.Errorf("presenting with embedded solver: %v", err) |
| 648 | } |
| 649 | return nil |
| 650 | } |
| 651 | |
| 652 | // Wait wraps the underlying solver's Wait() method, if any. Implements acmez.Waiter. |
| 653 | func (dhs distributedSolver) Wait(ctx context.Context, challenge acme.Challenge) error { |
nothing calls this directly
no test coverage detected