@@ -39,6 +39,14 @@ type ZeroSSLIssuer struct {
39
39
// REQUIRED.
40
40
APIKey string
41
41
42
+ // Where to store verification material temporarily.
43
+ // All instances in a cluster should have the same
44
+ // Storage value to enable distributed verification.
45
+ // REQUIRED. (TODO: Make it optional for those not
46
+ // operating in a cluster. For now, it's simpler to
47
+ // put info in storage whether distributed or not.)
48
+ Storage Storage
49
+
42
50
// How many days the certificate should be valid for.
43
51
ValidityDays int
44
52
@@ -54,11 +62,6 @@ type ZeroSSLIssuer struct {
54
62
// validation, set this field.
55
63
CNAMEValidation * DNSManager
56
64
57
- // Where to store verification material temporarily.
58
- // Set this on all instances in a cluster to the same
59
- // value to enable distributed verification.
60
- Storage Storage
61
-
62
65
// An optional (but highly recommended) logger.
63
66
Logger * zap.Logger
64
67
}
@@ -266,6 +269,10 @@ func (iss *ZeroSSLIssuer) Revoke(ctx context.Context, cert CertificateResource,
266
269
}
267
270
268
271
func (iss * ZeroSSLIssuer ) getDistributedValidationInfo (ctx context.Context , identifier string ) (acme.Challenge , bool , error ) {
272
+ if iss .Storage == nil {
273
+ return acme.Challenge {}, false , nil
274
+ }
275
+
269
276
ds := distributedSolver {
270
277
storage : iss .Storage ,
271
278
storageKeyIssuerPrefix : StorageKeys .Safe (iss .IssuerKey ()),
0 commit comments