APIdia Launch Partner
Top Description Inners Fields Constructors Methods
sun.security.ssl

pack-priv final Class SSLAlgorithmConstraints

extends Object
implements AlgorithmConstraints
Class Inheritance
All Implemented Interfaces
java.security.AlgorithmConstraints
Imports
java.security.AlgorithmConstraints, .AlgorithmParameters, .CryptoPrimitive, .Key, java.security.spec.InvalidParameterSpecException, .PSSParameterSpec, java.util.ArrayList, .Arrays, .List, .Set, .TreeSet, javax.net.ssl.*, jdk.internal.net.quic.QuicTLSEngine, sun.security.util.DisabledAlgorithmConstraints

Algorithm constraints for disabled algorithms property

See the "jdk.certpath.disabledAlgorithms" specification in java.security for the syntax of the disabled algorithm string.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
private static class

Field Summary

Modifier and TypeField and Description
pack-priv static final SSLAlgorithmConstraints
pack-priv static final SSLAlgorithmConstraints
private final boolean
private final AlgorithmConstraints
private static final DisabledAlgorithmConstraints
private final AlgorithmConstraints
private static final DisabledAlgorithmConstraints

Constructor Summary

AccessConstructor and Description
private
SSLAlgorithmConstraints(AlgorithmConstraints userSpecifiedConstraints, boolean enabledX509DisabledAlgConstraints)

private
SSLAlgorithmConstraints(AlgorithmConstraints userSpecifiedConstraints, SSLAlgorithmConstraints.SupportedSignatureAlgorithmConstraints peerSpecifiedConstraints, boolean withDefaultCertPathConstraints)

Method Summary

Modifier and TypeMethod and Description
pack-priv static SSLAlgorithmConstraints

Returns:

a SSLAlgorithmConstraints instance
forEngine
(SSLEngine
engine with configured constraints
engine
,
SSLAlgorithmConstraints.SIGNATURE_CONSTRAINTS_MODE
SIGNATURE_CONSTRAINTS_MODE
mode
,
boolean withDefaultCertPathConstraints)

Returns a SSLAlgorithmConstraints instance that checks the constraints configured for the given engine in addition to standard checks.

pack-priv static AlgorithmConstraints

Returns:

a AlgorithmConstraints instance
forQUIC
(QuicTLSEngine
QuicTLSEngine used to determine the constraints
engine
,
SSLAlgorithmConstraints.SIGNATURE_CONSTRAINTS_MODE
SIGNATURE_CONSTRAINTS_MODE
mode
,
boolean
whether or not to apply the default certpath algorithm constraints too
withDefaultCertPathConstraints
)

Returns an AlgorithmConstraints instance that uses the constraints configured for the given engine in addition to the platform configured constraints.

pack-priv static SSLAlgorithmConstraints

Returns:

a SSLAlgorithmConstraints instance
forSocket
(SSLSocket
socket with configured constraints
socket
,
SSLAlgorithmConstraints.SIGNATURE_CONSTRAINTS_MODE
SIGNATURE_CONSTRAINTS_MODE
mode
,
boolean withDefaultCertPathConstraints)

Returns a SSLAlgorithmConstraints instance that checks the constraints configured for the given socket in addition to standard checks.

private static AlgorithmConstraints
private static AlgorithmConstraints
private static AlgorithmConstraints
private static AlgorithmConstraints
public boolean
permits(Set<CryptoPrimitive> primitives, String algorithm, AlgorithmParameters parameters)

Implements java.security.AlgorithmConstraints.permits.

Determines whether an algorithm is granted permission for the specified cryptographic primitives.

public boolean
permits(Set<CryptoPrimitive> primitives, Key key)

Implements java.security.AlgorithmConstraints.permits.

Determines whether a key is granted permission for the specified cryptographic primitives.

public boolean
permits(Set<CryptoPrimitive> primitives, String algorithm, Key key, AlgorithmParameters parameters)

Implements java.security.AlgorithmConstraints.permits.

Determines whether an algorithm and the corresponding key are granted permission for the specified cryptographic primitives.

pack-priv boolean
permits(String algorithm, Set<SSLScope> scopes)

pack-priv static SSLAlgorithmConstraints

Returns:

a SSLAlgorithmConstraints instance
wrap
(AlgorithmConstraints
additional constraints to check
userSpecifiedConstraints
)

Returns a SSLAlgorithmConstraints instance that checks the provided userSpecifiedConstraints in addition to standard checks.

private static SSLAlgorithmConstraints
wrap(AlgorithmConstraints userSpecifiedConstraints, boolean withDefaultCertPathConstraints)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULTback to summary
pack-priv static final SSLAlgorithmConstraints DEFAULT
DEFAULT_SSL_ONLYback to summary
pack-priv static final SSLAlgorithmConstraints DEFAULT_SSL_ONLY
enabledX509DisabledAlgConstraintsback to summary
private final boolean enabledX509DisabledAlgConstraints
peerSpecifiedConstraintsback to summary
private final AlgorithmConstraints peerSpecifiedConstraints
tlsDisabledAlgConstraintsback to summary
private static final DisabledAlgorithmConstraints tlsDisabledAlgConstraints
userSpecifiedConstraintsback to summary
private final AlgorithmConstraints userSpecifiedConstraints
x509DisabledAlgConstraintsback to summary
private static final DisabledAlgorithmConstraints x509DisabledAlgConstraints

