瀏覽代碼

Merge pull request #1089 from smallstep/attestation-error

Revert ValidatedAt
Mariano Cano 4 年之前
父節點
當前提交
818dffe6fe
共有 3 個文件被更改,包括 2 次插入 和 2 次删除
  1. 0 1
      acme/challenge.go
  2. 0 1
      acme/challenge_test.go
  3. 2 0
      acme/errors.go

+ 0 - 1
acme/challenge.go

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

+ 0 - 1
acme/challenge_test.go

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

+ 2 - 0
acme/errors.go

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