@@ -149,6 +149,35 @@ private static void AddVersionTests(IList testSuite, ProtocolVersion version)
149
149
150
150
AddTestCase ( testSuite , c , prefix + "BadMandatoryCertReqDeclined" ) ;
151
151
}
152
+
153
+ /*
154
+ * Server selects MD5/RSA for ServerKeyExchange signature, which is not in the default
155
+ * supported signature algorithms that the client sent. We expect fatal alert from the
156
+ * client when it verifies the selected algorithm against the supported algorithms.
157
+ */
158
+ if ( TlsUtilities . IsTlsV12 ( version ) )
159
+ {
160
+ TlsTestConfig c = CreateDtlsTestConfig ( version ) ;
161
+ c . serverAuthSigAlg = new SignatureAndHashAlgorithm ( HashAlgorithm . md5 , SignatureAlgorithm . rsa ) ;
162
+ c . ExpectClientFatalAlert ( AlertDescription . illegal_parameter ) ;
163
+
164
+ AddTestCase ( testSuite , c , prefix + "BadServerKeyExchangeSigAlg" ) ;
165
+ }
166
+
167
+ /*
168
+ * Server selects MD5/RSA for ServerKeyExchange signature, which is not the default {sha1,rsa}
169
+ * implied by the absent signature_algorithms extension. We expect fatal alert from the
170
+ * client when it verifies the selected algorithm against the implicit default.
171
+ */
172
+ if ( TlsUtilities . IsTlsV12 ( version ) )
173
+ {
174
+ TlsTestConfig c = CreateDtlsTestConfig ( version ) ;
175
+ c . clientSendSignatureAlgorithms = false ;
176
+ c . serverAuthSigAlg = new SignatureAndHashAlgorithm ( HashAlgorithm . md5 , SignatureAlgorithm . rsa ) ;
177
+ c . ExpectClientFatalAlert ( AlertDescription . illegal_parameter ) ;
178
+
179
+ AddTestCaseDebug ( testSuite , c , prefix + "BadServerKeyExchangeSigAlg2" ) ;
180
+ }
152
181
#endif
153
182
154
183
{
@@ -173,6 +202,11 @@ private static void AddVersionTests(IList testSuite, ProtocolVersion version)
173
202
}
174
203
175
204
private static void AddTestCase ( IList testSuite , TlsTestConfig config , String name )
205
+ {
206
+ //testSuite.Add(new TestCaseData(config).SetName(name));
207
+ }
208
+
209
+ private static void AddTestCaseDebug ( IList testSuite , TlsTestConfig config , String name )
176
210
{
177
211
testSuite . Add ( new TestCaseData ( config ) . SetName ( name ) ) ;
178
212
}
0 commit comments