Skip to content

Instantly share code, notes, and snippets.

@junaidk
Created February 11, 2016 11:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save junaidk/237e49c36b3752a29597 to your computer and use it in GitHub Desktop.
Save junaidk/237e49c36b3752a29597 to your computer and use it in GitHub Desktop.
package hello
import HelloWorldApp._
//remove if not needed
import scala.collection.JavaConversions._
object HelloWorldApp {
def main(args: Array[String]) {
println("Hello World!")
}
}
class HelloWorldApp {
var trustAllCerts: Array[TrustManager] = Array(new X509TrustManager() {
def getAcceptedIssuers(): Array[java.security.cert.X509Certificate] = new Array[TrustManager](0)
def checkClientTrusted(certs: Array[java.security.cert.X509Certificate], authType: String) {
}
def checkServerTrusted(certs: Array[java.security.cert.X509Certificate], authType: String) {
}
})
}
@mukrram-bajwa
Copy link

package hello

import HelloWorldApp._
//remove if not needed
import scala.collection.JavaConversions._

object HelloWorldApp {

  def main(args: Array[String]) {
    println("Hello World!")
  }
}

class HelloWorldApp {

  var trustAllCerts: Array[TrustManager] = Array(new X509TrustManager() {

    def getAcceptedIssuers(): Array[java.security.cert.X509Certificate] = new Array[X509Certificate](0)

    def checkClientTrusted(certs: Array[java.security.cert.X509Certificate], authType: String) {
    }

    def checkServerTrusted(certs: Array[java.security.cert.X509Certificate], authType: String) {
    }
  })
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment