@Test public void testCipherSuiteNotSupportForwardSecrecy() { String cipherSuite = null; packetAnalyzerResult = getPacketAnalyzerResult(cipherSuite); result = (ForwardSecrecyResult) ((ForwardSecrecyImpl) bestPractice).runTest(packetAnalyzerResult); assertEquals(0, result.getResults().size()); }
@Override public AbstractBestPracticeResult runTest(PacketAnalyzerResult tracedata) { Set<ForwardSecrecyEntry> entries = new HashSet<>(); List<Session> sessions = tracedata.getSessionlist(); for(Session session : sessions) { String selectedCipher = getSelectedCipherInSession(session); if (selectedCipher != null) { entries.add(populateEntry(session, selectedCipher)); } } return getTestResult(entries); }
ForwardSecrecyImpl implements IBestPractice { @Override public AbstractBestPracticeResult runTest(PacketAnalyzerResult tracedata) { Set<ForwardSecrecyEntry> entries = new HashSet<>(); List<Session> sessions = tracedata.getSessionlist(); for(Session session : sessions) { String selectedCipher = getSelectedCipherInSession(session); if (selectedCipher != null) { entries.add(populateEntry(session, selectedCipher)); } } return getTestResult(entries); } }
ForwardSecrecyImpl implements IBestPractice { @Override public AbstractBestPracticeResult runTest(PacketAnalyzerResult tracedata) { Set<ForwardSecrecyEntry> entries = new HashSet<>(); List<Session> sessions = tracedata.getSessionlist(); for(Session session : sessions) { String selectedCipher = getSelectedCipherInSession(session); if (selectedCipher != null) { entries.add(populateEntry(session, selectedCipher)); } } return getTestResult(entries); }  }
ForwardSecrecyImpl implements IBestPractice { @Override public AbstractBestPracticeResult runTest(PacketAnalyzerResult tracedata) { Set<ForwardSecrecyEntry> entries = new HashSet<>(); List<Session> sessions = tracedata.getSessionlist(); for(Session session : sessions) { String selectedCipher = getSelectedCipherInSession(session); if (selectedCipher != null) { entries.add(populateEntry(session, selectedCipher)); } } return getTestResult(entries); }  @Override AbstractBestPracticeResult runTest(PacketAnalyzerResult tracedata); }
ForwardSecrecyImpl implements IBestPractice { @Override public AbstractBestPracticeResult runTest(PacketAnalyzerResult tracedata) { Set<ForwardSecrecyEntry> entries = new HashSet<>(); List<Session> sessions = tracedata.getSessionlist(); for(Session session : sessions) { String selectedCipher = getSelectedCipherInSession(session); if (selectedCipher != null) { entries.add(populateEntry(session, selectedCipher)); } } return getTestResult(entries); }  @Override AbstractBestPracticeResult runTest(PacketAnalyzerResult tracedata);  }