- @Override
- public SSLEngine restartSSL(SSLSession sslSession) {
- SSLEngine e2 = null;
- if (sslSession instanceof ExtendedSSLSession) {
- ExtendedSSLSession es = (ExtendedSSLSession) sslSession;
- List<SNIServerName> names = es.getRequestedServerNames();
- for (SNIServerName sniServerName : names) {
- if (sniServerName instanceof SNIHostName) {
- SNIHostName host = (SNIHostName) sniServerName;
- String hostname = host.getAsciiName();
- if (hostname.equals(ServerConstants.getWwwHostName())) {
- e2 = sslContextFactory.newSSLEngine();
- } else if (hostname.equals(ServerConstants.getStaticHostName())) {
- e2 = staticContextFactory.newSSLEngine();
- } else if (hostname.equals(ServerConstants.getSecureHostName())) {
- e2 = secureContextFactory.newSSLEngine();
- } else if (hostname.equals(ServerConstants.getApiHostName())) {
- e2 = apiContextFactory.newSSLEngine();
+ @Override
+ public boolean shouldRestartSSL() {
+ return true;
+ }
+
+ @Override
+ public SSLEngine restartSSL(SSLSession sslSession) {
+ SSLEngine e2 = null;
+ if (sslSession instanceof ExtendedSSLSession) {
+ ExtendedSSLSession es = (ExtendedSSLSession) sslSession;
+ List<SNIServerName> names = es.getRequestedServerNames();
+ for (SNIServerName sniServerName : names) {
+ if (sniServerName instanceof SNIHostName) {
+ SNIHostName host = (SNIHostName) sniServerName;
+ String hostname = host.getAsciiName();
+ if (hostname.equals(ServerConstants.getWwwHostName())) {
+ e2 = sslContextFactory.newSSLEngine();
+ } else if (hostname.equals(ServerConstants.getStaticHostName())) {
+ e2 = staticContextFactory.newSSLEngine();
+ } else if (hostname.equals(ServerConstants.getSecureHostName())) {
+ e2 = secureContextFactory.newSSLEngine();
+ } else if (hostname.equals(ServerConstants.getApiHostName())) {
+ e2 = apiContextFactory.newSSLEngine();
+ }
+ break;