@@ -11,7 +11,6 @@ import (
1111 "github.com/miekg/dns"
1212
1313 "github.com/letsencrypt/boulder/core"
14- "github.com/letsencrypt/boulder/features"
1514 "github.com/letsencrypt/boulder/identifier"
1615 "github.com/letsencrypt/boulder/probs"
1716 "github.com/letsencrypt/boulder/test"
@@ -411,11 +410,9 @@ func TestCAAChecking(t *testing.T) {
411410 params := & caaParams {accountURIID : accountURIID , validationMethod : method }
412411
413412 va , _ := setup (nil , 0 , "" , nil )
414- err := features .Set (map [string ]bool {"CAAValidationMethods" : true , "CAAAccountURI" : true })
415- test .AssertNotError (t , err , "failed to enable features" )
416-
417413 va .dnsClient = caaMockDNS {}
418414 va .accountURIPrefixes = []string {"https://letsencrypt.org/acct/reg/" }
415+
419416 for _ , caaTest := range testCases {
420417 mockLog := va .log .(* blog.Mock )
421418 mockLog .Clear ()
@@ -433,49 +430,6 @@ func TestCAAChecking(t *testing.T) {
433430 }
434431 })
435432 }
436-
437- // Reset to disable CAAValidationMethods/CAAAccountURI.
438- features .Reset ()
439-
440- // present-dns-only.com should now be valid even with http-01
441- ident := identifier .DNSIdentifier ("present-dns-only.com" )
442- foundAt , valid , _ , err := va .checkCAARecords (ctx , ident , params )
443- test .AssertNotError (t , err , "present-dns-only.com" )
444- test .AssertEquals (t , foundAt , "present-dns-only.com" )
445- test .Assert (t , valid , "Valid should be true" )
446-
447- // present-incorrect-accounturi.com should now be also be valid
448- ident = identifier .DNSIdentifier ("present-incorrect-accounturi.com" )
449- foundAt , valid , _ , err = va .checkCAARecords (ctx , ident , params )
450- test .AssertNotError (t , err , "present-incorrect-accounturi.com" )
451- test .AssertEquals (t , foundAt , "present-incorrect-accounturi.com" )
452- test .Assert (t , valid , "Valid should be true" )
453-
454- // nil params should be valid, too
455- foundAt , valid , _ , err = va .checkCAARecords (ctx , ident , nil )
456- test .AssertNotError (t , err , "present-incorrect-accounturi.com" )
457- test .AssertEquals (t , foundAt , "present-incorrect-accounturi.com" )
458- test .Assert (t , valid , "Valid should be true" )
459-
460- ident .Value = "servfail.com"
461- foundAt , valid , _ , err = va .checkCAARecords (ctx , ident , nil )
462- test .AssertError (t , err , "servfail.com" )
463- test .AssertEquals (t , foundAt , "" )
464- test .Assert (t , ! valid , "Valid should be false" )
465-
466- if _ , _ , _ , err := va .checkCAARecords (ctx , ident , nil ); err == nil {
467- t .Errorf ("Should have returned error on CAA lookup, but did not: %s" , ident .Value )
468- }
469-
470- ident .Value = "servfail.present.com"
471- foundAt , valid , _ , err = va .checkCAARecords (ctx , ident , nil )
472- test .AssertError (t , err , "servfail.present.com" )
473- test .AssertEquals (t , foundAt , "" )
474- test .Assert (t , ! valid , "Valid should be false" )
475-
476- if _ , _ , _ , err := va .checkCAARecords (ctx , ident , nil ); err == nil {
477- t .Errorf ("Should have returned error on CAA lookup, but did not: %s" , ident .Value )
478- }
479433}
480434
481435func TestCAALogging (t * testing.T ) {
0 commit comments