Constructor Detail

SSLAlgorithmConstraintsback to summary
private SSLAlgorithmConstraints(AlgorithmConstraints userSpecifiedConstraints, boolean enabledX509DisabledAlgConstraints)
SSLAlgorithmConstraintsback to summary
private SSLAlgorithmConstraints(AlgorithmConstraints userSpecifiedConstraints, SSLAlgorithmConstraints.SupportedSignatureAlgorithmConstraints peerSpecifiedConstraints, boolean withDefaultCertPathConstraints)

Method Detail

forEngineback to summary
pack-priv static SSLAlgorithmConstraints forEngine(SSLEngine engine, SSLAlgorithmConstraints.SIGNATURE_CONSTRAINTS_MODE mode, boolean withDefaultCertPathConstraints)

Returns a SSLAlgorithmConstraints instance that checks the constraints configured for the given engine in addition to standard checks. Returns a singleton instance if the constraints are null or DEFAULT.

Parameters
engine:SSLEngine

engine with configured constraints

mode:SSLAlgorithmConstraints.SIGNATURE_CONSTRAINTS_MODE

SIGNATURE_CONSTRAINTS_MODE

Returns:SSLAlgorithmConstraints

a SSLAlgorithmConstraints instance

forQUICback to summary
pack-priv static AlgorithmConstraints forQUIC(QuicTLSEngine engine, SSLAlgorithmConstraints.SIGNATURE_CONSTRAINTS_MODE mode, boolean withDefaultCertPathConstraints)

Returns an AlgorithmConstraints instance that uses the constraints configured for the given engine in addition to the platform configured constraints.

If the given allowedAlgorithms is non-null then the returned AlgorithmConstraints will only permit those allowed algorithms.

Parameters
engine:QuicTLSEngine

QuicTLSEngine used to determine the constraints

mode:SSLAlgorithmConstraints.SIGNATURE_CONSTRAINTS_MODE

SIGNATURE_CONSTRAINTS_MODE

withDefaultCertPathConstraints:boolean

whether or not to apply the default certpath algorithm constraints too

Returns:AlgorithmConstraints

a AlgorithmConstraints instance

forSocketback to summary
pack-priv static SSLAlgorithmConstraints forSocket(SSLSocket socket, SSLAlgorithmConstraints.SIGNATURE_CONSTRAINTS_MODE mode, boolean withDefaultCertPathConstraints)

Returns a SSLAlgorithmConstraints instance that checks the constraints configured for the given socket in addition to standard checks. Returns a singleton instance if the constraints are null or DEFAULT.

Parameters
socket:SSLSocket

socket with configured constraints

mode:SSLAlgorithmConstraints.SIGNATURE_CONSTRAINTS_MODE

SIGNATURE_CONSTRAINTS_MODE

Returns:SSLAlgorithmConstraints

a SSLAlgorithmConstraints instance

getUserSpecifiedConstraintsback to summary
private static AlgorithmConstraints getUserSpecifiedConstraints(SSLEngine engine)
getUserSpecifiedConstraintsback to summary
private static AlgorithmConstraints getUserSpecifiedConstraints(SSLSocket socket)
getUserSpecifiedConstraintsback to summary
private static AlgorithmConstraints getUserSpecifiedConstraints(QuicTLSEngine quicEngine)
nullIfDefaultback to summary
private static AlgorithmConstraints nullIfDefault(AlgorithmConstraints constraints)
permitsback to summary
public boolean permits(Set<CryptoPrimitive> primitives, String algorithm, AlgorithmParameters parameters)

Implements java.security.AlgorithmConstraints.permits.

Doc from java.security.AlgorithmConstraints.permits.

Determines whether an algorithm is granted permission for the specified cryptographic primitives.

Annotations
@Override
permitsback to summary
public boolean permits(Set<CryptoPrimitive> primitives, Key key)

Implements java.security.AlgorithmConstraints.permits.

Doc from java.security.AlgorithmConstraints.permits.

Determines whether a key is granted permission for the specified cryptographic primitives.

This method is usually used to check key size and key usage.

Annotations
@Override
permitsback to summary
public boolean permits(Set<CryptoPrimitive> primitives, String algorithm, Key key, AlgorithmParameters parameters)

Implements java.security.AlgorithmConstraints.permits.

Doc from java.security.AlgorithmConstraints.permits.

Determines whether an algorithm and the corresponding key are granted permission for the specified cryptographic primitives.

Annotations
@Override
permitsback to summary
pack-priv boolean permits(String algorithm, Set<SSLScope> scopes)
wrapback to summary
pack-priv static SSLAlgorithmConstraints wrap(AlgorithmConstraints userSpecifiedConstraints)

