diff options
Diffstat (limited to 'jrt/src/com/yahoo/jrt/Transport.java')
-rw-r--r-- | jrt/src/com/yahoo/jrt/Transport.java | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/jrt/src/com/yahoo/jrt/Transport.java b/jrt/src/com/yahoo/jrt/Transport.java index ad42409c48a..6f5a381fd6b 100644 --- a/jrt/src/com/yahoo/jrt/Transport.java +++ b/jrt/src/com/yahoo/jrt/Transport.java @@ -68,14 +68,26 @@ public class Transport { } /** - * Use the underlying CryptoEngine to create a CryptoSocket. + * Use the underlying CryptoEngine to create a CryptoSocket for + * the client side of a connection. * * @return CryptoSocket handling appropriate encryption * @param channel low-level socket channel to be wrapped by the CryptoSocket - * @param isServer flag indicating which end of the connection we are + * @param spec who we are connecting to, for hostname validation **/ - CryptoSocket createCryptoSocket(SocketChannel channel, boolean isServer) { - return cryptoEngine.createCryptoSocket(channel, isServer); + CryptoSocket createClientCryptoSocket(SocketChannel channel, Spec spec) { + return cryptoEngine.createClientCryptoSocket(channel, spec); + } + + /** + * Use the underlying CryptoEngine to create a CryptoSocket for + * the server side of a connection. + * + * @return CryptoSocket handling appropriate encryption + * @param channel low-level socket channel to be wrapped by the CryptoSocket + **/ + CryptoSocket createServerCryptoSocket(SocketChannel channel) { + return cryptoEngine.createServerCryptoSocket(channel); } /** |