parent
638327d7e3
commit
3a6b26d292
|
@ -100,7 +100,7 @@ public class HostnameVerificationTest
|
|||
/**
|
||||
* This test is supposed to verify that hostname verification works as described in:
|
||||
* http://www.ietf.org/rfc/rfc2818.txt section 3.1. It uses a certificate with a common name different to localhost
|
||||
* and sends a request to localhost. This should fail with a SSLHandshakeException.
|
||||
* and sends a request to localhost. This should fail with an SSLHandshakeException.
|
||||
*
|
||||
* @throws Exception on test failure
|
||||
*/
|
||||
|
|
|
@ -1803,7 +1803,7 @@ public class SslBytesServerTest extends SslBytesTest
|
|||
|
||||
assertTrue(latch.await(idleTimeout * 2, TimeUnit.MILLISECONDS));
|
||||
|
||||
// Be sure that the server sent a SSL close alert
|
||||
// Be sure that the server sent an SSL close alert
|
||||
TLSRecord record = proxy.readFromServer();
|
||||
assertNotNull(record);
|
||||
assertEquals(TLSRecord.Type.ALERT, record.getType());
|
||||
|
|
|
@ -743,7 +743,7 @@ If you are using Conscrypt with Java 8, you must exclude `TLSv1.3` protocol as i
|
|||
|
||||
==== Configuring SNI
|
||||
|
||||
From Java 8, the JVM contains support for the http://en.wikipedia.org/wiki/Server_Name_Indication[Server Name Indicator (SNI)] extension, which allows a SSL connection handshake to indicate one or more DNS names that it applies to.
|
||||
From Java 8, the JVM contains support for the http://en.wikipedia.org/wiki/Server_Name_Indication[Server Name Indicator (SNI)] extension, which allows an SSL connection handshake to indicate one or more DNS names that it applies to.
|
||||
|
||||
To support this, the `SslContextFactory` is used.
|
||||
The `SslContextFactory` will look for multiple X509 certificates within the keystore, each of which may have multiple DNS names (including wildcards) associated with the http://en.wikipedia.org/wiki/SubjectAltName[Subject Alternate Name] extension.
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
||||
|
||||
<!-- =========================================================== -->
|
||||
<!-- Add a SSL Connector with no protocol factories -->
|
||||
<!-- Add an SSL Connector with no protocol factories -->
|
||||
<!-- =========================================================== -->
|
||||
<Call name="addConnector">
|
||||
<Arg>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<Configure id="Server" class="org.eclipse.jetty.server.Server">
|
||||
|
||||
<!-- =========================================================== -->
|
||||
<!-- Add a SSL Connector with no protocol factories -->
|
||||
<!-- Add an SSL Connector with no protocol factories -->
|
||||
<!-- =========================================================== -->
|
||||
<Call name="addConnector">
|
||||
<Arg>
|
||||
|
|
|
@ -352,7 +352,7 @@ public class ForwardedRequestCustomizer implements Customizer
|
|||
}
|
||||
|
||||
/**
|
||||
* @return true if the presence of a SSL session or certificate header is sufficient
|
||||
* @return true if the presence of an SSL session or certificate header is sufficient
|
||||
* to indicate a secure request (default is true)
|
||||
*/
|
||||
public boolean isSslIsSecure()
|
||||
|
@ -361,7 +361,7 @@ public class ForwardedRequestCustomizer implements Customizer
|
|||
}
|
||||
|
||||
/**
|
||||
* @param sslIsSecure true if the presence of a SSL session or certificate header is sufficient
|
||||
* @param sslIsSecure true if the presence of an SSL session or certificate header is sufficient
|
||||
* to indicate a secure request (default is true)
|
||||
*/
|
||||
public void setSslIsSecure(boolean sslIsSecure)
|
||||
|
|
|
@ -111,7 +111,7 @@ public class OptionalSslConnectionTest
|
|||
assertEquals(HttpStatus.OK_200, response.getStatus());
|
||||
}
|
||||
|
||||
// Then try a SSL connection.
|
||||
// Then try an SSL connection.
|
||||
SslContextFactory sslContextFactory = new SslContextFactory.Client(true);
|
||||
sslContextFactory.start();
|
||||
try (Socket ssl = sslContextFactory.newSslSocket())
|
||||
|
|
Loading…
Reference in New Issue