backchatio/hookup — pull request #11 by stasimus (2013-09-23 12:39:45+00:00)
Title: Added SSL encryption support to HookupClient.

HookupClient is now supporting the SSL encryption.
HookupClientConfig.sslContext is an optional property, that can be set as expected SSLContext implementation.
For example, ssl context that accept any untrusted certificate - can be created via:

def trustfulSslContext: SSLContext = {
object BlindFaithX509TrustManager extends X509TrustManager {
def checkClientTrusted(chain: Array[X509Certificate], authType: String) = ()

def checkServerTrusted(chain: Array[X509Certificate], authType: String) = ()

def getAcceptedIssuers = Array[X509Certificate]()
}

val context = SSLContext.getInstance("TLS")
context.init(Array[KeyManager](), Array(BlindFaithX509TrustManager), null)
context
}