@Test
    public void testSigAlgParams() {
        ServiceTester tester = ServiceTester.test("CertificateFactory").withAlgorithm("X509");
        tester.run((p, algorithm) -> {
            X509Certificate c = certificateFromPEM(p, SIGALG_NO_PARAMETER);
            assertNull(c.getSigAlgParams());

            c = certificateFromPEM(p, SIGALG_NULL_PARAMETER);
            // Although documented to only return null when there are no parameters, the SUN
            // provider also returns null when the algorithm uses an explicit parameter with a
            // value of ASN.1 NULL.
            if (c.getSigAlgParams() != null) {
                assertArrayEquals(TestUtils.decodeHex("0500"), c.getSigAlgParams());
            }

            c = certificateFromPEM(p, SIGALG_STRING_PARAMETER);
            assertArrayEquals(TestUtils.decodeHex("0c05706172616d"), c.getSigAlgParams());

            c = certificateFromPEM(p, SIGALG_BOOLEAN_PARAMETER);
            assertArrayEquals(TestUtils.decodeHex("0101ff"), c.getSigAlgParams());

            c = certificateFromPEM(p, SIGALG_SEQUENCE_PARAMETER);
            assertArrayEquals(TestUtils.decodeHex("3000"), c.getSigAlgParams());
        });
    }
Confirm that explicit EC params aren't accepted in certificates.
common/src/test/java/org/conscrypt/java/security/cert/X509CertificateTest.java