jdk.tls.client.enableSessionTicketExtension must be respected by OPENSSL and OPENSSL_REFCNT SslProviders (#10401)
Motivation: jdk.tls.client.enableSessionTicketExtension property must be respect by OPENSSL and OPENSSL_REFCNT SslProvider to ensure a consistent behavior. Due a bug this was not the case and it only worked for OPENSSL_REFCNT but not for OPENSSL. Modifications: Move the property check into static method that is used by both Result: Correctly respect jdk.tls.client.enableSessionTicketExtension
This commit is contained in:
parent
165ade5d9f
commit
47bbc590ee
@ -72,9 +72,6 @@ public final class ReferenceCountedOpenSslClientContext extends ReferenceCounted
|
|||||||
try {
|
try {
|
||||||
sessionContext = newSessionContext(this, ctx, engineMap, trustCertCollection, trustManagerFactory,
|
sessionContext = newSessionContext(this, ctx, engineMap, trustCertCollection, trustManagerFactory,
|
||||||
keyCertChain, key, keyPassword, keyManagerFactory, keyStore);
|
keyCertChain, key, keyPassword, keyManagerFactory, keyStore);
|
||||||
if (ENABLE_SESSION_TICKET) {
|
|
||||||
sessionContext.setTicketKeys();
|
|
||||||
}
|
|
||||||
success = true;
|
success = true;
|
||||||
} finally {
|
} finally {
|
||||||
if (!success) {
|
if (!success) {
|
||||||
@ -175,6 +172,9 @@ public final class ReferenceCountedOpenSslClientContext extends ReferenceCounted
|
|||||||
throw new SSLException("unable to setup trustmanager", e);
|
throw new SSLException("unable to setup trustmanager", e);
|
||||||
}
|
}
|
||||||
OpenSslClientSessionContext context = new OpenSslClientSessionContext(thiz, keyMaterialProvider);
|
OpenSslClientSessionContext context = new OpenSslClientSessionContext(thiz, keyMaterialProvider);
|
||||||
|
if (ENABLE_SESSION_TICKET) {
|
||||||
|
context.setTicketKeys();
|
||||||
|
}
|
||||||
keyMaterialProvider = null;
|
keyMaterialProvider = null;
|
||||||
return context;
|
return context;
|
||||||
} finally {
|
} finally {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user