in cmd/conformance/main.go [1048:1087]
func runHandshakeTests(ctx context.Context) {
handshakeTestCases := []handshakeTest{
{
testName: "Valid request with proper TLS Client Handshake",
expectErr: false,
},
{
testName: "No TLS records in request",
expectErr: true,
mutateTLSRecords: emptyFn,
},
{
testName: "Invalid session key",
expectErr: true,
mutateSessionKey: emptyFn,
},
{
testName: "JWT has invalid signature",
expectErr: true,
mutateJWT: invalidateJwtSignature,
optional: true,
},
{
testName: "JWT has a bad audience",
expectErr: true,
mutateJWT: badAudience,
optional: true,
},
}
for _, testCase := range handshakeTestCases {
err := runHandshakeTestCase(ctx, testCase)
testPassed := testCase.expectErr == (err != nil)
if testPassed {
colour.Printf(" - ^2%v^R\n", testCase.testName)
} else {
printError(testCase.testName, err, testCase.optional)
}
}
}