|
32 | 32 | import java.security.KeyStore; |
33 | 33 | import java.security.SecureRandom; |
34 | 34 | import java.util.concurrent.ConcurrentLinkedQueue; |
35 | | -import java.util.concurrent.Executor; |
36 | | -import java.util.concurrent.Executors; |
| 35 | + |
37 | 36 |
|
38 | 37 | import javax.net.ssl.KeyManagerFactory; |
39 | 38 | import javax.net.ssl.SSLContext; |
@@ -430,7 +429,7 @@ public static SSLContext initClientSSLContext() throws GeneralSecurityException, |
430 | 429 | } |
431 | 430 |
|
432 | 431 | final KeyStore ks = loadKeyStore(stream, passphrase); |
433 | | - final TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509"); |
| 432 | + final TrustManagerFactory tmf = TrustManagerFactory.getInstance("PKIX"); |
434 | 433 | tmf.init(ks); |
435 | 434 | TrustManager[] tms; |
436 | 435 | if (stream != null) { |
@@ -607,7 +606,6 @@ public static boolean doHandshake(final SocketChannel socketChannel, final SSLEn |
607 | 606 | ByteBuffer myNetData = ByteBuffer.allocate(netBufferSize); |
608 | 607 | ByteBuffer peerNetData = ByteBuffer.allocate(netBufferSize); |
609 | 608 |
|
610 | | - final Executor executor = Executors.newSingleThreadExecutor(); |
611 | 609 | final long startTimeMills = System.currentTimeMillis(); |
612 | 610 |
|
613 | 611 | HandshakeStatus handshakeStatus = sslEngine.getHandshakeStatus(); |
@@ -644,7 +642,7 @@ public static boolean doHandshake(final SocketChannel socketChannel, final SSLEn |
644 | 642 | if (LOGGER.isTraceEnabled()) { |
645 | 643 | LOGGER.trace("SSL: Running delegated task!"); |
646 | 644 | } |
647 | | - executor.execute(task); |
| 645 | + task.run(); |
648 | 646 | } |
649 | 647 | break; |
650 | 648 | case FINISHED: |
|
0 commit comments