Skip to content

Commit

Permalink
Add test for CipherSuite + Certificate mismatch
Browse files Browse the repository at this point in the history
Resolves #350
  • Loading branch information
Sean-Der committed Jun 3, 2024
1 parent edc7ad0 commit e70f03b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions conn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,17 @@ func TestHandshakeWithAlert(t *testing.T) {
errServer: &alertError{&alert.Alert{Level: alert.Fatal, Description: alert.InsufficientSecurity}},
errClient: errNoAvailableSignatureSchemes,
},
// Servers have agreement on Ciphersuite, but attempted to use RSA CipherSuite with ECDSA certificate
"RSACipherWithECDSACertificate": {
configServer: &Config{
CipherSuites: []CipherSuiteID{TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256},
},
configClient: &Config{
CipherSuites: []CipherSuiteID{TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256},
},
errServer: errCipherSuiteNoIntersection,
errClient: &alertError{&alert.Alert{Level: alert.Fatal, Description: alert.InsufficientSecurity}},
},
}

for name, testCase := range cases {
Expand Down

0 comments on commit e70f03b

Please sign in to comment.