diff --git a/authority/tls.go b/authority/tls.go index 9cd938a4..6e213ca6 100644 --- a/authority/tls.go +++ b/authority/tls.go @@ -360,6 +360,7 @@ func (a *Authority) Revoke(ctx context.Context, revokeOpts *RevokeOptions) error ReasonCode: revokeOpts.ReasonCode, Reason: revokeOpts.Reason, MTLS: revokeOpts.MTLS, + ACME: revokeOpts.ACME, RevokedAt: time.Now().UTC(), } diff --git a/authority/tls_test.go b/authority/tls_test.go index 03beb5c1..060b3bff 100644 --- a/authority/tls_test.go +++ b/authority/tls_test.go @@ -1267,6 +1267,23 @@ func TestAuthority_Revoke(t *testing.T) { }, } }, + "ok/ACME": func() test { + _a := testAuthority(t, WithDatabase(&db.MockAuthDB{})) + + crt, err := pemutil.ReadCertificate("./testdata/certs/foo.crt") + assert.FatalError(t, err) + + return test{ + auth: _a, + opts: &RevokeOptions{ + Crt: crt, + Serial: "102012593071130646873265215610956555026", + ReasonCode: reasonCode, + Reason: reason, + ACME: true, + }, + } + }, } for name, f := range tests { tc := f() diff --git a/db/db.go b/db/db.go index 2643e577..6d48723f 100644 --- a/db/db.go +++ b/db/db.go @@ -104,6 +104,7 @@ type RevokedCertificateInfo struct { RevokedAt time.Time TokenID string MTLS bool + ACME bool } // IsRevoked returns whether or not a certificate with the given identifier