Skip to content

Commit cf9b504

Browse files
IgorZaitsev-GBIHaiHoang-GBI
authored andcommitted
[SAD-290] Add DefaultSSLProtocolTest
1 parent daa3686 commit cf9b504

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package com.groupbyinc;
2+
3+
import org.junit.Assert;
4+
import org.junit.Test;
5+
6+
import javax.net.ssl.SSLContext;
7+
import java.security.NoSuchAlgorithmException;
8+
import java.util.Arrays;
9+
10+
public class DefaultSSLProtocolTest {
11+
12+
@Test
13+
public void testTLSVersionSupported() throws NoSuchAlgorithmException {
14+
Assert.assertTrue(Arrays.stream(SSLContext.getDefault().createSSLEngine().getEnabledProtocols())
15+
.filter(tls -> tls.equals("TLSv1.2") || tls.equals("TLSv1.3"))
16+
.findFirst().isPresent());
17+
}
18+
}

0 commit comments

Comments
 (0)