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 MultiValuesConstraintgetAcceptedContainerTypesConstraint()Returns AcceptedContainerTypes constraint if present in the policy, null otherwiseMultiValuesConstraintgetAcceptedMimeTypeContentsConstraint()Returns AcceptedMimeTypeContents constraint if present in the policy, null otherwiseMultiValuesConstraintgetAcceptedZipCommentsConstraint()Returns AcceptedZipComments constraint if present in the policy, null otherwiseDategetAlgorithmExpirationDate(String algorithm, Context context, SubContext subContext)This function returns the algorithm expiration date extracted from the 'constraint.xml' file.LevelConstraintgetAllFilesSignedConstraint()Returns AllFilesSigned constraint if present in the policy, null otherwiseLevelConstraintgetAllSigningCertificateDigestValuesMatchConstraint(Context context)Indicates if all signing certificate reference digests match the signing certificateLevelConstraintgetBestSignatureTimeBeforeExpirationDateOfSigningCertificateConstraint()This constraint checks if the certificate is not expired on best-signature-timeLevelConstraintgetCertificateAuthorityInfoAccessPresentConstraint(Context context, SubContext subContext)Returns CertificateAuthorityInfoAccessPresent constraint if present in the policy, null otherwiseMultiValuesConstraintgetCertificateCommonNameConstraint(Context context, SubContext subContext)Returns CertificateCommonName constraint if present in the policy, null otherwiseMultiValuesConstraintgetCertificateCountryConstraint(Context context, SubContext subContext)Returns CertificateCountry constraint if present in the policy, null otherwiseCryptographicConstraintgetCertificateCryptographicConstraint(Context context, SubContext subContext)This method creates theSignatureCryptographicConstraintcorresponding to the context parameter.MultiValuesConstraintgetCertificateExtendedKeyUsageConstraint(Context context, SubContext subContext)Returns certificate extended key usage constraintMultiValuesConstraintgetCertificateGivenNameConstraint(Context context, SubContext subContext)Returns CertificateGivenName constraint if present in the policy, null otherwiseLevelConstraintgetCertificateIssuedToLegalPersonConstraint(Context context, SubContext subContext)Indicates if the end user certificate used in validating the signature is issued to a legal person.LevelConstraintgetCertificateIssuedToNaturalPersonConstraint(Context context, SubContext subContext)Returns CertificateIssuedToNaturalPerson constraint if present in the policy, null otherwiseMultiValuesConstraintgetCertificateKeyUsageConstraint(Context context, SubContext subContext)Returns certificate key usage constraintLevelConstraintgetCertificateNotExpiredConstraint(Context context, SubContext subContext)Returns certificate's not expired constraintLevelConstraintgetCertificateNotOnHoldConstraint(Context context, SubContext subContext)Returns certificate's not onHold constraintLevelConstraintgetCertificateNotRevokedConstraint(Context context, SubContext subContext)Returns certificate's not revoked constraintLevelConstraintgetCertificateNotSelfSignedConstraint(Context context, SubContext subContext)Returns certificate's not self-signed constraintMultiValuesConstraintgetCertificateOrganizationNameConstraint(Context context, SubContext subContext)Returns CertificateOrganizationName constraint if present in the policy, null otherwiseMultiValuesConstraintgetCertificateOrganizationUnitConstraint(Context context, SubContext subContext)Returns CertificateOrganizationUnit constraint if present in the policy, null otherwiseMultiValuesConstraintgetCertificatePolicyIdsConstraint(Context context, SubContext subContext)Returns CertificatePolicyIds constraint if present in the policy, null otherwiseMultiValuesConstraintgetCertificatePseudonymConstraint(Context context, SubContext subContext)Returns CertificatePseudonym constraint if present in the policy, null otherwiseLevelConstraintgetCertificatePseudoUsageConstraint(Context context, SubContext subContext)Returns CertificatePseudoUsage constraint if present in the policy, null otherwiseMultiValuesConstraintgetCertificateQCStatementIdsConstraint(Context context, SubContext subContext)Returns CertificateQCStatementIds constraint if present in the policy, null otherwiseLevelConstraintgetCertificateQualificationConstraint(Context context, SubContext subContext)Indicates if the end user certificate is qualified.LevelConstraintgetCertificateRevocationFreshnessConstraint(Context context, SubContext subContext)Returns revocation data's freshness constraintLevelConstraintgetCertificateRevocationInfoAccessPresentConstraint(Context context, SubContext subContext)Returns CertificateRevocationInfoAccessPresent constraint if present in the policy, null otherwiseLevelConstraintgetCertificateSelfSignedConstraint(Context context, SubContext subContext)Returns certificate's self-signed constraintLevelConstraintgetCertificateSerialNumberConstraint(Context context, SubContext subContext)Returns CertificateSerialNumber constraint if present in the policy, null otherwiseLevelConstraintgetCertificateSignatureConstraint(Context context, SubContext subContext)Returns certificate's signature constraintLevelConstraintgetCertificateSupportedByQSCDConstraint(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).MultiValuesConstraintgetCertificateSurnameConstraint(Context context, SubContext subContext)Returns CertificateSurname constraint if present in the policy, null otherwiseMultiValuesConstraintgetCertifiedRolesConstraint(Context context)Return the mandated signer role.MultiValuesConstraintgetClaimedRoleConstraint(Context context)Indicates if the unsigned property: claimed-role should be checked.MultiValuesConstraintgetCommitmentTypeIndicationConstraint(Context context)Indicates if the signed property: commitment-type-indication should be checked.ContainerConstraintsgetContainerConstraints()Returns the constraint used for ASiC Container validationValueConstraintgetContentHintsConstraint(Context context)Indicates if the signed property: content-hints should be checked.ValueConstraintgetContentIdentifierConstraint(Context context)Indicates if the signed property: content-identifier should be checked.LevelConstraintgetContentTimestampConstraint(Context context)Indicates if the signed property: content-time-stamp should be checked.ValueConstraintgetContentTypeConstraint(Context context)Indicates if the signed property: content-type should be checked.LevelConstraintgetCounterSignatureConstraint(Context context)Returns CounterSignature constraint if present in the policy, null otherwiseSignatureConstraintsgetCounterSignatureConstraints()Returns the constraint used for Counter Signature validationCryptographicConstraintgetCryptographic()Returns the common constraint used for cryptographic validationEIDASgetEIDASConstraints()Returns the constraint used for qualification validationLevelConstraintgetFullScopeConstraint()Returns FullScope constraint if present in the policy, null otherwiseLevelConstraintgetManifestEntryObjectExistenceConstraint(Context context)Indicates if the manifested document is foundLevelConstraintgetManifestFilePresentConstraint()Returns ManifestFilePresent constraint if present in the policy, null otherwiseLevelConstraintgetMessageDigestOrSignedPropertiesConstraint(Context context)Indicates if the signed property: message-digest (for CAdES) or SignedProperties (for XAdES) should be checked.LevelConstraintgetMimeTypeFilePresentConstraint()Returns MimeTypeFilePresent constraint if present in the policy, null otherwiseLevelConstraintgetOCSPResponseCertHashMatchConstraint()The method returns OCSPCertHashMatch constraintLevelConstraintgetOCSPResponseCertHashPresentConstraint()The method returns OCSPCertHashPresent constraintLevelConstraintgetPdfAnnotationOverlapConstraint(Context context)Indicates if a PDF annotation overlapping check should be proceeded.LevelConstraintgetPdfPageDifferenceConstraint(Context context)Indicates if a PDF page difference check should be proceeded.LevelConstraintgetPdfVisualDifferenceConstraint(Context context)Indicates if a PDF visual difference check should be proceeded.StringgetPolicyDescription()Returns the policy description.StringgetPolicyName()Returns the name of the policy.LevelConstraintgetProspectiveCertificateChainConstraint(Context context)This constraint requests the presence of the trust anchor in the certificate chain.LevelConstraintgetReferenceDataExistenceConstraint(Context context)Indicates if the referenced data is foundLevelConstraintgetReferenceDataIntactConstraint(Context context)Indicates if the referenced data is intactLevelConstraintgetReferencesToAllCertificateChainPresentConstraint(Context context)Indicates if the whole certificate chain is covered by the Signing Certificate attribute.RevocationConstraintsgetRevocationConstraints()Returns the constraint used for Revocation validationLevelConstraintgetRevocationDataAvailableConstraint(Context context, SubContext subContext)Returns revocation data available constraintLevelConstraintgetRevocationDataNextUpdatePresentConstraint(Context context, SubContext subContext)Returns revocation data's nextUpdate present constraintTimeConstraintgetRevocationFreshnessConstraint()Returns RevocationFreshness constraint if present in the policy, null otherwiseLevelConstraintgetRevocationTimeAgainstBestSignatureTimeConstraint()Returns RevocationTimeAgainstBestSignatureTime constraint if present in the policy, null otherwiseLevelConstraintgetSelfIssuedOCSPConstraint()The method returns SelfIssuedOCSP constraintSignatureConstraintsgetSignatureConstraints()Returns the constraint used for Signature validationCryptographicConstraintgetSignatureCryptographicConstraint(Context context)This method creates theSignatureCryptographicConstraintcorresponding to the context parameter.LevelConstraintgetSignatureDuplicatedConstraint(Context context)Indicates if the signature is not ambiguousMultiValuesConstraintgetSignatureFormatConstraint(Context context)Returns SignatureFormat constraint if present in the policy, null otherwiseLevelConstraintgetSignatureIntactConstraint(Context context)Indicates if the signature is intactMultiValuesConstraintgetSignaturePolicyConstraint(Context context)Indicates if the signature policy should be checked.LevelConstraintgetSignaturePolicyIdentifiedConstraint(Context context)Indicates if the signature policy validation should be processed.LevelConstraintgetSignaturePolicyPolicyHashValid(Context context)Indicates if digest present in a SignaturePolicyIdentifier shall match to the extracted policy contentLevelConstraintgetSignaturePolicyStorePresentConstraint(Context context)Indicates if a SignaturePolicyStore unsigned attribute, containing a used policy binaries, presence shall be checkedLevelConstraintgetSignedFilesPresentConstraint()Returns SignedFilesPresent constraint if present in the policy, null otherwiseLevelConstraintgetSignerInformationStoreConstraint(Context context)This constraint checks if only one SignerInfo is present into a SignerInformationStore NOTE: applicable only for PAdESLevelConstraintgetSignerLocationConstraint(Context context)Indicates if the signed property: signer-location should be checked.LevelConstraintgetSigningCertificateAttributePresentConstraint(Context context)Indicates if the signing certificate attribute is presentLevelConstraintgetSigningCertificateDigestValueMatchConstraint(Context context)Indicates if the signing certificate reference's digest value matchesLevelConstraintgetSigningCertificateDigestValuePresentConstraint(Context context)Indicates if the signing certificate reference's digest value is presentLevelConstraintgetSigningCertificateIssuerSerialMatchConstraint(Context context)Indicates if the signing certificate reference's issuer serial matchesLevelConstraintgetSigningCertificateRecognitionConstraint(Context context)Indicates if the end user certificate used in validating the signature is issued to a natural person.LevelConstraintgetSigningCertificateRefersCertificateChainConstraint(Context context)Indicates if the Signing Certificate attribute should be checked against the certificate chain.LevelConstraintgetSigningTimeConstraint(Context context)Indicates if the signed property: signing-time should be checked.LevelConstraintgetStructuralValidationConstraint(Context context)Indicates if the structural validation should be checked.LevelConstraintgetTimestampCoherenceConstraint()This constraint checks if the timestamp order is coherentTimestampConstraintsgetTimestampConstraints()Returns the constraint used for Timestamp validationTimeConstraintgetTimestampDelayConstraint()Returns TimestampDelay constraint if present in the policy, null otherwiseTimeConstraintgetTLFreshnessConstraint()Returns TLFreshness constraint if present in the policy, null otherwiseLevelConstraintgetTLNotExpiredConstraint()Returns TLNotExpired constraint if present in the policy, null otherwiseValueConstraintgetTLVersionConstraint()Returns TLVersion constraint if present in the policy, null otherwiseLevelConstraintgetTLWellSignedConstraint()Returns TLWellSigned constraint if present in the policy, null otherwiseMultiValuesConstraintgetTrustedServiceStatusConstraint(Context context)Returns trusted service status constraintMultiValuesConstraintgetTrustedServiceTypeIdentifierConstraint(Context context)Returns trusted service type identifier constraintLevelConstraintgetUnicitySigningCertificateAttributeConstraint(Context context)Indicates if the signing certificate is not ambiguously determinesLevelConstraintgetUnknownStatusConstraint()The method returns UnknownStatus constraintModelgetValidationModel()Returns the used validation model (default is SHELL).LevelConstraintgetZipCommentPresentConstraint()Returns ZipCommentPresent constraint if present in the policy, null otherwisebooleanisEIDASConstraintPresent()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 constraintsnullis returned.- Parameters:
algorithm- algorithm (SHA1, SHA256, RSA2048...) to be checkedcontext-ContextsubContext-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:
LevelConstraintif 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:
LevelConstraintif SignaturePolicy shall be identified
-
getSignaturePolicyStorePresentConstraint
Indicates if a SignaturePolicyStore unsigned attribute, containing a used policy binaries, presence shall be checked- Parameters:
context-Context- Returns:
LevelConstraintif SignaturePolicyStore presence shall be checked
-
getSignaturePolicyPolicyHashValid
Indicates if digest present in a SignaturePolicyIdentifier shall match to the extracted policy content- Parameters:
context-Context- Returns:
LevelConstraintif 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:
LevelConstraintif 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:
LevelConstraintif 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:
LevelConstraintif 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:
LevelConstraintif 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:
ValueConstraintif 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:
ValueConstraintif 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:
ValueConstraintif 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:
LevelConstraintif 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:
MultiValuesConstraintif 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:
LevelConstraintif 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:
LevelConstraintif 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:
MultiValuesConstraintif 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 theSignatureCryptographicConstraintcorresponding 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:
SignatureCryptographicConstraintif AcceptableEncryptionAlgo for a given context element is present in the constraint file, null otherwise.
-
getCertificateCryptographicConstraint
CryptographicConstraint getCertificateCryptographicConstraint(Context context, SubContext subContext)This method creates theSignatureCryptographicConstraintcorresponding 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:
SignatureCryptographicConstraintif AcceptableEncryptionAlgo for a given context element is present in the constraint file, null otherwise.
-
getCertificateKeyUsageConstraint
Returns certificate key usage constraint- Parameters:
context-ContextsubContext-SubContext- Returns:
LevelConstraintif 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-ContextsubContext-SubContext- Returns:
LevelConstraintif 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-ContextsubContext-SubContext- Returns:
LevelConstraintif 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:
LevelConstraintif ProspectiveCertificateChain element for a given context element is present in the constraint file, null otherwise.
-
getCertificateSignatureConstraint
Returns certificate's signature constraint- Parameters:
context-ContextsubContext-SubContext- Returns:
LevelConstraintif 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-ContextsubContext-SubContext- Returns:
LevelConstraintif 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-ContextsubContext-SubContext- Returns:
LevelConstraintif 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-ContextsubContext-SubContext- Returns:
LevelConstraintif RevocationFreshness for a given context element is present in the constraint file, null otherwise.
-
getCertificateNotRevokedConstraint
Returns certificate's not revoked constraint- Parameters:
context-ContextsubContext-SubContext- Returns:
LevelConstraintif Revoked for a given context element is present in the constraint file, null otherwise.
-
getCertificateNotOnHoldConstraint
Returns certificate's not onHold constraint- Parameters:
context-ContextsubContext-SubContext- Returns:
LevelConstraintif OnHold for a given context element is present in the constraint file, null otherwise.
-
getCertificateNotSelfSignedConstraint
Returns certificate's not self-signed constraint- Parameters:
context-ContextsubContext-SubContext- Returns:
LevelConstraintif 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-ContextsubContext-SubContext- Returns:
LevelConstraintif 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:
LevelConstraintif 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:
LevelConstraintif 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-ContextsubContext-SubContext- Returns:
LevelConstraintif 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-ContextsubContext-SubContext- Returns:
LevelConstraintif 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-ContextsubContext-SubContext- Returns:
LevelConstraintif 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:
LevelConstraintif 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:
LevelConstraintif 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:
LevelConstraintif 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:
LevelConstraintif 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:
LevelConstraintif 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:
LevelConstraintif 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:
LevelConstraintif 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:
LevelConstraintif 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:
LevelConstraintif 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:
LevelConstraintif 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:
SignatureDataIntactif 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:
SignatureDuplicatedif 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:
LevelConstraintif 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:
LevelConstraintif 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:
LevelConstraintif 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:
LevelConstraintif 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:
LevelConstraintif BestSignatureTimeBeforeExpirationDateOfSigningCertificate element is present in the constraint file, null otherwise.
-
getTimestampCoherenceConstraint
LevelConstraint getTimestampCoherenceConstraint()This constraint checks if the timestamp order is coherent- Returns:
LevelConstraintif TimestampCoherence element is present in the constraint file, null otherwise.
-
getTimestampDelayConstraint
TimeConstraint getTimestampDelayConstraint()Returns TimestampDelay constraint if present in the policy, null otherwise- Returns:
TimeConstraintif TimestampDelay element is present in the constraint file, null otherwise.
-
getRevocationTimeAgainstBestSignatureTimeConstraint
LevelConstraint getRevocationTimeAgainstBestSignatureTimeConstraint()Returns RevocationTimeAgainstBestSignatureTime constraint if present in the policy, null otherwise- Returns:
LevelConstraintif RevocationTimeAgainstBestSignatureTime element is present in the constraint file, null otherwise.
-
getRevocationFreshnessConstraint
TimeConstraint getRevocationFreshnessConstraint()Returns RevocationFreshness constraint if present in the policy, null otherwise- Returns:
TimeConstraintif RevocationFreshness element is present in the constraint file, null otherwise.
-
getCounterSignatureConstraint
Returns CounterSignature constraint if present in the policy, null otherwise- Parameters:
context-ContextDiagnosticDataFacade- Returns:
LevelConstraintif 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:
MultiValuesConstraintif SignatureFormat element is present in the constraint file, null otherwise.
-
getCertificateCountryConstraint
Returns CertificateCountry constraint if present in the policy, null otherwise- Parameters:
context-ContextsubContext-SubContext- Returns:
MultiValuesConstraintif 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-ContextsubContext-SubContext- Returns:
MultiValuesConstraintif 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-ContextsubContext-SubContext- Returns:
MultiValuesConstraintif CertificateOrganizationUnit element is present in the constraint file, null otherwise.
-
getCertificateSurnameConstraint
Returns CertificateSurname constraint if present in the policy, null otherwise- Parameters:
context-ContextsubContext-SubContext- Returns:
MultiValuesConstraintif CertificateSurname element is present in the constraint file, null otherwise.
-
getCertificateGivenNameConstraint
Returns CertificateGivenName constraint if present in the policy, null otherwise- Parameters:
context-ContextsubContext-SubContext- Returns:
MultiValuesConstraintif CertificateGivenName element is present in the constraint file, null otherwise.
-
getCertificateCommonNameConstraint
Returns CertificateCommonName constraint if present in the policy, null otherwise- Parameters:
context-ContextsubContext-SubContext- Returns:
MultiValuesConstraintif CertificateCommonName element is present in the constraint file, null otherwise.
-
getCertificatePseudonymConstraint
Returns CertificatePseudonym constraint if present in the policy, null otherwise- Parameters:
context-ContextsubContext-SubContext- Returns:
MultiValuesConstraintif CertificatePseudonym element is present in the constraint file, null otherwise.
-
getCertificatePseudoUsageConstraint
Returns CertificatePseudoUsage constraint if present in the policy, null otherwise- Parameters:
context-ContextsubContext-SubContext- Returns:
LevelConstraintif CertificatePseudoUsage element is present in the constraint file, null otherwise.
-
getCertificateSerialNumberConstraint
Returns CertificateSerialNumber constraint if present in the policy, null otherwise- Parameters:
context-ContextsubContext-SubContext- Returns:
LevelConstraintif 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-ContextsubContext-SubContext- Returns:
LevelConstraintif 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-ContextsubContext-SubContext- Returns:
LevelConstraintif CertificateRevocationInfoAccessPresent element is present in the constraint file, null otherwise.
-
getCertificatePolicyIdsConstraint
Returns CertificatePolicyIds constraint if present in the policy, null otherwise- Parameters:
context-ContextsubContext-SubContext- Returns:
MultiValuesConstraintif 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-ContextsubContext-SubContext- Returns:
MultiValuesConstraintif 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-ContextsubContext-SubContext- Returns:
LevelConstraintif CertificateIssuedToNaturalPerson element is present in the constraint file, null otherwise.
-
getAcceptedContainerTypesConstraint
MultiValuesConstraint getAcceptedContainerTypesConstraint()Returns AcceptedContainerTypes constraint if present in the policy, null otherwise- Returns:
MultiValuesConstraintif AcceptedContainerTypes element is present in the constraint file, null otherwise.
-
getZipCommentPresentConstraint
LevelConstraint getZipCommentPresentConstraint()Returns ZipCommentPresent constraint if present in the policy, null otherwise- Returns:
LevelConstraintif ZipCommentPresent element is present in the constraint file, null otherwise.
-
getAcceptedZipCommentsConstraint
MultiValuesConstraint getAcceptedZipCommentsConstraint()Returns AcceptedZipComments constraint if present in the policy, null otherwise- Returns:
MultiValuesConstraintif AcceptedZipComments element is present in the constraint file, null otherwise.
-
getMimeTypeFilePresentConstraint
LevelConstraint getMimeTypeFilePresentConstraint()Returns MimeTypeFilePresent constraint if present in the policy, null otherwise- Returns:
LevelConstraintif MimeTypeFilePresent element is present in the constraint file, null otherwise.
-
getAcceptedMimeTypeContentsConstraint
MultiValuesConstraint getAcceptedMimeTypeContentsConstraint()Returns AcceptedMimeTypeContents constraint if present in the policy, null otherwise- Returns:
MultiValuesConstraintif AcceptedMimeTypeContents element is present in the constraint file, null otherwise.
-
getAllFilesSignedConstraint
LevelConstraint getAllFilesSignedConstraint()Returns AllFilesSigned constraint if present in the policy, null otherwise- Returns:
LevelConstraintif AllFilesSigned element is present in the constraint file, null otherwise.
-
getManifestFilePresentConstraint
LevelConstraint getManifestFilePresentConstraint()Returns ManifestFilePresent constraint if present in the policy, null otherwise- Returns:
LevelConstraintif ManifestFilePresent element is present in the constraint file, null otherwise.
-
getSignedFilesPresentConstraint
LevelConstraint getSignedFilesPresentConstraint()Returns SignedFilesPresent constraint if present in the policy, null otherwise- Returns:
LevelConstraintif SignedFilesPresent element is present in the constraint file, null otherwise.
-
getFullScopeConstraint
LevelConstraint getFullScopeConstraint()Returns FullScope constraint if present in the policy, null otherwise- Returns:
LevelConstraintif 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:
TimeConstraintif TLFreshness element is present in the constraint file, null otherwise.
-
getTLWellSignedConstraint
LevelConstraint getTLWellSignedConstraint()Returns TLWellSigned constraint if present in the policy, null otherwise- Returns:
TimeConstraintif TLWellSigned element is present in the constraint file, null otherwise.
-
getTLNotExpiredConstraint
LevelConstraint getTLNotExpiredConstraint()Returns TLNotExpired constraint if present in the policy, null otherwise- Returns:
TimeConstraintif TLNotExpired element is present in the constraint file, null otherwise.
-
getTLVersionConstraint
ValueConstraint getTLVersionConstraint()Returns TLVersion constraint if present in the policy, null otherwise- Returns:
ValueConstraintif 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
-