mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Upgrade to Jetty 9.4.15.v20190215
In addition to upgrading to Jetty 9.4.15, this commit updates the KeyStores used in embedded container testing to add to their entries subject alternative name extensions for localhost and 127.0.0.1. As of 9.4.16, Jetty requires the SAN extensions. Closes gh-16188
This commit is contained in:
parent
dfe6bf0f5f
commit
946e8267a8
@ -112,7 +112,7 @@
|
||||
<jedis.version>2.9.3</jedis.version>
|
||||
<jersey.version>2.25.1</jersey.version>
|
||||
<jest.version>2.0.4</jest.version>
|
||||
<jetty.version>9.4.14.v20181114</jetty.version>
|
||||
<jetty.version>9.4.15.v20190215</jetty.version>
|
||||
<jetty-jsp.version>2.2.0.v201112011158</jetty-jsp.version>
|
||||
<jetty-el.version>8.0.33</jetty-el.version>
|
||||
<jms-api.version>1.1-rev-1</jms-api.version>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@ -26,6 +26,7 @@ import java.io.PrintWriter;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.ServerSocket;
|
||||
import java.net.Socket;
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
@ -72,6 +73,8 @@ import org.apache.http.conn.ssl.TrustSelfSignedStrategy;
|
||||
import org.apache.http.impl.client.HttpClientBuilder;
|
||||
import org.apache.http.impl.client.HttpClients;
|
||||
import org.apache.http.protocol.HttpContext;
|
||||
import org.apache.http.ssl.PrivateKeyDetails;
|
||||
import org.apache.http.ssl.PrivateKeyStrategy;
|
||||
import org.apache.http.ssl.SSLContextBuilder;
|
||||
import org.apache.http.ssl.TrustStrategy;
|
||||
import org.apache.jasper.EmbeddedServletOptions;
|
||||
@ -459,7 +462,7 @@ public abstract class AbstractEmbeddedServletContainerFactoryTests {
|
||||
this.container = factory.getEmbeddedServletContainer(registration);
|
||||
this.container.start();
|
||||
TrustStrategy trustStrategy = new SerialNumberValidatingTrustSelfSignedStrategy(
|
||||
"77e7c302");
|
||||
"5c7ae101");
|
||||
SSLContext sslContext = new SSLContextBuilder()
|
||||
.loadTrustMaterial(null, trustStrategy).build();
|
||||
HttpClient httpClient = HttpClients.custom()
|
||||
@ -535,7 +538,18 @@ public abstract class AbstractEmbeddedServletContainerFactoryTests {
|
||||
SSLConnectionSocketFactory socketFactory = new SSLConnectionSocketFactory(
|
||||
new SSLContextBuilder()
|
||||
.loadTrustMaterial(null, new TrustSelfSignedStrategy())
|
||||
.loadKeyMaterial(keyStore, "secret".toCharArray()).build());
|
||||
.loadKeyMaterial(keyStore, "secret".toCharArray(),
|
||||
new PrivateKeyStrategy() {
|
||||
|
||||
@Override
|
||||
public String chooseAlias(
|
||||
Map<String, PrivateKeyDetails> aliases,
|
||||
Socket socket) {
|
||||
return "spring-boot";
|
||||
}
|
||||
|
||||
})
|
||||
.build());
|
||||
HttpClient httpClient = HttpClients.custom().setSSLSocketFactory(socketFactory)
|
||||
.build();
|
||||
HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory(
|
||||
@ -559,7 +573,17 @@ public abstract class AbstractEmbeddedServletContainerFactoryTests {
|
||||
SSLConnectionSocketFactory socketFactory = new SSLConnectionSocketFactory(
|
||||
new SSLContextBuilder()
|
||||
.loadTrustMaterial(null, new TrustSelfSignedStrategy())
|
||||
.loadKeyMaterial(keyStore, "password".toCharArray()).build());
|
||||
.loadKeyMaterial(keyStore, "password".toCharArray(),
|
||||
new PrivateKeyStrategy() {
|
||||
|
||||
@Override
|
||||
public String chooseAlias(
|
||||
Map<String, PrivateKeyDetails> aliases,
|
||||
Socket socket) {
|
||||
return "spring-boot";
|
||||
}
|
||||
})
|
||||
.build());
|
||||
HttpClient httpClient = HttpClients.custom().setSSLSocketFactory(socketFactory)
|
||||
.build();
|
||||
HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory(
|
||||
@ -648,7 +672,17 @@ public abstract class AbstractEmbeddedServletContainerFactoryTests {
|
||||
SSLConnectionSocketFactory socketFactory = new SSLConnectionSocketFactory(
|
||||
new SSLContextBuilder()
|
||||
.loadTrustMaterial(null, new TrustSelfSignedStrategy())
|
||||
.loadKeyMaterial(keyStore, "password".toCharArray()).build());
|
||||
.loadKeyMaterial(keyStore, "password".toCharArray(),
|
||||
new PrivateKeyStrategy() {
|
||||
|
||||
@Override
|
||||
public String chooseAlias(
|
||||
Map<String, PrivateKeyDetails> aliases,
|
||||
Socket socket) {
|
||||
return "spring-boot";
|
||||
}
|
||||
})
|
||||
.build());
|
||||
HttpClient httpClient = HttpClients.custom().setSSLSocketFactory(socketFactory)
|
||||
.build();
|
||||
HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory(
|
||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user