@@ -524,8 +524,6 @@ public long beforeHandshake(long c) throws SSLException {
524524 @ Override
525525 public void afterHandshake (long session , long ssl , long context , Socket socket ,
526526 FileDescriptor fd , SSLHandshakeCallbacks callback ) throws Exception {
527- assertFalse (NativeCrypto .SSL_ech_accepted (ssl , null ));
528- assertNull (NativeCrypto .SSL_get0_ech_name_override (ssl , null ));
529527 byte [] retryConfigs = NativeCrypto .SSL_get0_ech_retry_configs (ssl , null );
530528 assertEquals (5 , retryConfigs .length ); // should be the invalid ECH Config List
531529 super .afterHandshake (session , ssl , context , socket , fd , callback );
@@ -748,12 +746,19 @@ public void test_SSL_set_enable_ech_grease() throws Exception {
748746 }
749747
750748 @ Test
751- public void test_SSL_set1_ech_config_list () throws Exception {
749+ public void test_SSL_set1_ech_valid_config_list () throws Exception {
752750 long c = NativeCrypto .SSL_CTX_new ();
753751 long s = NativeCrypto .SSL_new (c , null );
754752
755753 final byte [] configList = readTestFile ("boringssl-ech-config-list.bin" );
756754 assertTrue (NativeCrypto .SSL_set1_ech_config_list (s , null , configList ));
755+ }
756+
757+ @ Test
758+ public void test_SSL_set1_ech_invalid_config_list () throws Exception {
759+ long c = NativeCrypto .SSL_CTX_new ();
760+ long s = NativeCrypto .SSL_new (c , null );
761+
757762 byte [] badConfigList = {
758763 0x00 , 0x05 , (byte ) 0xfe , 0x0d , (byte ) 0xff , (byte ) 0xff , (byte ) 0xff
759764 };
0 commit comments