Skip to content

Instantly share code, notes, and snippets.

View helmbold's full-sized avatar

Christian Helmbold helmbold

View GitHub Profile
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>info.cukes</groupId>
<artifactId>cucumber-jvm</artifactId>
<relativePath>../pom.xml</relativePath>
<version>1.1.8-SNAPSHOT</version>
</parent>
@helmbold
helmbold / CarelessHttpsClient.scala
Last active August 3, 2018 03:50
Apache HTTP Client (version 4.5) that ignores certificate warnings/errors
import java.security.cert.X509Certificate
import org.apache.http.config.RegistryBuilder
import org.apache.http.conn.socket.{ConnectionSocketFactory, PlainConnectionSocketFactory}
import org.apache.http.conn.ssl.{NoopHostnameVerifier, SSLConnectionSocketFactory, TrustStrategy}
import org.apache.http.impl.client.{CloseableHttpClient, HttpClients}
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager
import org.apache.http.ssl.SSLContextBuilder
object CarelessHttpsClient {