|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*/ |
|
|
|
package sun.security.ssl; |
|
|
|
import java.io.IOException; |
|
import java.security.AlgorithmConstraints; |
|
import java.security.AccessController; |
|
import sun.security.util.LegacyAlgorithmConstraints; |
|
import sun.security.action.GetLongAction; |
|
|
|
class ServerHandshakeContext extends HandshakeContext { |
|
// To prevent the TLS renegotiation issues, by setting system property |
|
// "jdk.tls.rejectClientInitiatedRenegotiation" to true, applications in |
|
// server side can disable all client initiated SSL renegotiation |
|
// regardless of the support of TLS protocols. |
|
// |
|
|
|
static final boolean rejectClientInitiatedRenego = |
|
Utilities.getBooleanProperty( |
|
"jdk.tls.rejectClientInitiatedRenegotiation", false); |
|
|
|
|
|
static final AlgorithmConstraints legacyAlgorithmConstraints = |
|
new LegacyAlgorithmConstraints( |
|
LegacyAlgorithmConstraints.PROPERTY_TLS_LEGACY_ALGS, |
|
new SSLAlgorithmDecomposer()); |
|
|
|
|
|
SSLPossession interimAuthn; |
|
|
|
StatusResponseManager.StaplingParameters stapleParams; |
|
CertificateMessage.CertificateEntry currentCertEntry; |
|
private static final long DEFAULT_STATUS_RESP_DELAY = 5000L; |
|
final long statusRespTimeout; |
|
|
|
|
|
ServerHandshakeContext(SSLContextImpl sslContext, |
|
TransportContext conContext) throws IOException { |
|
super(sslContext, conContext); |
|
@SuppressWarnings("removal") |
|
long respTimeOut = AccessController.doPrivileged( |
|
new GetLongAction("jdk.tls.stapling.responseTimeout", |
|
DEFAULT_STATUS_RESP_DELAY)); |
|
statusRespTimeout = respTimeOut >= 0 ? respTimeOut : |
|
DEFAULT_STATUS_RESP_DELAY; |
|
handshakeConsumers.put( |
|
SSLHandshake.CLIENT_HELLO.id, SSLHandshake.CLIENT_HELLO); |
|
} |
|
|
|
@Override |
|
void kickstart() throws IOException { |
|
if (!conContext.isNegotiated || kickstartMessageDelivered) { |
|
return; |
|
} |
|
|
|
SSLHandshake.kickstart(this); |
|
kickstartMessageDelivered = true; |
|
} |
|
} |
|
|