Merge pull request #1089 from smallstep/attestation-error

Revert ValidatedAt
This commit is contained in:
Mariano Cano 2022-10-03 13:15:42 -07:00 committed by GitHub
commit 818dffe6fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 2 deletions

View file

@ -729,7 +729,6 @@ func storeError(ctx context.Context, db DB, ch *Challenge, markInvalid bool, err
ch.Error = err
if markInvalid {
ch.Status = StatusInvalid
ch.ValidatedAt = clock.Now().Format(time.RFC3339)
}
if err := db.UpdateChallenge(ctx, ch); err != nil {
return WrapErrorISE(err, "failure saving error to acme challenge")

View file

@ -170,7 +170,6 @@ func Test_storeError(t *testing.T) {
assert.Equals(t, updch.Token, ch.Token)
assert.Equals(t, updch.Value, ch.Value)
assert.Equals(t, updch.Status, StatusInvalid)
assert.True(t, updch.ValidatedAt != "")
assert.HasPrefix(t, updch.Error.Err.Error(), err.Err.Error())
assert.Equals(t, updch.Error.Type, err.Type)

View file

@ -75,6 +75,8 @@ func (ap ProblemType) String() string {
return "accountDoesNotExist"
case ErrorAlreadyRevokedType:
return "alreadyRevoked"
case ErrorBadAttestationStatementType:
return "badAttestationStatement"
case ErrorBadCSRType:
return "badCSR"
case ErrorBadNonceType: