APIdia Launch Partner
Top Description Fields Constructors Methods
sun.security.util

public Class JarConstraintsParameters

extends Object
implements ConstraintsParameters
Class Inheritance
All Implemented Interfaces
sun.security.util.ConstraintsParameters
Imports
java.security.CodeSigner, .Key, .Timestamp, java.security.cert.CertPath, .X509Certificate, java.util.Date, .HashSet, .List, .Set, sun.security.validator.Validator

This class contains parameters for checking signed JARs against constraints specified in the jdk.jar.disabledAlgorithms security property.

Field Summary

Modifier and TypeField and Description
private boolean
private boolean
private final Set<X509Certificate>
private final Set<Key>
private String
private final Date

Constructor Summary

AccessConstructor and Description
public
JarConstraintsParameters(CodeSigner[]
the CodeSigners that signed the JAR
signers
)

Create a JarConstraintsParameters.

public

Method Summary

Modifier and TypeMethod and Description
private void
private void
public boolean

Returns:

true if at least one of the certificates are issued by a JDK root CA
anchorIsJdkCA
()

Implements sun.security.util.ConstraintsParameters.anchorIsJdkCA.

Since loading the cacerts keystore can be an expensive operation, this is only performed if this method is called during a "jdkCA" constraints check of a disabled algorithm, and the result is cached.

public String
extendedExceptionMsg()

Implements sun.security.util.ConstraintsParameters.extendedExceptionMsg.

Returns an extended message used in exceptions.

public Date
getDate()

Implements sun.security.util.ConstraintsParameters.getDate.

Returns the date that should be checked against the constraints, or null if not set.

public Set<Key>
getKeys()

Implements sun.security.util.ConstraintsParameters.getKeys.

Returns the set of keys that should be checked against the constraints, or an empty set if there are no keys to be checked.

public String
getVariant()

Implements sun.security.util.ConstraintsParameters.getVariant.

Returns the Validator variant.

public void
setExtendedExceptionMsg(String
the name of the signature related file being verified
file
,
String
the attribute containing the algorithm that is being checked
target
)

Sets the extended error message.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

anchorIsJdkCAback to summary
private boolean anchorIsJdkCA
anchorIsJdkCASetback to summary
private boolean anchorIsJdkCASet
certsIssuedByAnchorback to summary
private final Set<X509Certificate> certsIssuedByAnchor
keysback to summary
private final Set<Key> keys
messageback to summary
private String message
timestampback to summary
private final Date timestamp

Constructor Detail

JarConstraintsParametersback to summary
public JarConstraintsParameters(CodeSigner[] signers)

Create a JarConstraintsParameters.

Parameters
signers:CodeSigner[]

the CodeSigners that signed the JAR

JarConstraintsParametersback to summary
public JarConstraintsParameters(List<X509Certificate> chain, Date timestamp)

Method Detail

addToCertsAndKeysback to summary
private void addToCertsAndKeys(CertPath cp)
addToCertsAndKeysback to summary
private void addToCertsAndKeys(List<X509Certificate> chain)
anchorIsJdkCAback to summary
public boolean anchorIsJdkCA()

Implements sun.security.util.ConstraintsParameters.anchorIsJdkCA.

Since loading the cacerts keystore can be an expensive operation, this is only performed if this method is called during a "jdkCA" constraints check of a disabled algorithm, and the result is cached.

Returns:boolean

true if at least one of the certificates are issued by a JDK root CA

Annotations
@Override
extendedExceptionMsgback to summary
public String extendedExceptionMsg()

Implements sun.security.util.ConstraintsParameters.extendedExceptionMsg.

Doc from sun.security.util.ConstraintsParameters.extendedExceptionMsg.

Returns an extended message used in exceptions. See DisabledAlgorithmConstraints for usage.

Annotations
@Override
getDateback to summary
public Date getDate()

Implements sun.security.util.ConstraintsParameters.getDate.

Doc from sun.security.util.ConstraintsParameters.getDate.

Returns the date that should be checked against the constraints, or null if not set.

Annotations
@Override
getKeysback to summary
public Set<Key> getKeys()

Implements sun.security.util.ConstraintsParameters.getKeys.

Doc from sun.security.util.ConstraintsParameters.getKeys.

Returns the set of keys that should be checked against the constraints, or an empty set if there are no keys to be checked.

Annotations
@Override
getVariantback to summary
public String getVariant()

Implements sun.security.util.ConstraintsParameters.getVariant.

Doc from sun.security.util.ConstraintsParameters.getVariant.

Returns the Validator variant.

Annotations
@Override
setExtendedExceptionMsgback to summary
public void setExtendedExceptionMsg(String file, String target)

Sets the extended error message.

Note

this should be used carefully as it is specific to the attribute/entry/file being checked.

Parameters
file:String

the name of the signature related file being verified

target:String

the attribute containing the algorithm that is being checked

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override