"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "va/tlsalpn_test.go" between
boulder-release-2021-07-12.tar.gz and boulder-release-2021-07-19.tar.gz

About: Boulder is an ACME-based Certificate Authority (CA) used by Let’s Encrypt (written in Go).

tlsalpn_test.go  (boulder-release-2021-07-12):tlsalpn_test.go  (boulder-release-2021-07-19)
skipping to change at line 465 skipping to change at line 465
func TestValidateTLSALPN01UnawareSrv(t *testing.T) { func TestValidateTLSALPN01UnawareSrv(t *testing.T) {
chall := tlsalpnChallenge() chall := tlsalpnChallenge()
hs := tlssniSrvWithNames(t, chall, "localhost") hs := tlssniSrvWithNames(t, chall, "localhost")
va, _ := setup(hs, 0, "", nil) va, _ := setup(hs, 0, "", nil)
_, prob := va.validateTLSALPN01(ctx, dnsi("localhost"), chall) _, prob := va.validateTLSALPN01(ctx, dnsi("localhost"), chall)
if prob == nil { if prob == nil {
t.Fatalf("TLS ALPN validation should have failed.") t.Fatalf("TLS ALPN validation should have failed.")
} }
test.AssertEquals(t, prob.Type, probs.UnauthorizedProblem) // In go1.16 it makes the connection but shouldn't be able to complete it
;
// in go1.17 the stdlib refuses to handshake when there is no overlap in
// negotiated TLS application protocols.
go116ok := prob.Type == probs.UnauthorizedProblem
go117ok := prob.Type == probs.TLSProblem
test.Assert(t, go116ok != go117ok, "Only one of go1.16 or go1.17 should p
ass")
} }
// TestValidateTLSALPN01BadUTFSrv tests that validating TLS-ALPN-01 against // TestValidateTLSALPN01BadUTFSrv tests that validating TLS-ALPN-01 against
// a host that returns a certificate with a SAN/CN that contains invalid UTF-8 // a host that returns a certificate with a SAN/CN that contains invalid UTF-8
// will result in a problem with the invalid UTF-8. // will result in a problem with the invalid UTF-8.
func TestValidateTLSALPN01BadUTFSrv(t *testing.T) { func TestValidateTLSALPN01BadUTFSrv(t *testing.T) {
chall := tlsalpnChallenge() chall := tlsalpnChallenge()
_, err := tlsalpn01Srv(t, chall, IdPeAcmeIdentifier, 0, "localhost", "\xf 0\x28\x8c\xbc") _, err := tlsalpn01Srv(t, chall, IdPeAcmeIdentifier, 0, "localhost", "\xf 0\x28\x8c\xbc")
test.AssertContains(t, err.Error(), "cannot be encoded as an IA5String") test.AssertContains(t, err.Error(), "cannot be encoded as an IA5String")
} }
 End of changes. 1 change blocks. 
1 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)