Update DTLS test cases
package org.bouncycastle.tls.test;
+import org.bouncycastle.tls.ProtocolVersion;
+
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.bouncycastle.tls.ProtocolVersion;
public class DTLSTestSuite extends TestSuite
{
@@ -94,6 +95,7 @@ private static void addVersionTests(TestSuite testSuite, ProtocolVersion version
// c.clientAuth = C.CLIENT_AUTH_VALID;
// c.clientAuthSigAlg = new SignatureAndHashAlgorithm(HashAlgorithm.sha1, SignatureAlgorithm.rsa);
// c.serverCertReqSigAlgs = TlsUtils.getDefaultECDSASignatureAlgorithms();
+// c.serverCheckSigAlgOfClientCerts = false;
// c.expectServerFatalAlert(AlertDescription.illegal_parameter);
//
// addTestCase(testSuite, c, prefix + "BadCertificateVerifySigAlg");
@@ -144,6 +146,21 @@ private static void addVersionTests(TestSuite testSuite, ProtocolVersion version
// }
//
// /*
+// * Server sends SHA-256/RSA certificate, which is not the default {sha1,rsa} implied by the
+// * absent signature_algorithms extension. We expect fatal alert from the client when it
+// * verifies the certificate's 'signatureAlgorithm' against the implicit default signature_algorithms.
+// */
+// if (TlsUtils.isTLSv12(version))
+// {
+// TlsTestConfig c = createDTLSTestConfig(version);
+// c.clientSendSignatureAlgorithms = false;
+// c.serverAuthSigAlg = new SignatureAndHashAlgorithm(HashAlgorithm.sha256, SignatureAlgorithm.rsa);
+// c.expectClientFatalAlert(AlertDescription.certificate_unknown);
+//
+// addTestCase(testSuite, c, prefix + "BadServerCertSigAlg");
+// }
+//
+// /*
// * Server selects MD5/RSA for ServerKeyExchange signature, which is not in the default
// * supported signature algorithms that the client sent. We expect fatal alert from the
// * client when it verifies the selected algorithm against the supported algorithms.
@@ -165,6 +182,7 @@ private static void addVersionTests(TestSuite testSuite, ProtocolVersion version
// if (TlsUtils.isTLSv12(version))
// {
// TlsTestConfig c = createDTLSTestConfig(version);
+// c.clientCheckSigAlgOfServerCerts = false;
// c.clientSendSignatureAlgorithms = false;
// c.serverAuthSigAlg = new SignatureAndHashAlgorithm(HashAlgorithm.md5, SignatureAlgorithm.rsa);
// c.expectClientFatalAlert(AlertDescription.illegal_parameter);
