CipherSuiteList getActiveCipherSuites ( ) { if ( activeCipherSuites == null ) { if ( activeProtocols == null ) { activeProtocols = getActiveProtocols ( ) ; } ArrayList < CipherSuite > suites = new ArrayList <> ( ) ; if ( ! ( activeProtocols . collection ( ) . isEmpty ( ) ) && activeProtocols . min . v != ProtocolVersion . NONE . v ) { for ( CipherSuite suite : enabledCipherSuites . collection ( ) ) { if ( suite . obsoleted > activeProtocols . min . v && suite . supported <= activeProtocols . max . v ) { if ( algorithmConstraints . permits ( EnumSet . of ( CryptoPrimitive . KEY_AGREEMENT ) , suite . name , null ) ) { suites . add ( suite ) ; } } else if ( debug != null && Debug . isOn ( "verbose" ) ) { if ( suite . obsoleted <= activeProtocols . min . v ) { System . out . println ( "Ignoring obsoleted cipher suite: " + suite ) ; } else { System . out . println ( "Ignoring unsupported cipher suite: " + suite ) ; } } } } activeCipherSuites = new CipherSuiteList ( suites ) ; } return activeCipherSuites ; }
Get the active cipher suites .