@Test public void testEmptyUnsecureSSLVersions() { Set<String> unsecureSSLVersions = new HashSet<>(); packetAnalyzerResult = getPacketAnalyzerResult(unsecureSSLVersions); result = (UnsecureSSLVersionResult) ((UnsecureSSLVersionImpl) bestPractice).runTest(packetAnalyzerResult); assertEquals(0, result.getResults().size()); }
@Override public AbstractBestPracticeResult runTest(PacketAnalyzerResult tracedata) { Set<UnsecureSSLVersionEntry> entries = new HashSet<>(); try { List<Session> sessions = tracedata.getSessionlist(); for(Session session : sessions) { Set<String> unsecureSSLVersions = getUnsecureSSLVersionsInSession(session); if (!unsecureSSLVersions.isEmpty()) { String unsecureSSLVersionsStr = stringifyUnsecureSSLVersions(unsecureSSLVersions); UnsecureSSLVersionEntry entry = populateEntry(session, unsecureSSLVersionsStr); entries.add(entry); } } } catch(Exception e) { LOGGER.error("Error happened when running unsecure SSL Versions test :: Caused by: " + e.getMessage()); } return getTestResult(entries); }
UnsecureSSLVersionImpl implements IBestPractice { @Override public AbstractBestPracticeResult runTest(PacketAnalyzerResult tracedata) { Set<UnsecureSSLVersionEntry> entries = new HashSet<>(); try { List<Session> sessions = tracedata.getSessionlist(); for(Session session : sessions) { Set<String> unsecureSSLVersions = getUnsecureSSLVersionsInSession(session); if (!unsecureSSLVersions.isEmpty()) { String unsecureSSLVersionsStr = stringifyUnsecureSSLVersions(unsecureSSLVersions); UnsecureSSLVersionEntry entry = populateEntry(session, unsecureSSLVersionsStr); entries.add(entry); } } } catch(Exception e) { LOGGER.error("Error happened when running unsecure SSL Versions test :: Caused by: " + e.getMessage()); } return getTestResult(entries); } }
UnsecureSSLVersionImpl implements IBestPractice { @Override public AbstractBestPracticeResult runTest(PacketAnalyzerResult tracedata) { Set<UnsecureSSLVersionEntry> entries = new HashSet<>(); try { List<Session> sessions = tracedata.getSessionlist(); for(Session session : sessions) { Set<String> unsecureSSLVersions = getUnsecureSSLVersionsInSession(session); if (!unsecureSSLVersions.isEmpty()) { String unsecureSSLVersionsStr = stringifyUnsecureSSLVersions(unsecureSSLVersions); UnsecureSSLVersionEntry entry = populateEntry(session, unsecureSSLVersionsStr); entries.add(entry); } } } catch(Exception e) { LOGGER.error("Error happened when running unsecure SSL Versions test :: Caused by: " + e.getMessage()); } return getTestResult(entries); }  }
UnsecureSSLVersionImpl implements IBestPractice { @Override public AbstractBestPracticeResult runTest(PacketAnalyzerResult tracedata) { Set<UnsecureSSLVersionEntry> entries = new HashSet<>(); try { List<Session> sessions = tracedata.getSessionlist(); for(Session session : sessions) { Set<String> unsecureSSLVersions = getUnsecureSSLVersionsInSession(session); if (!unsecureSSLVersions.isEmpty()) { String unsecureSSLVersionsStr = stringifyUnsecureSSLVersions(unsecureSSLVersions); UnsecureSSLVersionEntry entry = populateEntry(session, unsecureSSLVersionsStr); entries.add(entry); } } } catch(Exception e) { LOGGER.error("Error happened when running unsecure SSL Versions test :: Caused by: " + e.getMessage()); } return getTestResult(entries); }  @Override AbstractBestPracticeResult runTest(PacketAnalyzerResult tracedata); }
UnsecureSSLVersionImpl implements IBestPractice { @Override public AbstractBestPracticeResult runTest(PacketAnalyzerResult tracedata) { Set<UnsecureSSLVersionEntry> entries = new HashSet<>(); try { List<Session> sessions = tracedata.getSessionlist(); for(Session session : sessions) { Set<String> unsecureSSLVersions = getUnsecureSSLVersionsInSession(session); if (!unsecureSSLVersions.isEmpty()) { String unsecureSSLVersionsStr = stringifyUnsecureSSLVersions(unsecureSSLVersions); UnsecureSSLVersionEntry entry = populateEntry(session, unsecureSSLVersionsStr); entries.add(entry); } } } catch(Exception e) { LOGGER.error("Error happened when running unsecure SSL Versions test :: Caused by: " + e.getMessage()); } return getTestResult(entries); }  @Override AbstractBestPracticeResult runTest(PacketAnalyzerResult tracedata);  }