Returns a SSLAlgorithmConstraints instance that checks the provided userSpecifiedConstraints in addition to standard checks. Returns a singleton instance if parameter is null or DEFAULT.

Parameters
userSpecifiedConstraints:AlgorithmConstraints

additional constraints to check

Returns:SSLAlgorithmConstraints

a SSLAlgorithmConstraints instance

wrapback to summary
private static SSLAlgorithmConstraints wrap(AlgorithmConstraints userSpecifiedConstraints, boolean withDefaultCertPathConstraints)
sun.security.ssl back to summary

public final Enum SSLAlgorithmConstraints.SIGNATURE_CONSTRAINTS_MODE

extends Enum<SSLAlgorithmConstraints.SIGNATURE_CONSTRAINTS_MODE>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final SSLAlgorithmConstraints.SIGNATURE_CONSTRAINTS_MODE
public static final SSLAlgorithmConstraints.SIGNATURE_CONSTRAINTS_MODE

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static SSLAlgorithmConstraints.SIGNATURE_CONSTRAINTS_MODE
public static SSLAlgorithmConstraints.SIGNATURE_CONSTRAINTS_MODE[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

LOCALback to summary
public static final SSLAlgorithmConstraints.SIGNATURE_CONSTRAINTS_MODE LOCAL
PEERback to summary
public static final SSLAlgorithmConstraints.SIGNATURE_CONSTRAINTS_MODE PEER

Constructor Detail

SIGNATURE_CONSTRAINTS_MODEback to summary
private SIGNATURE_CONSTRAINTS_MODE()

Method Detail

valueOfback to summary
public static SSLAlgorithmConstraints.SIGNATURE_CONSTRAINTS_MODE valueOf(String name)
valuesback to summary
public static SSLAlgorithmConstraints.SIGNATURE_CONSTRAINTS_MODE[] values()
sun.security.ssl back to summary

private Class SSLAlgorithmConstraints.SupportedSignatureAlgorithmConstraints

extends Object
implements AlgorithmConstraints
Class Inheritance
  • java.lang.Object
  • sun.security.ssl.SSLAlgorithmConstraints.SupportedSignatureAlgorithmConstraints
All Implemented Interfaces
java.security.AlgorithmConstraints

Field Summary

Modifier and TypeField and Description
private boolean
private Set<String>
private List<SignatureScheme>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private boolean
checkRsaSsaPssParams(String algorithm, Key key, AlgorithmParameters parameters)

public boolean
permits(Set<CryptoPrimitive> primitives, String algorithm, AlgorithmParameters parameters)

Implements java.security.AlgorithmConstraints.permits.

Determines whether an algorithm is granted permission for the specified cryptographic primitives.

public final boolean
permits(Set<CryptoPrimitive> primitives, Key key)

Implements java.security.AlgorithmConstraints.permits.

Determines whether a key is granted permission for the specified cryptographic primitives.

public final boolean
permits(Set<CryptoPrimitive> primitives, String algorithm, Key key, AlgorithmParameters parameters)

Implements java.security.AlgorithmConstraints.permits.

Determines whether an algorithm and the corresponding key are granted permission for the specified cryptographic primitives.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

checksDisabledback to summary
private boolean checksDisabled
supportedAlgorithmsback to summary
private Set<String> supportedAlgorithms
supportedSignatureSchemesback to summary
private List<SignatureScheme> supportedSignatureSchemes

Constructor Detail

SupportedSignatureAlgorithmConstraintsback to summary
pack-priv SupportedSignatureAlgorithmConstraints(SSLSession session, SSLAlgorithmConstraints.SIGNATURE_CONSTRAINTS_MODE mode)

Method Detail

checkRsaSsaPssParamsback to summary
private boolean checkRsaSsaPssParams(String algorithm, Key key, AlgorithmParameters parameters)
permitsback to summary
public boolean permits(Set<CryptoPrimitive> primitives, String algorithm, AlgorithmParameters parameters)

Implements java.security.AlgorithmConstraints.permits.

Doc from java.security.AlgorithmConstraints.permits.

Determines whether an algorithm is granted permission for the specified cryptographic primitives.

Annotations
@Override
permitsback to summary
public final boolean permits(Set<CryptoPrimitive> primitives, Key key)

Implements java.security.AlgorithmConstraints.permits.

Doc from java.security.AlgorithmConstraints.permits.

Determines whether a key is granted permission for the specified cryptographic primitives.

This method is usually used to check key size and key usage.

Annotations
@Override
permitsback to summary
public final boolean permits(Set<CryptoPrimitive> primitives, String algorithm, Key key, AlgorithmParameters parameters)

Implements java.security.AlgorithmConstraints.permits.

Doc from java.security.AlgorithmConstraints.permits.

Determines whether an algorithm and the corresponding key are granted permission for the specified cryptographic primitives.

Annotations
@Override