README.md 1.33 KB
Newer Older
Claude Brisson's avatar
Claude Brisson committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
# Relaxed SSL Embedded Jetty

See [jetty-how-to-validate-ssl-client-certs-in-application-code](https://stackoverflow.com/a/46813898/710286) for usage.

Use class name: `com.republicate.relaxedssljetty.RelaxedSslContextFactory` .

In your pom:

    <repositories>
        <repository>
            <id>republicate.com</id>
            <url>http://republicate.com/maven2</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <!-- <updatePolicy>always</updatePolicy> -->
                <checksumPolicy>fail</checksumPolicy>
            </snapshots>
        </repository>
    </repositories>

and:

    <plugin>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
        <version>${jetty.version}</version>
        ...
        <dependencies>
            ...
            <dependency>
                <groupId>com.republicate.relaxed-ssl-jetty</groupId>
                <artifactId>relaxed-ssl-context-factory</artifactId>
                <version>1.0-SNAPSHOT</version>
            </dependency>
    </plugin>

In jetty-ssl.xml:

    <Configure id="sslContextFactory" class="com.republicate.relaxedssljetty.RelaxedSslContextFactory">
        <Set name="TrustAll">true</Set>
        ...
    </Configure>