private String[] filterCipherSuits(SSLEngine result) { if (null==cipherSuits) { //TODO: rewrite with recursive count... String[] enabledCipherSuites = result.getSupportedCipherSuites(); int count = 0; int i = enabledCipherSuites.length; while (--i>=0) { if (containsPerfectForward(enabledCipherSuites, i)) { if (doesNotContainWeakCipher(enabledCipherSuites, i)) { count++; } } } String[] temp = new String[count]; i = enabledCipherSuites.length; int j = 0; while (--i>=0) { if (containsPerfectForward(enabledCipherSuites, i)) { if (doesNotContainWeakCipher(enabledCipherSuites, i)) { if (LOG_CYPHERS) { logger.info("enable cipher suite: {}",enabledCipherSuites[i]); } temp[j++]=enabledCipherSuites[i]; } } } cipherSuits = temp; } return cipherSuits; }
private String[] filterCipherSuits(SSLEngine result) { if (null==cipherSuits) { //TODO: rewrite with recursive count... String[] enabledCipherSuites = result.getSupportedCipherSuites(); int count = 0; int i = enabledCipherSuites.length; while (--i>=0) { if (containsPerfectForward(enabledCipherSuites, i)) { if (doesNotContainWeakCipher(enabledCipherSuites, i)) { count++; } } } String[] temp = new String[count]; i = enabledCipherSuites.length; int j = 0; while (--i>=0) { if (containsPerfectForward(enabledCipherSuites, i)) { if (doesNotContainWeakCipher(enabledCipherSuites, i)) { if (LOG_CYPHERS) { logger.info("enable cipher suite: {}",enabledCipherSuites[i]); } temp[j++]=enabledCipherSuites[i]; } } } cipherSuits = temp; } return cipherSuits; }
private String[] filterCipherSuits(SSLEngine result) { if (null==cipherSuits) { //TODO: rewrite with recursive count... String[] enabledCipherSuites = result.getSupportedCipherSuites(); int count = 0; int i = enabledCipherSuites.length; while (--i>=0) { if (containsPerfectForward(enabledCipherSuites, i)) { if (doesNotContainWeakCipher(enabledCipherSuites, i)) { count++; } } } String[] temp = new String[count]; i = enabledCipherSuites.length; int j = 0; while (--i>=0) { if (containsPerfectForward(enabledCipherSuites, i)) { if (doesNotContainWeakCipher(enabledCipherSuites, i)) { if (LOG_CYPHERS) { logger.info("enable cipher suite: {}",enabledCipherSuites[i]); } temp[j++]=enabledCipherSuites[i]; } } } cipherSuits = temp; } return cipherSuits; }