AlgorithmResolver { public static Set<PublicKeyAlgorithm> getRequiredKeystoreAlgorithms(CipherSuite cipherSuite) { String cipher = cipherSuite.toString().toUpperCase(); Set<PublicKeyAlgorithm> result = new HashSet<>(); if (cipher.contains("RSA")) { result.add(PublicKeyAlgorithm.RSA); } else if (cipher.contains("ECDSA")) { result.add(PublicKeyAlgorithm.EC); } else if (cipher.contains("DSS")) { result.add(PublicKeyAlgorithm.DH); } else if (cipher.contains("GOSTR341112")) { result.add(PublicKeyAlgorithm.GOST12); } else if (cipher.contains("GOSTR341001")) { result.add(PublicKeyAlgorithm.GOST01); } if (cipher.contains("_ECDH_")) { result.add(PublicKeyAlgorithm.EC); } else if (cipher.contains("_DH_")) { result.add(PublicKeyAlgorithm.DH); } return result; } private  AlgorithmResolver(); static PRFAlgorithm getPRFAlgorithm(ProtocolVersion protocolVersion, CipherSuite cipherSuite); static DigestAlgorithm getDigestAlgorithm(ProtocolVersion protocolVersion, CipherSuite cipherSuite); static KeyExchangeAlgorithm getKeyExchangeAlgorithm(CipherSuite cipherSuite); static Set<PublicKeyAlgorithm> getRequiredKeystoreAlgorithms(CipherSuite cipherSuite); static CipherAlgorithm getCipher(CipherSuite cipherSuite); static BulkCipherAlgorithm getBulkCipherAlgorithm(CipherSuite cipherSuite); static CipherType getCipherType(CipherSuite cipherSuite); static MacAlgorithm getMacAlgorithm(ProtocolVersion protocolVersion, CipherSuite cipherSuite); static HKDFAlgorithm getHKDFAlgorithm(CipherSuite cipherSuite);  }
@Test public void testGetRequiredKeystoreAlgorithms() { }