Class AbstractCryptographicChecker
java.lang.Object
eu.europa.esig.dss.validation.process.Chain<XmlCC>
eu.europa.esig.dss.validation.process.bbb.sav.cc.AbstractCryptographicChecker
- Direct Known Subclasses:
CryptographicChecker
,DigestCryptographicChecker
Abstract class to perform cryptographic validation
-
Field Summary
Modifier and TypeFieldDescriptionprotected final CryptographicConstraintWrapper
Cryptographic constraintprotected final DigestAlgorithm
The Digest algorithmprotected final EncryptionAlgorithm
The Encryption algorithmprotected final String
Used Key lengthprotected final MaskGenerationFunction
Mask generation function when presentprotected final MessageTag
The validation constraint positionprotected final Date
The validation timeFields inherited from class eu.europa.esig.dss.validation.process.Chain
firstItem, i18nProvider, result
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractCryptographicChecker
(I18nProvider i18nProvider, DigestAlgorithm digestAlgorithm, Date validationDate, MessageTag position, CryptographicConstraint constraint) Default constructorprotected
AbstractCryptographicChecker
(I18nProvider i18nProvider, EncryptionAlgorithm encryptionAlgorithm, DigestAlgorithm digestAlgorithm, MaskGenerationFunction maskGenerationFunction, String keyLengthUsedToSignThisToken, Date validationDate, MessageTag position, CryptographicConstraint constraint) Complete constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Adds additional info to the chainChecks if thedigestAlgorithm
is not expired in validation timeChecks if thedigestAlgorithm
is acceptableChecks if theencryptionAlgorithm
is not expired in validation timeChecks if theencryptionAlgorithm
is acceptableprotected MessageTag
getTitle()
Returns title of a Chain (i.e.protected boolean
isExpirationDateAvailable
(DigestAlgorithm digestAlgorithm) Gets if the expiration date if defined for the givendigestAlgorithm
protected boolean
isExpirationDateAvailable
(EncryptionAlgorithm encryptionAlgorithm, String keyLength) Gets if the expiration date if defined for the givenencryptionAlgorithm
andkeyLength
Checks if thekeyLengthUsedToSignThisToken
is acceptableChecks if thekeyLengthUsedToSignThisToken
is knownMethods inherited from class eu.europa.esig.dss.validation.process.Chain
buildChainTitle, collectAdditionalMessages, collectAllMessages, collectMessages, execute, getFailLevelConstraint, getInfoLevelConstraint, getWarnLevelConstraint, initChain, isValid, isValidConclusion
-
Field Details
-
encryptionAlgorithm
The Encryption algorithm -
digestAlgorithm
The Digest algorithm -
maskGenerationFunction
Mask generation function when present -
keyLengthUsedToSignThisToken
Used Key length -
validationDate
The validation time -
constraintWrapper
Cryptographic constraint -
position
The validation constraint position
-
-
Constructor Details
-
AbstractCryptographicChecker
protected AbstractCryptographicChecker(I18nProvider i18nProvider, DigestAlgorithm digestAlgorithm, Date validationDate, MessageTag position, CryptographicConstraint constraint) Default constructor- Parameters:
i18nProvider
-I18nProvider
digestAlgorithm
-DigestAlgorithm
validationDate
-Date
position
-MessageTag
constraint
-CryptographicConstraint
-
AbstractCryptographicChecker
protected AbstractCryptographicChecker(I18nProvider i18nProvider, EncryptionAlgorithm encryptionAlgorithm, DigestAlgorithm digestAlgorithm, MaskGenerationFunction maskGenerationFunction, String keyLengthUsedToSignThisToken, Date validationDate, MessageTag position, CryptographicConstraint constraint) Complete constructor- Parameters:
i18nProvider
-I18nProvider
encryptionAlgorithm
-EncryptionAlgorithm
digestAlgorithm
-DigestAlgorithm
maskGenerationFunction
-MaskGenerationFunction
keyLengthUsedToSignThisToken
-String
validationDate
-Date
position
-MessageTag
constraint
-CryptographicConstraint
-
-
Method Details
-
getTitle
Description copied from class:Chain
Returns title of a Chain (i.e. BasicBuildingBlock title)- Overrides:
getTitle
in classChain<XmlCC>
- Returns:
MessageTag
-
isExpirationDateAvailable
Gets if the expiration date if defined for the givendigestAlgorithm
- Parameters:
digestAlgorithm
-DigestAlgorithm
to check expiration date for- Returns:
- TRUE if expiration constrains are defines, FALSE otherwise
-
isExpirationDateAvailable
protected boolean isExpirationDateAvailable(EncryptionAlgorithm encryptionAlgorithm, String keyLength) Gets if the expiration date if defined for the givenencryptionAlgorithm
andkeyLength
- Parameters:
encryptionAlgorithm
-EncryptionAlgorithm
to check expiration date forkeyLength
-String
used to sign the token- Returns:
- TRUE if expiration constrains are defines, FALSE otherwise
-
encryptionAlgorithmReliable
Checks if theencryptionAlgorithm
is acceptable- Returns:
- TRUE if the
encryptionAlgorithm
is acceptable, FALSE otherwise
-
digestAlgorithmReliable
Checks if thedigestAlgorithm
is acceptable- Returns:
- TRUE if the
digestAlgorithm
is acceptable, FALSE otherwise
-
encryptionAlgorithmOnValidationTime
Checks if theencryptionAlgorithm
is not expired in validation time- Returns:
- TRUE if the
encryptionAlgorithm
is not expired in validation time, FALSE otherwise
-
digestAlgorithmOnValidationTime
Checks if thedigestAlgorithm
is not expired in validation time- Returns:
- TRUE if the
digestAlgorithm
is not expired in validation time, FALSE otherwise
-
publicKeySizeKnown
Checks if thekeyLengthUsedToSignThisToken
is known- Returns:
- TRUE if the
keyLengthUsedToSignThisToken
is known, FALSE otherwise
-
publicKeySizeAcceptable
Checks if thekeyLengthUsedToSignThisToken
is acceptable- Returns:
- TRUE if the
keyLengthUsedToSignThisToken
is acceptable, FALSE otherwise
-
addAdditionalInfo
protected void addAdditionalInfo()Description copied from class:Chain
Adds additional info to the chain- Overrides:
addAdditionalInfo
in classChain<XmlCC>
-