Skip to content

Instantly share code, notes, and snippets.

@gseitz
Created September 2, 2010 20:04
Show Gist options
  • Save gseitz/562846 to your computer and use it in GitHub Desktop.
Save gseitz/562846 to your computer and use it in GitHub Desktop.
// dependency: org.apache.httpcomponents %% httpclient % 4.0.1
class SSLTest {
import javax.net.ssl.SSLContext
import org.apache.http.conn.ssl.SSLSocketFactory
val ctx = SSLContext.getInstance("TLS")
ctx.init(null, null, null)
val sf = new SSLSocketFactory(ctx)
}
// results in
// [error] ..../src/main/scala/Activity.scala:67: type mismatch;
// [error] found : javax.net.ssl.SSLContext
// [error] required: java.security.KeyStore
// [error] val sf = new SSLSocketFactory(ctx)
// [error] ^
// [error] one error found
// BUT there should be a constructor o.a.h.c.ssl.SSLSocketFactory(javax.net.ssl.SSLContext)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment