Package eu.europa.esig.dss.policy
Interface ValidationPolicy
- All Known Implementing Classes:
EtsiValidationPolicy
public interface ValidationPolicy
This class encapsulates the constraint file that controls the policy to be used during the validation process. This
is the base class used to implement a
specific validation policy
-
Method Summary
Modifier and Type Method Description MultiValuesConstraint
getAcceptedContainerTypesConstraint()
Returns AcceptedContainerTypes constraint if present in the policy, null otherwiseMultiValuesConstraint
getAcceptedMimeTypeContentsConstraint()
Returns AcceptedMimeTypeContents constraint if present in the policy, null otherwiseMultiValuesConstraint
getAcceptedZipCommentsConstraint()
Returns AcceptedZipComments constraint if present in the policy, null otherwiseDate
getAlgorithmExpirationDate(String algorithm, Context context, SubContext subContext)
This function returns the algorithm expiration date extracted from the 'constraint.xml' file.LevelConstraint
getAllFilesSignedConstraint()
Returns AllFilesSigned constraint if present in the policy, null otherwiseLevelConstraint
getAllSigningCertificateDigestValuesMatchConstraint(Context context)
Indicates if all signing certificate reference digests match the signing certificateLevelConstraint
getBestSignatureTimeBeforeExpirationDateOfSigningCertificateConstraint()
This constraint checks if the certificate is not expired on best-signature-timeLevelConstraint
getCertificateAuthorityInfoAccessPresentConstraint(Context context, SubContext subContext)
Returns CertificateAuthorityInfoAccessPresent constraint if present in the policy, null otherwiseMultiValuesConstraint
getCertificateCommonNameConstraint(Context context, SubContext subContext)
Returns CertificateCommonName constraint if present in the policy, null otherwiseMultiValuesConstraint
getCertificateCountryConstraint(Context context, SubContext subContext)
Returns CertificateCountry constraint if present in the policy, null otherwiseCryptographicConstraint
getCertificateCryptographicConstraint(Context context, SubContext subContext)
This method creates theSignatureCryptographicConstraint
corresponding to the context parameter.MultiValuesConstraint
getCertificateExtendedKeyUsageConstraint(Context context, SubContext subContext)
Returns certificate extended key usage constraintMultiValuesConstraint
getCertificateGivenNameConstraint(Context context, SubContext subContext)
Returns CertificateGivenName constraint if present in the policy, null otherwiseLevelConstraint
getCertificateIssuedToLegalPersonConstraint(Context context, SubContext subContext)
Indicates if the end user certificate used in validating the signature is issued to a legal person.LevelConstraint
getCertificateIssuedToNaturalPersonConstraint(Context context, SubContext subContext)
Returns CertificateIssuedToNaturalPerson constraint if present in the policy, null otherwiseMultiValuesConstraint
getCertificateKeyUsageConstraint(Context context, SubContext subContext)
Returns certificate key usage constraintLevelConstraint
getCertificateNotExpiredConstraint(Context context, SubContext subContext)
Returns certificate's not expired constraintLevelConstraint
getCertificateNotOnHoldConstraint(Context context, SubContext subContext)
Returns certificate's not onHold constraintLevelConstraint
getCertificateNotRevokedConstraint(Context context, SubContext subContext)
Returns certificate's not revoked constraintLevelConstraint
getCertificateNotSelfSignedConstraint(Context context, SubContext subContext)
Returns certificate's not self-signed constraintMultiValuesConstraint
getCertificateOrganizationNameConstraint(Context context, SubContext subContext)
Returns CertificateOrganizationName constraint if present in the policy, null otherwiseMultiValuesConstraint
getCertificateOrganizationUnitConstraint(Context context, SubContext subContext)
Returns CertificateOrganizationUnit constraint if present in the policy, null otherwiseMultiValuesConstraint
getCertificatePolicyIdsConstraint(Context context, SubContext subContext)
Returns CertificatePolicyIds constraint if present in the policy, null otherwiseMultiValuesConstraint
getCertificatePseudonymConstraint(Context context, SubContext subContext)
Returns CertificatePseudonym constraint if present in the policy, null otherwiseLevelConstraint
getCertificatePseudoUsageConstraint(Context context, SubContext subContext)
Returns CertificatePseudoUsage constraint if present in the policy, null otherwiseMultiValuesConstraint
getCertificateQCStatementIdsConstraint(Context context, SubContext subContext)
Returns CertificateQCStatementIds constraint if present in the policy, null otherwiseLevelConstraint
getCertificateQualificationConstraint(Context context, SubContext subContext)
Indicates if the end user certificate is qualified.LevelConstraint
getCertificateRevocationFreshnessConstraint(Context context, SubContext subContext)
Returns revocation data's freshness constraintLevelConstraint
getCertificateRevocationInfoAccessPresentConstraint(Context context, SubContext subContext)
Returns CertificateRevocationInfoAccessPresent constraint if present in the policy, null otherwiseLevelConstraint
getCertificateSelfSignedConstraint(Context context, SubContext subContext)
Returns certificate's self-signed constraintLevelConstraint
getCertificateSerialNumberConstraint(Context context, SubContext subContext)
Returns CertificateSerialNumber constraint if present in the policy, null otherwiseLevelConstraint
getCertificateSignatureConstraint(Context context, SubContext subContext)
Returns certificate's signature constraintLevelConstraint
getCertificateSupportedByQSCDConstraint(Context context, SubContext subContext)
Indicates if the end user certificate used in validating the signature is mandated to be supported by a secure signature creation device (QSCD).MultiValuesConstraint
getCertificateSurnameConstraint(Context context, SubContext subContext)
Returns CertificateSurname constraint if present in the policy, null otherwiseMultiValuesConstraint
getCertifiedRolesConstraint(Context context)
Return the mandated signer role.MultiValuesConstraint
getClaimedRoleConstraint(Context context)
Indicates if the unsigned property: claimed-role should be checked.MultiValuesConstraint
getCommitmentTypeIndicationConstraint(Context context)
Indicates if the signed property: commitment-type-indication should be checked.ContainerConstraints
getContainerConstraints()
Returns the constraint used for ASiC Container validationValueConstraint
getContentHintsConstraint(Context context)
Indicates if the signed property: content-hints should be checked.ValueConstraint
getContentIdentifierConstraint(Context context)
Indicates if the signed property: content-identifier should be checked.LevelConstraint
getContentTimestampConstraint(Context context)
Indicates if the signed property: content-time-stamp should be checked.ValueConstraint
getContentTypeConstraint(Context context)
Indicates if the signed property: content-type should be checked.LevelConstraint
getCounterSignatureConstraint(Context context)
Returns CounterSignature constraint if present in the policy, null otherwiseSignatureConstraints
getCounterSignatureConstraints()
Returns the constraint used for Counter Signature validationCryptographicConstraint
getCryptographic()
Returns the common constraint used for cryptographic validationEIDAS
getEIDASConstraints()
Returns the constraint used for qualification validationLevelConstraint
getFullScopeConstraint()
Returns FullScope constraint if present in the policy, null otherwiseLevelConstraint
getManifestEntryObjectExistenceConstraint(Context context)
Indicates if the manifested document is foundLevelConstraint
getManifestFilePresentConstraint()
Returns ManifestFilePresent constraint if present in the policy, null otherwiseLevelConstraint
getMessageDigestOrSignedPropertiesConstraint(Context context)
Indicates if the signed property: message-digest (for CAdES) or SignedProperties (for XAdES) should be checked.LevelConstraint
getMimeTypeFilePresentConstraint()
Returns MimeTypeFilePresent constraint if present in the policy, null otherwiseLevelConstraint
getOCSPResponseCertHashMatchConstraint()
The method returns OCSPCertHashMatch constraintLevelConstraint
getOCSPResponseCertHashPresentConstraint()
The method returns OCSPCertHashPresent constraintLevelConstraint
getPdfAnnotationOverlapConstraint(Context context)
Indicates if a PDF annotation overlapping check should be proceeded.LevelConstraint
getPdfPageDifferenceConstraint(Context context)
Indicates if a PDF page difference check should be proceeded.LevelConstraint
getPdfVisualDifferenceConstraint(Context context)
Indicates if a PDF visual difference check should be proceeded.String
getPolicyDescription()
Returns the policy description.String
getPolicyName()
Returns the name of the policy.LevelConstraint
getProspectiveCertificateChainConstraint(Context context)
This constraint requests the presence of the trust anchor in the certificate chain.LevelConstraint
getReferenceDataExistenceConstraint(Context context)
Indicates if the referenced data is foundLevelConstraint
getReferenceDataIntactConstraint(Context context)
Indicates if the referenced data is intactLevelConstraint
getReferencesToAllCertificateChainPresentConstraint(Context context)
Indicates if the whole certificate chain is covered by the Signing Certificate attribute.RevocationConstraints
getRevocationConstraints()
Returns the constraint used for Revocation validationLevelConstraint
getRevocationDataAvailableConstraint(Context context, SubContext subContext)
Returns revocation data available constraintLevelConstraint
getRevocationDataNextUpdatePresentConstraint(Context context, SubContext subContext)
Returns revocation data's nextUpdate present constraintTimeConstraint
getRevocationFreshnessConstraint()
Returns RevocationFreshness constraint if present in the policy, null otherwiseLevelConstraint
getRevocationTimeAgainstBestSignatureTimeConstraint()
Returns RevocationTimeAgainstBestSignatureTime constraint if present in the policy, null otherwiseLevelConstraint
getSelfIssuedOCSPConstraint()
The method returns SelfIssuedOCSP constraintSignatureConstraints
getSignatureConstraints()
Returns the constraint used for Signature validationCryptographicConstraint
getSignatureCryptographicConstraint(Context context)
This method creates theSignatureCryptographicConstraint
corresponding to the context parameter.LevelConstraint
getSignatureDuplicatedConstraint(Context context)
Indicates if the signature is not ambiguousMultiValuesConstraint
getSignatureFormatConstraint(Context context)
Returns SignatureFormat constraint if present in the policy, null otherwiseLevelConstraint
getSignatureIntactConstraint(Context context)
Indicates if the signature is intactMultiValuesConstraint
getSignaturePolicyConstraint(Context context)
Indicates if the signature policy should be checked.LevelConstraint
getSignaturePolicyIdentifiedConstraint(Context context)
Indicates if the signature policy validation should be processed.LevelConstraint
getSignaturePolicyPolicyHashValid(Context context)
Indicates if digest present in a SignaturePolicyIdentifier shall match to the extracted policy contentLevelConstraint
getSignaturePolicyStorePresentConstraint(Context context)
Indicates if a SignaturePolicyStore unsigned attribute, containing a used policy binaries, presence shall be checkedLevelConstraint
getSignedFilesPresentConstraint()
Returns SignedFilesPresent constraint if present in the policy, null otherwiseLevelConstraint
getSignerInformationStoreConstraint(Context context)
This constraint checks if only one SignerInfo is present into a SignerInformationStore NOTE: applicable only for PAdESLevelConstraint
getSignerLocationConstraint(Context context)
Indicates if the signed property: signer-location should be checked.LevelConstraint
getSigningCertificateAttributePresentConstraint(Context context)
Indicates if the signing certificate attribute is presentLevelConstraint
getSigningCertificateDigestValueMatchConstraint(Context context)
Indicates if the signing certificate reference's digest value matchesLevelConstraint
getSigningCertificateDigestValuePresentConstraint(Context context)
Indicates if the signing certificate reference's digest value is presentLevelConstraint
getSigningCertificateIssuerSerialMatchConstraint(Context context)
Indicates if the signing certificate reference's issuer serial matchesLevelConstraint
getSigningCertificateRecognitionConstraint(Context context)
Indicates if the end user certificate used in validating the signature is issued to a natural person.LevelConstraint
getSigningCertificateRefersCertificateChainConstraint(Context context)
Indicates if the Signing Certificate attribute should be checked against the certificate chain.LevelConstraint
getSigningTimeConstraint(Context context)
Indicates if the signed property: signing-time should be checked.LevelConstraint
getStructuralValidationConstraint(Context context)
Indicates if the structural validation should be checked.LevelConstraint
getTimestampCoherenceConstraint()
This constraint checks if the timestamp order is coherentTimestampConstraints
getTimestampConstraints()
Returns the constraint used for Timestamp validationTimeConstraint
getTimestampDelayConstraint()
Returns TimestampDelay constraint if present in the policy, null otherwiseTimeConstraint
getTLFreshnessConstraint()
Returns TLFreshness constraint if present in the policy, null otherwiseLevelConstraint
getTLNotExpiredConstraint()
Returns TLNotExpired constraint if present in the policy, null otherwiseValueConstraint
getTLVersionConstraint()
Returns TLVersion constraint if present in the policy, null otherwiseLevelConstraint
getTLWellSignedConstraint()
Returns TLWellSigned constraint if present in the policy, null otherwiseMultiValuesConstraint
getTrustedServiceStatusConstraint(Context context)
Returns trusted service status constraintMultiValuesConstraint
getTrustedServiceTypeIdentifierConstraint(Context context)
Returns trusted service type identifier constraintLevelConstraint
getUnicitySigningCertificateAttributeConstraint(Context context)
Indicates if the signing certificate is not ambiguously determinesLevelConstraint
getUnknownStatusConstraint()
The method returns UnknownStatus constraintModel
getValidationModel()
Returns the used validation model (default is SHELL).LevelConstraint
getZipCommentPresentConstraint()
Returns ZipCommentPresent constraint if present in the policy, null otherwiseboolean
isEIDASConstraintPresent()
Returns if EIDAS constraints present (qualification check shall be performed)
-
Method Details
-
getAlgorithmExpirationDate
This function returns the algorithm expiration date extracted from the 'constraint.xml' file. If the TAG AlgoExpirationDate is not present within the constraintsnull
is returned.- Parameters:
algorithm
- algorithm (SHA1, SHA256, RSA2048...) to be checkedcontext
-Context
subContext
-SubContext
- Returns:
- expiration date or null
-
getSignaturePolicyConstraint
Indicates if the signature policy should be checked. If AcceptablePolicies element is absent within the constraint file then null is returned, otherwise the list of identifiers is initialised.- Parameters:
context
-Context
- Returns:
LevelConstraint
if SigningTime element is present in the constraint file, null otherwise.
-
getSignaturePolicyIdentifiedConstraint
Indicates if the signature policy validation should be processed. If SignaturePolicyIdentifier found, but not relevant SignaturePolicy is retrieved, the check fails.- Parameters:
context
-Context
- Returns:
LevelConstraint
if SignaturePolicy shall be identified
-
getSignaturePolicyStorePresentConstraint
Indicates if a SignaturePolicyStore unsigned attribute, containing a used policy binaries, presence shall be checked- Parameters:
context
-Context
- Returns:
LevelConstraint
if SignaturePolicyStore presence shall be checked
-
getSignaturePolicyPolicyHashValid
Indicates if digest present in a SignaturePolicyIdentifier shall match to the extracted policy content- Parameters:
context
-Context
- Returns:
LevelConstraint
if SignaturePolicyIdentifier digest shall match
-
getStructuralValidationConstraint
Indicates if the structural validation should be checked. If StructuralValidation element is absent within the constraint file then null is returned.- Parameters:
context
-Context
- Returns:
LevelConstraint
if StructuralValidation element is present in the constraint file, null otherwise.
-
getSigningCertificateRefersCertificateChainConstraint
Indicates if the Signing Certificate attribute should be checked against the certificate chain. If SigningCertificateRefersCertificateChain element is absent within the constraint file then null is returned.- Parameters:
context
-Context
- Returns:
LevelConstraint
if SigningCertificateRefersCertificateChain element is present in the constraint file, null otherwise.
-
getReferencesToAllCertificateChainPresentConstraint
Indicates if the whole certificate chain is covered by the Signing Certificate attribute. If ReferencesToAllCertificateChainPresent element is absent within the constraint file then null is returned.- Parameters:
context
-Context
- Returns:
LevelConstraint
if ReferencesToAllCertificateChainPresent element is present in the constraint file, null otherwise.
-
getSigningTimeConstraint
Indicates if the signed property: signing-time should be checked. If SigningTime element is absent within the constraint file then null is returned.- Parameters:
context
-Context
- Returns:
LevelConstraint
if SigningTime element is present in the constraint file, null otherwise.
-
getContentTypeConstraint
Indicates if the signed property: content-type should be checked. If ContentType element is absent within the constraint file then null is returned.- Parameters:
context
-Context
- Returns:
ValueConstraint
if ContentType element is present in the constraint file, null otherwise.
-
getContentHintsConstraint
Indicates if the signed property: content-hints should be checked. If ContentHints element is absent within the constraint file then null is returned.- Parameters:
context
-Context
- Returns:
ValueConstraint
if ContentHints element is present in the constraint file, null otherwise.
-
getContentIdentifierConstraint
Indicates if the signed property: content-identifier should be checked. If ContentIdentifier element is absent within the constraint file then null is returned.- Parameters:
context
-Context
- Returns:
ValueConstraint
if ContentIdentifier element is present in the constraint file, null otherwise.
-
getMessageDigestOrSignedPropertiesConstraint
Indicates if the signed property: message-digest (for CAdES) or SignedProperties (for XAdES) should be checked. If the relative element is absent within the constraint file then null is returned.- Parameters:
context
-Context
- Returns:
LevelConstraint
if message-digests/SignedProperties element is present in the constraint file, null otherwise.
-
getCommitmentTypeIndicationConstraint
Indicates if the signed property: commitment-type-indication should be checked. If CommitmentTypeIndication element is absent within the constraint file then null is returned, otherwise the list of identifiers is initialised.- Parameters:
context
-Context
- Returns:
MultiValuesConstraint
if CommitmentTypeIndication element is present in the constraint file, null otherwise.
-
getSignerLocationConstraint
Indicates if the signed property: signer-location should be checked. If SignerLocation element is absent within the constraint file then null is returned.- Parameters:
context
-Context
- Returns:
LevelConstraint
if SignerLocation element is present in the constraint file, null otherwise.
-
getContentTimestampConstraint
Indicates if the signed property: content-time-stamp should be checked. If ContentTimeStamp element is absent within the constraint file then null is returned.- Parameters:
context
-Context
- Returns:
LevelConstraint
if ContentTimeStamp element is present in the constraint file, null otherwise.
-
getClaimedRoleConstraint
Indicates if the unsigned property: claimed-role should be checked. If ClaimedRoles element is absent within the constraint file then null is returned.- Parameters:
context
-Context
- Returns:
MultiValuesConstraint
if ClaimedRoles element is present in the constraint file, null otherwise.
-
getCertifiedRolesConstraint
Return the mandated signer role.- Parameters:
context
-Context
- Returns:
MultiValuesConstraint
-
getPolicyName
String getPolicyName()Returns the name of the policy.- Returns:
String
-
getPolicyDescription
String getPolicyDescription()Returns the policy description.- Returns:
String
-
getSignatureCryptographicConstraint
This method creates theSignatureCryptographicConstraint
corresponding to the context parameter. If AcceptableEncryptionAlgo is not present in the constraint file the null is returned.- Parameters:
context
- The context of the signature cryptographic constraints: MainSignature, Timestamp, Revocation- Returns:
SignatureCryptographicConstraint
if AcceptableEncryptionAlgo for a given context element is present in the constraint file, null otherwise.
-
getCertificateCryptographicConstraint
CryptographicConstraint getCertificateCryptographicConstraint(Context context, SubContext subContext)This method creates theSignatureCryptographicConstraint
corresponding to the context parameter. If AcceptableEncryptionAlgo is not present in the constraint file the null is returned.- Parameters:
context
- The context of the signature cryptographic constraints: MainSignature, Timestamp, RevocationsubContext
- the sub context of the signature cryptographic constraints: EMPTY (signature itself), SigningCertificate, CACertificate- Returns:
SignatureCryptographicConstraint
if AcceptableEncryptionAlgo for a given context element is present in the constraint file, null otherwise.
-
getCertificateKeyUsageConstraint
Returns certificate key usage constraint- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if key-usage for a given context element is present in the constraint file, null otherwise.
-
getCertificateExtendedKeyUsageConstraint
MultiValuesConstraint getCertificateExtendedKeyUsageConstraint(Context context, SubContext subContext)Returns certificate extended key usage constraint- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if extended key-usage for a given context element is present in the constraint file, null otherwise.
-
getCertificateNotExpiredConstraint
Returns certificate's not expired constraint- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if Expiration for a given context element is present in the constraint file, null otherwise.
-
getProspectiveCertificateChainConstraint
This constraint requests the presence of the trust anchor in the certificate chain.- Parameters:
context
-Context
- Returns:
LevelConstraint
if ProspectiveCertificateChain element for a given context element is present in the constraint file, null otherwise.
-
getCertificateSignatureConstraint
Returns certificate's signature constraint- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if Signature for a given context element is present in the constraint file, null otherwise.
-
getUnknownStatusConstraint
LevelConstraint getUnknownStatusConstraint()The method returns UnknownStatus constraint- Returns:
LevelConstraint
-
getOCSPResponseCertHashPresentConstraint
LevelConstraint getOCSPResponseCertHashPresentConstraint()The method returns OCSPCertHashPresent constraint- Returns:
LevelConstraint
-
getOCSPResponseCertHashMatchConstraint
LevelConstraint getOCSPResponseCertHashMatchConstraint()The method returns OCSPCertHashMatch constraint- Returns:
LevelConstraint
-
getSelfIssuedOCSPConstraint
LevelConstraint getSelfIssuedOCSPConstraint()The method returns SelfIssuedOCSP constraint- Returns:
LevelConstraint
-
getRevocationDataAvailableConstraint
Returns revocation data available constraint- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if RevocationDataAvailable for a given context element is present in the constraint file, null otherwise.
-
getRevocationDataNextUpdatePresentConstraint
LevelConstraint getRevocationDataNextUpdatePresentConstraint(Context context, SubContext subContext)Returns revocation data's nextUpdate present constraint- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if RevocationDataNextUpdatePresent for a given context element is present in the constraint file, null otherwise.
-
getCertificateRevocationFreshnessConstraint
LevelConstraint getCertificateRevocationFreshnessConstraint(Context context, SubContext subContext)Returns revocation data's freshness constraint- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if RevocationFreshness for a given context element is present in the constraint file, null otherwise.
-
getCertificateNotRevokedConstraint
Returns certificate's not revoked constraint- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if Revoked for a given context element is present in the constraint file, null otherwise.
-
getCertificateNotOnHoldConstraint
Returns certificate's not onHold constraint- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if OnHold for a given context element is present in the constraint file, null otherwise.
-
getCertificateNotSelfSignedConstraint
Returns certificate's not self-signed constraint- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if not self-signed for a given context element is present in the constraint file, null otherwise.
-
getCertificateSelfSignedConstraint
Returns certificate's self-signed constraint- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if self-signed for a given context element is present in the constraint file, null otherwise.
-
getTrustedServiceTypeIdentifierConstraint
Returns trusted service type identifier constraint- Parameters:
context
-Context
- Returns:
LevelConstraint
if trusted service type identifier for a given context element is present in the constraint file, null otherwise.
-
getTrustedServiceStatusConstraint
Returns trusted service status constraint- Parameters:
context
-Context
- Returns:
LevelConstraint
if trusted service status for a given context element is present in the constraint file, null otherwise.
-
getCertificateQualificationConstraint
Indicates if the end user certificate is qualified.- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if Qualification for a given context element is present in the constraint file, null otherwise.
-
getCertificateSupportedByQSCDConstraint
Indicates if the end user certificate used in validating the signature is mandated to be supported by a secure signature creation device (QSCD).- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if SupportedByQSCD for a given context element is present in the constraint file, null otherwise.
-
getCertificateIssuedToLegalPersonConstraint
LevelConstraint getCertificateIssuedToLegalPersonConstraint(Context context, SubContext subContext)Indicates if the end user certificate used in validating the signature is issued to a legal person.- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if IssuedToLegalPerson for a given context element is present in the constraint file, null otherwise.
-
getSigningCertificateRecognitionConstraint
Indicates if the end user certificate used in validating the signature is issued to a natural person.- Parameters:
context
-Context
- Returns:
LevelConstraint
if Recognition for a given context element is present in the constraint file, null otherwise.
-
getSigningCertificateAttributePresentConstraint
Indicates if the signing certificate attribute is present- Parameters:
context
-Context
- Returns:
LevelConstraint
if SigningCertificateAttribute for a given context element is present in the constraint file, null otherwise.
-
getUnicitySigningCertificateAttributeConstraint
Indicates if the signing certificate is not ambiguously determines- Parameters:
context
-Context
- Returns:
LevelConstraint
if UnicitySigningCertificate for a given context element is present in the constraint file, null otherwise.
-
getSigningCertificateDigestValuePresentConstraint
Indicates if the signing certificate reference's digest value is present- Parameters:
context
-Context
- Returns:
LevelConstraint
if DigestValuePresent for a given context element is present in the constraint file, null otherwise.
-
getSigningCertificateDigestValueMatchConstraint
Indicates if the signing certificate reference's digest value matches- Parameters:
context
-Context
- Returns:
LevelConstraint
if DigestValueMatch for a given context element is present in the constraint file, null otherwise.
-
getAllSigningCertificateDigestValuesMatchConstraint
Indicates if all signing certificate reference digests match the signing certificate- Parameters:
context
-Context
- Returns:
LevelConstraint
if AllCertDigestsMatch for a given context element is present in the constraint file, null otherwise.
-
getSigningCertificateIssuerSerialMatchConstraint
Indicates if the signing certificate reference's issuer serial matches- Parameters:
context
-Context
- Returns:
LevelConstraint
if IssuerSerialMatch for a given context element is present in the constraint file, null otherwise.
-
getReferenceDataExistenceConstraint
Indicates if the referenced data is found- Parameters:
context
-Context
- Returns:
LevelConstraint
if ReferenceDataExistence for a given context element is present in the constraint file, null otherwise.
-
getReferenceDataIntactConstraint
Indicates if the referenced data is intact- Parameters:
context
-Context
- Returns:
LevelConstraint
if ReferenceDataIntact for a given context element is present in the constraint file, null otherwise.
-
getManifestEntryObjectExistenceConstraint
Indicates if the manifested document is found- Parameters:
context
-Context
- Returns:
LevelConstraint
if ManifestEntryObjectExistence for a given context element is present in the constraint file, null otherwise.
-
getSignatureIntactConstraint
Indicates if the signature is intact- Parameters:
context
-Context
- Returns:
SignatureDataIntact
if SignatureIntact for a given context element is present in the constraint file, null otherwise.
-
getSignatureDuplicatedConstraint
Indicates if the signature is not ambiguous- Parameters:
context
-Context
- Returns:
SignatureDuplicated
if SignatureDuplicated for a given context element is present in the constraint file, null otherwise.
-
getSignerInformationStoreConstraint
This constraint checks if only one SignerInfo is present into a SignerInformationStore NOTE: applicable only for PAdES- Parameters:
context
-Context
- Returns:
LevelConstraint
if SignerInformationStore element for a given context element is present in the constraint file, null otherwise.
-
getPdfPageDifferenceConstraint
Indicates if a PDF page difference check should be proceeded. If PdfPageDifference element is absent within the constraint file then null is returned.- Parameters:
context
-Context
- Returns:
LevelConstraint
if PdfPageDifference element is present in the constraint file, null otherwise.
-
getPdfAnnotationOverlapConstraint
Indicates if a PDF annotation overlapping check should be proceeded. If PdfAnnotationOverlap element is absent within the constraint file then null is returned.- Parameters:
context
-Context
- Returns:
LevelConstraint
if PdfAnnotationOverlap element is present in the constraint file, null otherwise.
-
getPdfVisualDifferenceConstraint
Indicates if a PDF visual difference check should be proceeded. If PdfVisualDifference element is absent within the constraint file then null is returned.- Parameters:
context
-Context
- Returns:
LevelConstraint
if PdfVisualDifference element is present in the constraint file, null otherwise.
-
getBestSignatureTimeBeforeExpirationDateOfSigningCertificateConstraint
LevelConstraint getBestSignatureTimeBeforeExpirationDateOfSigningCertificateConstraint()This constraint checks if the certificate is not expired on best-signature-time- Returns:
LevelConstraint
if BestSignatureTimeBeforeExpirationDateOfSigningCertificate element is present in the constraint file, null otherwise.
-
getTimestampCoherenceConstraint
LevelConstraint getTimestampCoherenceConstraint()This constraint checks if the timestamp order is coherent- Returns:
LevelConstraint
if TimestampCoherence element is present in the constraint file, null otherwise.
-
getTimestampDelayConstraint
TimeConstraint getTimestampDelayConstraint()Returns TimestampDelay constraint if present in the policy, null otherwise- Returns:
TimeConstraint
if TimestampDelay element is present in the constraint file, null otherwise.
-
getRevocationTimeAgainstBestSignatureTimeConstraint
LevelConstraint getRevocationTimeAgainstBestSignatureTimeConstraint()Returns RevocationTimeAgainstBestSignatureTime constraint if present in the policy, null otherwise- Returns:
LevelConstraint
if RevocationTimeAgainstBestSignatureTime element is present in the constraint file, null otherwise.
-
getRevocationFreshnessConstraint
TimeConstraint getRevocationFreshnessConstraint()Returns RevocationFreshness constraint if present in the policy, null otherwise- Returns:
TimeConstraint
if RevocationFreshness element is present in the constraint file, null otherwise.
-
getCounterSignatureConstraint
Returns CounterSignature constraint if present in the policy, null otherwise- Parameters:
context
-Context
DiagnosticDataFacade- Returns:
LevelConstraint
if CounterSignature element is present in the constraint file, null otherwise.
-
getSignatureFormatConstraint
Returns SignatureFormat constraint if present in the policy, null otherwise- Parameters:
context
-Context
- Returns:
MultiValuesConstraint
if SignatureFormat element is present in the constraint file, null otherwise.
-
getCertificateCountryConstraint
Returns CertificateCountry constraint if present in the policy, null otherwise- Parameters:
context
-Context
subContext
-SubContext
- Returns:
MultiValuesConstraint
if CertificateCountry element is present in the constraint file, null otherwise.
-
getCertificateOrganizationNameConstraint
MultiValuesConstraint getCertificateOrganizationNameConstraint(Context context, SubContext subContext)Returns CertificateOrganizationName constraint if present in the policy, null otherwise- Parameters:
context
-Context
subContext
-SubContext
- Returns:
MultiValuesConstraint
if CertificateOrganizationName element is present in the constraint file, null otherwise.
-
getCertificateOrganizationUnitConstraint
MultiValuesConstraint getCertificateOrganizationUnitConstraint(Context context, SubContext subContext)Returns CertificateOrganizationUnit constraint if present in the policy, null otherwise- Parameters:
context
-Context
subContext
-SubContext
- Returns:
MultiValuesConstraint
if CertificateOrganizationUnit element is present in the constraint file, null otherwise.
-
getCertificateSurnameConstraint
Returns CertificateSurname constraint if present in the policy, null otherwise- Parameters:
context
-Context
subContext
-SubContext
- Returns:
MultiValuesConstraint
if CertificateSurname element is present in the constraint file, null otherwise.
-
getCertificateGivenNameConstraint
Returns CertificateGivenName constraint if present in the policy, null otherwise- Parameters:
context
-Context
subContext
-SubContext
- Returns:
MultiValuesConstraint
if CertificateGivenName element is present in the constraint file, null otherwise.
-
getCertificateCommonNameConstraint
Returns CertificateCommonName constraint if present in the policy, null otherwise- Parameters:
context
-Context
subContext
-SubContext
- Returns:
MultiValuesConstraint
if CertificateCommonName element is present in the constraint file, null otherwise.
-
getCertificatePseudonymConstraint
Returns CertificatePseudonym constraint if present in the policy, null otherwise- Parameters:
context
-Context
subContext
-SubContext
- Returns:
MultiValuesConstraint
if CertificatePseudonym element is present in the constraint file, null otherwise.
-
getCertificatePseudoUsageConstraint
Returns CertificatePseudoUsage constraint if present in the policy, null otherwise- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if CertificatePseudoUsage element is present in the constraint file, null otherwise.
-
getCertificateSerialNumberConstraint
Returns CertificateSerialNumber constraint if present in the policy, null otherwise- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if CertificateSerialNumber element is present in the constraint file, null otherwise.
-
getCertificateAuthorityInfoAccessPresentConstraint
LevelConstraint getCertificateAuthorityInfoAccessPresentConstraint(Context context, SubContext subContext)Returns CertificateAuthorityInfoAccessPresent constraint if present in the policy, null otherwise- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if CertificateAuthorityInfoAccessPresent element is present in the constraint file, null otherwise.
-
getCertificateRevocationInfoAccessPresentConstraint
LevelConstraint getCertificateRevocationInfoAccessPresentConstraint(Context context, SubContext subContext)Returns CertificateRevocationInfoAccessPresent constraint if present in the policy, null otherwise- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if CertificateRevocationInfoAccessPresent element is present in the constraint file, null otherwise.
-
getCertificatePolicyIdsConstraint
Returns CertificatePolicyIds constraint if present in the policy, null otherwise- Parameters:
context
-Context
subContext
-SubContext
- Returns:
MultiValuesConstraint
if CertificatePolicyIds element is present in the constraint file, null otherwise.
-
getCertificateQCStatementIdsConstraint
MultiValuesConstraint getCertificateQCStatementIdsConstraint(Context context, SubContext subContext)Returns CertificateQCStatementIds constraint if present in the policy, null otherwise- Parameters:
context
-Context
subContext
-SubContext
- Returns:
MultiValuesConstraint
if CertificateQCStatementIds element is present in the constraint file, null otherwise.
-
getCertificateIssuedToNaturalPersonConstraint
LevelConstraint getCertificateIssuedToNaturalPersonConstraint(Context context, SubContext subContext)Returns CertificateIssuedToNaturalPerson constraint if present in the policy, null otherwise- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if CertificateIssuedToNaturalPerson element is present in the constraint file, null otherwise.
-
getAcceptedContainerTypesConstraint
MultiValuesConstraint getAcceptedContainerTypesConstraint()Returns AcceptedContainerTypes constraint if present in the policy, null otherwise- Returns:
MultiValuesConstraint
if AcceptedContainerTypes element is present in the constraint file, null otherwise.
-
getZipCommentPresentConstraint
LevelConstraint getZipCommentPresentConstraint()Returns ZipCommentPresent constraint if present in the policy, null otherwise- Returns:
LevelConstraint
if ZipCommentPresent element is present in the constraint file, null otherwise.
-
getAcceptedZipCommentsConstraint
MultiValuesConstraint getAcceptedZipCommentsConstraint()Returns AcceptedZipComments constraint if present in the policy, null otherwise- Returns:
MultiValuesConstraint
if AcceptedZipComments element is present in the constraint file, null otherwise.
-
getMimeTypeFilePresentConstraint
LevelConstraint getMimeTypeFilePresentConstraint()Returns MimeTypeFilePresent constraint if present in the policy, null otherwise- Returns:
LevelConstraint
if MimeTypeFilePresent element is present in the constraint file, null otherwise.
-
getAcceptedMimeTypeContentsConstraint
MultiValuesConstraint getAcceptedMimeTypeContentsConstraint()Returns AcceptedMimeTypeContents constraint if present in the policy, null otherwise- Returns:
MultiValuesConstraint
if AcceptedMimeTypeContents element is present in the constraint file, null otherwise.
-
getAllFilesSignedConstraint
LevelConstraint getAllFilesSignedConstraint()Returns AllFilesSigned constraint if present in the policy, null otherwise- Returns:
LevelConstraint
if AllFilesSigned element is present in the constraint file, null otherwise.
-
getManifestFilePresentConstraint
LevelConstraint getManifestFilePresentConstraint()Returns ManifestFilePresent constraint if present in the policy, null otherwise- Returns:
LevelConstraint
if ManifestFilePresent element is present in the constraint file, null otherwise.
-
getSignedFilesPresentConstraint
LevelConstraint getSignedFilesPresentConstraint()Returns SignedFilesPresent constraint if present in the policy, null otherwise- Returns:
LevelConstraint
if SignedFilesPresent element is present in the constraint file, null otherwise.
-
getFullScopeConstraint
LevelConstraint getFullScopeConstraint()Returns FullScope constraint if present in the policy, null otherwise- Returns:
LevelConstraint
if FullScope element is present in the constraint file, null otherwise.
-
isEIDASConstraintPresent
boolean isEIDASConstraintPresent()Returns if EIDAS constraints present (qualification check shall be performed)- Returns:
- TRUE if EIDAS constraint present, FALSE otherwise
-
getTLFreshnessConstraint
TimeConstraint getTLFreshnessConstraint()Returns TLFreshness constraint if present in the policy, null otherwise- Returns:
TimeConstraint
if TLFreshness element is present in the constraint file, null otherwise.
-
getTLWellSignedConstraint
LevelConstraint getTLWellSignedConstraint()Returns TLWellSigned constraint if present in the policy, null otherwise- Returns:
TimeConstraint
if TLWellSigned element is present in the constraint file, null otherwise.
-
getTLNotExpiredConstraint
LevelConstraint getTLNotExpiredConstraint()Returns TLNotExpired constraint if present in the policy, null otherwise- Returns:
TimeConstraint
if TLNotExpired element is present in the constraint file, null otherwise.
-
getTLVersionConstraint
ValueConstraint getTLVersionConstraint()Returns TLVersion constraint if present in the policy, null otherwise- Returns:
ValueConstraint
if TLVersion element is present in the constraint file, null otherwise.
-
getValidationModel
Model getValidationModel()Returns the used validation model (default is SHELL). Alternatives are CHAIN and HYBRID- Returns:
- the validation model to be used
-
getContainerConstraints
ContainerConstraints getContainerConstraints()Returns the constraint used for ASiC Container validation- Returns:
ContainerConstraints
-
getSignatureConstraints
SignatureConstraints getSignatureConstraints()Returns the constraint used for Signature validation- Returns:
SignatureConstraints
-
getCounterSignatureConstraints
SignatureConstraints getCounterSignatureConstraints()Returns the constraint used for Counter Signature validation- Returns:
SignatureConstraints
-
getTimestampConstraints
TimestampConstraints getTimestampConstraints()Returns the constraint used for Timestamp validation- Returns:
TimestampConstraints
-
getRevocationConstraints
RevocationConstraints getRevocationConstraints()Returns the constraint used for Revocation validation- Returns:
RevocationConstraints
-
getEIDASConstraints
EIDAS getEIDASConstraints()Returns the constraint used for qualification validation- Returns:
EIDAS
-
getCryptographic
CryptographicConstraint getCryptographic()Returns the common constraint used for cryptographic validation- Returns:
CryptographicConstraint
-