Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions src/java.base/share/classes/javax/net/ssl/SSLContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,15 @@ public static void setDefault(SSLContext context) {
* may be different from the order of providers returned by
* {@link Security#getProviders() Security.getProviders()}.
*
* <p>
* In the JDK Reference implementation, a protocol can be disabled by
* adding it to the {@code jdk.tls.disabledAlgorithms} security property.
* If the specified protocol is disabled, the {@code getInstance} method
* will still return an {@code SSLContext} if there is a configured
* provider that implements the protocol. However, if the selected provider
* is the SunJSSE provider, subsequent operations that attempt to use the
* specified protocol will fail with an {@code SSLHandshakeException}.
*
* @param protocol the standard name of the requested protocol.
* See the SSLContext section in the <a href=
* "{@docRoot}/../specs/security/standard-names.html#sslcontext-algorithms">
Expand Down Expand Up @@ -199,6 +208,15 @@ public static SSLContext getInstance(String protocol)
* <p> Note that the list of registered providers may be retrieved via
* the {@link Security#getProviders() Security.getProviders()} method.
*
* @implNote
* In the JDK Reference Implementation, a protocol can be disabled by
* adding it to the {@code jdk.tls.disabledAlgorithms} security property.
* If the specified protocol is disabled, the {@code getInstance} method
* will still return an {@code SSLContext} if the specified provider
* implements the protocol. However, if the specified provider is "SunJSSE",
* subsequent operations that attempt to use the specified protocol will
* fail with an {@code SSLHandshakeException}.
*
* @param protocol the standard name of the requested protocol.
* See the SSLContext section in the <a href=
* "{@docRoot}/../specs/security/standard-names.html#sslcontext-algorithms">
Expand Down Expand Up @@ -247,6 +265,15 @@ public static SSLContext getInstance(String protocol, String provider)
* Java Security Standard Algorithm Names Specification</a>
* for information about standard protocol names.
*
* @implNote
* In the JDK Reference Implementation, a protocol can be disabled by
* adding it to the {@code jdk.tls.disabledAlgorithms} security property.
* If the specified protocol is disabled, the {@code getInstance} method
* will still return an {@code SSLContext} if the specified provider
* implements the protocol. However, if the specified provider is the
* SunJSSE provider, subsequent operations that attempt to use the
* specified protocol will fail with an {@code SSLHandshakeException}.
*
* @param provider an instance of the provider.
*
* @return the new {@code SSLContext} object
Expand Down