@ -69,7 +69,7 @@ import org.springframework.util.StringUtils;
@@ -69,7 +69,7 @@ import org.springframework.util.StringUtils;
* @see JettyEmbeddedServletContainer
* /
public class JettyEmbeddedServletContainerFactory extends
AbstractEmbeddedServletContainerFactory implements ResourceLoaderAware {
AbstractEmbeddedServletContainerFactory implements ResourceLoaderAware {
private List < Configuration > configurations = new ArrayList < Configuration > ( ) ;
@ -130,47 +130,46 @@ public class JettyEmbeddedServletContainerFactory extends
@@ -130,47 +130,46 @@ public class JettyEmbeddedServletContainerFactory extends
}
protected void configureSslContextFactory ( SslContextFactory sslContextFactory , Ssl ssl ) {
sslContextFactory . setProtocol ( getS sl ( ) . getProtocol ( ) ) ;
if ( getS sl ( ) . getClientAuth ( ) = = ClientAuth . NEED ) {
sslContextFactory . setProtocol ( ssl . getProtocol ( ) ) ;
if ( ssl . getClientAuth ( ) = = ClientAuth . NEED ) {
sslContextFactory . setNeedClientAuth ( true ) ;
sslContextFactory . setWantClientAuth ( true ) ;
}
else if ( getS sl ( ) . getClientAuth ( ) = = ClientAuth . WANT ) {
else if ( ssl . getClientAuth ( ) = = ClientAuth . WANT ) {
sslContextFactory . setWantClientAuth ( true ) ;
}
if ( getS sl ( ) . getKeyStorePassword ( ) ! = null ) {
sslContextFactory . setKeyStorePassword ( getS sl ( ) . getKeyStorePassword ( ) ) ;
if ( ssl . getKeyStorePassword ( ) ! = null ) {
sslContextFactory . setKeyStorePassword ( ssl . getKeyStorePassword ( ) ) ;
}
if ( getS sl ( ) . getKeyPassword ( ) ! = null ) {
sslContextFactory . setKeyManagerPassword ( getS sl ( ) . getKeyPassword ( ) ) ;
if ( ssl . getKeyPassword ( ) ! = null ) {
sslContextFactory . setKeyManagerPassword ( ssl . getKeyPassword ( ) ) ;
}
sslContextFactory . setCertAlias ( getS sl ( ) . getKeyAlias ( ) ) ;
sslContextFactory . setCertAlias ( ssl . getKeyAlias ( ) ) ;
try {
sslContextFactory . setKeyStoreResource ( Resource . newResource ( ResourceUtils
. getURL ( getS sl ( ) . getKeyStore ( ) ) ) ) ;
. getURL ( ssl . getKeyStore ( ) ) ) ) ;
}
catch ( IOException e ) {
throw new EmbeddedServletContainerException ( "Could not find key store '"
+ getS sl ( ) . getKeyStore ( ) + "'" , e ) ;
+ ssl . getKeyStore ( ) + "'" , e ) ;
}
if ( getS sl ( ) . getCiphers ( ) ! = null ) {
sslContextFactory . setIncludeCipherSuites ( getS sl ( ) . getCiphers ( ) ) ;
if ( ssl . getCiphers ( ) ! = null ) {
sslContextFactory . setIncludeCipherSuites ( ssl . getCiphers ( ) ) ;
}
if ( getS sl ( ) . getTrustStorePassword ( ) ! = null ) {
sslContextFactory . setTrustStorePassword ( getS sl ( ) . getTrustStorePassword ( ) ) ;
if ( ssl . getTrustStorePassword ( ) ! = null ) {
sslContextFactory . setTrustStorePassword ( ssl . getTrustStorePassword ( ) ) ;
}
if ( getS sl ( ) . getTrustStore ( ) ! = null ) {
if ( ssl . getTrustStore ( ) ! = null ) {
try {
sslContextFactory . setTrustStoreResource ( Resource
. newResource ( ResourceUtils . getURL ( getS sl ( ) . getTrustStore ( ) ) ) ) ;
. newResource ( ResourceUtils . getURL ( ssl . getTrustStore ( ) ) ) ) ;
}
catch ( IOException e ) {
throw new EmbeddedServletContainerException (
"Could not find trust store '" + getSsl ( ) . getTrustStore ( ) + "'" ,
e ) ;
"Could not find trust store '" + ssl . getTrustStore ( ) + "'" , e ) ;
}
}
}
@ -203,7 +202,7 @@ public class JettyEmbeddedServletContainerFactory extends
@@ -203,7 +202,7 @@ public class JettyEmbeddedServletContainerFactory extends
initializersToUse ) ;
context . setConfigurations ( configurations ) ;
context . getSessionHandler ( ) . getSessionManager ( )
. setMaxInactiveInterval ( getSessionTimeout ( ) ) ;
. setMaxInactiveInterval ( getSessionTimeout ( ) ) ;
postProcessWebAppContext ( context ) ;
}