public TlsProtocolFinder() { // Try to find a secure SelectorThread. Enumeration<SelectorThread> selectors = SelectorThread.getSelectors(); SelectorThread sel; while (selectors.hasMoreElements()){ sel = selectors.nextElement(); if (sel instanceof SSLSelectorThread){ needClientAuth = ((SSLSelectorThread)sel).isNeedClientAuth(); wantClientAuth = ((SSLSelectorThread)sel).isWantClientAuth(); break; } } }
if (isNeedClientAuth()) { sslEngine.setNeedClientAuth(true); } else if (isWantClientAuth()) {