Package eu.europa.esig.dss.policy
Class EtsiValidationPolicy
java.lang.Object
eu.europa.esig.dss.policy.EtsiValidationPolicy
- All Implemented Interfaces:
ValidationPolicy
This class encapsulates the constraint file that controls the policy to be used during the validation process. It
adds the functions to direct access to the
file data. It is the implementation of the ETSI 102853 standard.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns AcceptablePDFAProfiles constraint if present in the policy, null otherwisegetAcceptableRevocationDataFoundConstraint
(Context context, SubContext subContext) Returns acceptable revocation data available constraintReturns AcceptedContainerTypes constraint if present in the policy, null otherwiseReturns AcceptedMimeTypeContents constraint if present in the policy, null otherwiseReturns AcceptedZipComments constraint if present in the policy, null otherwiseReturns AllFilesSigned constraint if present in the policy, null otherwiseThis constraint checks if the certificate is not expired on best-signature-timegetByteRangeAllDocumentConstraint
(Context context) This constraint checks if ByteRange is valid for all signatures and document timestamps within PDF NOTE: applicable only for PAdESgetByteRangeCollisionConstraint
(Context context) This constraint checks if ByteRange does not collide with other signature byte ranges NOTE: applicable only for PAdESgetByteRangeConstraint
(Context context) This constraint checks if ByteRange dictionary is valid NOTE: applicable only for PAdESgetCertificateAuthorityInfoAccessPresentConstraint
(Context context, SubContext subContext) Returns CertificateAuthorityInfoAccessPresent constraint if present in the policy, null otherwisegetCertificateCAConstraint
(Context context, SubContext subContext) Returns certificate CA constraintgetCertificateCommonNameConstraint
(Context context, SubContext subContext) Returns CertificateCommonName constraint if present in the policy, null otherwisegetCertificateCountryConstraint
(Context context, SubContext subContext) Returns CertificateCountry constraint if present in the policy, null otherwisegetCertificateCryptographicConstraint
(Context context, SubContext subContext) This method creates theSignatureCryptographicConstraint
corresponding to the context parameter.getCertificateExtendedKeyUsageConstraint
(Context context, SubContext subContext) Returns certificate extended key usage constraintgetCertificateForbiddenExtensionsConstraint
(Context context, SubContext subContext) Returns certificate forbidden extensions constraintgetCertificateGivenNameConstraint
(Context context, SubContext subContext) Returns CertificateGivenName constraint if present in the policy, null otherwisegetCertificateIssuedToLegalPersonConstraint
(Context context, SubContext subContext) Indicates if the end user certificate used in validating the signature is issued to a legal person.getCertificateIssuedToNaturalPersonConstraint
(Context context, SubContext subContext) Indicates if the end user certificate used in validating the signature is issued to a natural person.getCertificateKeyUsageConstraint
(Context context, SubContext subContext) Returns certificate key usage constraintgetCertificateMaxPathLengthConstraint
(Context context, SubContext subContext) Returns certificate MaxPathLength constraintgetCertificateMinQcEuLimitValueConstraint
(Context context, SubContext subContext) Indicates the minimal allowed QcEuLimitValue transaction limit for which the end user certificate used for the signature can be used.getCertificateMinQcEuRetentionPeriodConstraint
(Context context, SubContext subContext) Indicates the minimal allowed QC retention period for material information relevant to the use of the end user certificate used for the signature.getCertificateNameConstraintsConstraint
(Context context, SubContext subContext) Returns certificate NameConstraints constraintgetCertificateNotExpiredConstraint
(Context context, SubContext subContext) Returns certificate's validity range constraintgetCertificateNotOnHoldConstraint
(Context context, SubContext subContext) Returns certificate's not onHold constraintgetCertificateNotRevokedConstraint
(Context context, SubContext subContext) Returns certificate's not revoked constraintgetCertificateNotSelfSignedConstraint
(Context context, SubContext subContext) Returns certificate's not self-signed constraintgetCertificateOrganizationNameConstraint
(Context context, SubContext subContext) Returns CertificateOrganizationName constraint if present in the policy, null otherwisegetCertificateOrganizationUnitConstraint
(Context context, SubContext subContext) Returns CertificateOrganizationUnit constraint if present in the policy, null otherwisegetCertificatePolicyIdsConstraint
(Context context, SubContext subContext) Returns CertificatePolicyIds constraint if present in the policy, null otherwisegetCertificatePolicyQualificationIdsConstraint
(Context context, SubContext subContext) Indicates if the CertificatePolicyIds declare the certificate as qualified.getCertificatePolicySupportedByQSCDIdsConstraint
(Context context, SubContext subContext) Indicates if the CertificatePolicyIds mandate the certificate as to be supported by a secure signature creation device (QSCD).getCertificatePolicyTreeConstraint
(Context context, SubContext subContext) Returns certificate PolicyTree constraintgetCertificatePS2DQcCompetentAuthorityIdConstraint
(Context context, SubContext subContext) Indicates the acceptable QC PS2D ids for the certificate used for a signature.getCertificatePS2DQcCompetentAuthorityNameConstraint
(Context context, SubContext subContext) Indicates the acceptable QC PS2D names for the certificate used for a signature.getCertificatePS2DQcTypeRolesOfPSPConstraint
(Context context, SubContext subContext) Indicates the acceptable QC PS2D roles for the certificate used for a signature.getCertificatePseudonymConstraint
(Context context, SubContext subContext) Returns CertificatePseudonym constraint if present in the policy, null otherwisegetCertificatePseudoUsageConstraint
(Context context, SubContext subContext) Returns CertificatePseudoUsage constraint if present in the policy, null otherwisegetCertificateQcCCLegislationConstraint
(Context context, SubContext subContext) Indicates the country or set of countries under the legislation of which the certificate is issued as a qualified certificate is present.getCertificateQCComplianceConstraint
(Context context, SubContext subContext) Indicates if the end user certificate used in validating the signature is QC Compliant.getCertificateQcEuLimitValueCurrencyConstraint
(Context context, SubContext subContext) Indicates the allowed currency used to specify certificate's QCLimitValue statement.getCertificateQcEuPDSLocationConstraint
(Context context, SubContext subContext) Indicates the location or set of locations of PKI Disclosure Statements.getCertificateQcSSCDConstraint
(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).getCertificateQcTypeConstraint
(Context context, SubContext subContext) Indicates the certificate is claimed as a certificate of a particular type.getCertificateRevocationInfoAccessPresentConstraint
(Context context, SubContext subContext) Returns CertificateRevocationInfoAccessPresent constraint if present in the policy, null otherwisegetCertificateSelfSignedConstraint
(Context context, SubContext subContext) Returns certificate's self-signed constraintgetCertificateSemanticsIdentifierConstraint
(Context context, SubContext subContext) Indicates the certificate's QCStatement contains an acceptable semantics identifier.getCertificateSerialNumberConstraint
(Context context, SubContext subContext) Returns CertificateSerialNumber constraint if present in the policy, null otherwisegetCertificateSignatureConstraint
(Context context, SubContext subContext) Returns certificate's signature constraintgetCertificateSupportedCriticalExtensionsConstraint
(Context context, SubContext subContext) Returns certificate supported critical extensions constraintgetCertificateSurnameConstraint
(Context context, SubContext subContext) Returns CertificateSurname constraint if present in the policy, null otherwisegetCertifiedRolesConstraint
(Context context) Return the mandated signer role.getClaimedRoleConstraint
(Context context) Indicates if the unsigned property: claimed-role should be checked.Indicates if the signed property: commitment-type-indication should be checked.Returns the constraint used for ASiC Container validationgetContentHintsConstraint
(Context context) Indicates if the signed property: content-hints should be checked.getContentIdentifierConstraint
(Context context) Indicates if the signed property: content-identifier should be checked.getContentTimestampConstraint
(Context context) Indicates if the signed property: content-time-stamp should be checked.Indicates if the signed property: content-time-stamp message-imprint should be checked.getContentTypeConstraint
(Context context) Indicates if the signed property: content-type should be checked.getCounterSignatureConstraint
(Context context) Returns CounterSignature constraint if present in the policy, null otherwiseReturns the constraint used for Counter Signature validationgetCRLNextUpdatePresentConstraint
(Context context, SubContext subContext) Returns CRL's nextUpdate present constraintReturns the common constraint used for cryptographic validationGets the global cryptographic constraintsgetDocMDPConstraint
(Context context) This constraint checks if a document contains changes after a signature, against permission rules identified within a /DocMDP dictionaryReturns the constraint used for qualification validationgetEllipticCurveKeySizeConstraint
(Context context) This constraint checks whether a JWA signature has a valid elliptic curve key sizegetFieldMDPConstraint
(Context context) This constraint checks if a document contains changes after a signature, against permission rules identified within a /FieldMDP dictionaryReturns FullScope constraint if present in the policy, null otherwisegetKeyIdentifierMatch
(Context context) Indicates if the value of 'kid' (key identifier) header parameter matches the signing-certificate used to create the signaturegetKeyIdentifierPresent
(Context context) Indicates if the 'kid' (key identifier) header parameter is present within the protected header of the signatureIndicates if the manifested document is foundReturns ManifestFilePresent constraint if present in the policy, null otherwiseIndicates if the signed property: message-digest (for CAdES) or SignedProperties (for XAdES) should be checked.Returns MimeTypeFilePresent constraint if present in the policy, null otherwisegetOCSPNextUpdatePresentConstraint
(Context context, SubContext subContext) Returns OCSP's nextUpdate present constraintThe method returns OCSPCertHashMatch constraintThe method returns OCSPCertHashPresent constraintThe method returns OCSPResponderIdMatch constraintReturns PDFACompliant constraint if present in the policy, null otherwiseReturns the constraint used for ASiC Container validationgetPdfAnnotationOverlapConstraint
(Context context) Indicates if a PDF annotation overlapping check should be proceeded.getPdfPageDifferenceConstraint
(Context context) Indicates if a PDF page difference check should be proceeded.This constraint checks if signature dictionary is consistent across PDF revisions.getPdfVisualDifferenceConstraint
(Context context) Indicates if a PDF visual difference check should be proceeded.Returns the policy description.Returns the name of the policy.This constraint requests the presence of the trust anchor in the certificate chain.Indicates if the referenced data is foundgetReferenceDataIntactConstraint
(Context context) Indicates if the referenced data is intactIndicates if the whole certificate chain is covered by the Signing Certificate attribute.Returns the constraint used for Revocation validationgetRevocationDataAvailableConstraint
(Context context, SubContext subContext) Returns revocation data available constraintgetRevocationFreshnessConstraint
(Context context, SubContext subContext) Returns revocation data's freshness constraintgetRevocationFreshnessNextUpdateConstraint
(Context context, SubContext subContext) Returns revocation data's freshness for nextUpdate check constraintgetRevocationIssuerNotExpiredConstraint
(Context context, SubContext subContext) Returns revocation issuer's validity range constraintReturns RevocationTimeAgainstBestSignatureTime constraint if present in the policy, null otherwiseThe method returns SelfIssuedOCSP constraintgetSigFieldLockConstraint
(Context context) This constraint checks if a document contains changes after a signature, against permission rules identified within a /SigFieldLock dictionaryReturns the constraint used for Signature validationThis method creates theSignatureCryptographicConstraint
corresponding to the context parameter.getSignatureDuplicatedConstraint
(Context context) Indicates if the signature is not ambiguousgetSignatureFormatConstraint
(Context context) Returns SignatureFormat constraint if present in the policy, null otherwisegetSignatureIntactConstraint
(Context context) Indicates if the signature is intactgetSignaturePolicyConstraint
(Context context) Indicates if the signature policy should be checked.Indicates if the signature policy validation should be processed.getSignaturePolicyPolicyHashValid
(Context context) Indicates if digest present in a SignaturePolicyIdentifier shall match to the extracted policy contentIndicates if a SignaturePolicyStore unsigned attribute, containing a used policy binaries, presence shall be checkedReturns SignedFilesPresent constraint if present in the policy, null otherwiseThis constraint checks if only one SignerInfo is present into a SignerInformationStore NOTE: applicable only for PAdESgetSignerLocationConstraint
(Context context) Indicates if the signed property: signer-location should be checked.Indicates if the signing certificate attribute is presentChecks if a used DigestAlgorithm in signing-certificate-reference creation matches the corresponding cryptographic constraintIndicates if the signing certificate reference's digest value matchesIndicates if the signing certificate reference's digest value is presentIndicates if the signing certificate reference's issuer serial matchesIndicates if signing-certificate has been identified.Indicates if the Signing Certificate attribute should be checked against the certificate chain.getSigningTimeConstraint
(Context context) Indicates if the signed property: signing-time should be checked.getStructuralValidationConstraint
(Context context) Indicates if the structural validation should be checked.This constraint checks if the timestamp order is coherentReturns the constraint used for Timestamp validationReturns TimestampDelay constraint if present in the policy, null otherwiseIndicates if the timestamp's TSTInfo.tsa field's value matches the timestamp's issuer distinguishing name when presentIndicates if the timestamp's TSTInfo.tsa field's value and order match the timestamp's issuer distinguishing name when presentIndicates if the timestamp's TSTInfo.tsa field is presentReturns TLFreshness constraint if present in the policy, null otherwiseReturns TLNotExpired constraint if present in the policy, null otherwiseReturns TLVersion constraint if present in the policy, null otherwiseReturns TLWellSigned constraint if present in the policy, null otherwisegetTrustedServiceStatusConstraint
(Context context) Returns trusted service status constraintReturns trusted service type identifier constraintgetUndefinedChangesConstraint
(Context context) This constraint checks whether a PDF document contains undefined object modifications after the current signature's revisionsIndicates if the signing certificate is not ambiguously determinesThe method returns UnknownStatus constraintReturns the used validation model (default is SHELL).Returns ZipCommentPresent constraint if present in the policy, null otherwiseboolean
Returns if EIDAS constraints present (qualification check shall be performed)
-
Constructor Details
-
EtsiValidationPolicy
Default constructor- Parameters:
policy
-ConstraintsParameters
-
-
Method Details
-
getSignaturePolicyConstraint
Description copied from interface:ValidationPolicy
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.- Specified by:
getSignaturePolicyConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if SigningTime element is present in the constraint file, null otherwise.
-
getSignaturePolicyIdentifiedConstraint
Description copied from interface:ValidationPolicy
Indicates if the signature policy validation should be processed. If SignaturePolicyIdentifier found, but not relevant SignaturePolicy is retrieved, the check fails.- Specified by:
getSignaturePolicyIdentifiedConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if SignaturePolicy shall be identified
-
getSignaturePolicyStorePresentConstraint
Description copied from interface:ValidationPolicy
Indicates if a SignaturePolicyStore unsigned attribute, containing a used policy binaries, presence shall be checked- Specified by:
getSignaturePolicyStorePresentConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if SignaturePolicyStore presence shall be checked
-
getSignaturePolicyPolicyHashValid
Description copied from interface:ValidationPolicy
Indicates if digest present in a SignaturePolicyIdentifier shall match to the extracted policy content- Specified by:
getSignaturePolicyPolicyHashValid
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if SignaturePolicyIdentifier digest shall match
-
getSignatureFormatConstraint
Description copied from interface:ValidationPolicy
Returns SignatureFormat constraint if present in the policy, null otherwise- Specified by:
getSignatureFormatConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
MultiValuesConstraint
if SignatureFormat element is present in the constraint file, null otherwise.
-
getSignerInformationStoreConstraint
Description copied from interface:ValidationPolicy
This constraint checks if only one SignerInfo is present into a SignerInformationStore NOTE: applicable only for PAdES- Specified by:
getSignerInformationStoreConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if SignerInformationStore element for a given context element is present in the constraint file, null otherwise.
-
getByteRangeConstraint
Description copied from interface:ValidationPolicy
This constraint checks if ByteRange dictionary is valid NOTE: applicable only for PAdES- Specified by:
getByteRangeConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if ByteRange element for a given context element is present in the constraint file, null otherwise.
-
getByteRangeCollisionConstraint
Description copied from interface:ValidationPolicy
This constraint checks if ByteRange does not collide with other signature byte ranges NOTE: applicable only for PAdES- Specified by:
getByteRangeCollisionConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if ByteRangeCollision element for a given context element is present in the constraint file, null otherwise.
-
getByteRangeAllDocumentConstraint
Description copied from interface:ValidationPolicy
This constraint checks if ByteRange is valid for all signatures and document timestamps within PDF NOTE: applicable only for PAdES- Specified by:
getByteRangeAllDocumentConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if ByteRangeAllDocument element for a given context element is present in the constraint file, null otherwise.
-
getPdfSignatureDictionaryConstraint
Description copied from interface:ValidationPolicy
This constraint checks if signature dictionary is consistent across PDF revisions. NOTE: applicable only for PAdES- Specified by:
getPdfSignatureDictionaryConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if PdfSignatureDictionary element for a given context element is present in the constraint file, null otherwise.
-
getPdfPageDifferenceConstraint
Description copied from interface:ValidationPolicy
Indicates if a PDF page difference check should be proceeded. If PdfPageDifference element is absent within the constraint file then null is returned.- Specified by:
getPdfPageDifferenceConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if PdfPageDifference element is present in the constraint file, null otherwise.
-
getPdfAnnotationOverlapConstraint
Description copied from interface:ValidationPolicy
Indicates if a PDF annotation overlapping check should be proceeded. If PdfAnnotationOverlap element is absent within the constraint file then null is returned.- Specified by:
getPdfAnnotationOverlapConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if PdfAnnotationOverlap element is present in the constraint file, null otherwise.
-
getPdfVisualDifferenceConstraint
Description copied from interface:ValidationPolicy
Indicates if a PDF visual difference check should be proceeded. If PdfVisualDifference element is absent within the constraint file then null is returned.- Specified by:
getPdfVisualDifferenceConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if PdfVisualDifference element is present in the constraint file, null otherwise.
-
getDocMDPConstraint
Description copied from interface:ValidationPolicy
This constraint checks if a document contains changes after a signature, against permission rules identified within a /DocMDP dictionary- Specified by:
getDocMDPConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if DocMDP element is present in the constraint file, null otherwise.
-
getFieldMDPConstraint
Description copied from interface:ValidationPolicy
This constraint checks if a document contains changes after a signature, against permission rules identified within a /FieldMDP dictionary- Specified by:
getFieldMDPConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if FieldMDP element is present in the constraint file, null otherwise.
-
getSigFieldLockConstraint
Description copied from interface:ValidationPolicy
This constraint checks if a document contains changes after a signature, against permission rules identified within a /SigFieldLock dictionary- Specified by:
getSigFieldLockConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if SigFieldLock element is present in the constraint file, null otherwise.
-
getUndefinedChangesConstraint
Description copied from interface:ValidationPolicy
This constraint checks whether a PDF document contains undefined object modifications after the current signature's revisions- Specified by:
getUndefinedChangesConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if UndefinedChanges element is present in the constraint file, null otherwise.
-
getStructuralValidationConstraint
Description copied from interface:ValidationPolicy
Indicates if the structural validation should be checked. If StructuralValidation element is absent within the constraint file then null is returned.- Specified by:
getStructuralValidationConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if StructuralValidation element is present in the constraint file, null otherwise.
-
getSigningCertificateRefersCertificateChainConstraint
Description copied from interface:ValidationPolicy
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.- Specified by:
getSigningCertificateRefersCertificateChainConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if SigningCertificateRefersCertificateChain element is present in the constraint file, null otherwise.
-
getReferencesToAllCertificateChainPresentConstraint
Description copied from interface:ValidationPolicy
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.- Specified by:
getReferencesToAllCertificateChainPresentConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if ReferencesToAllCertificateChainPresent element is present in the constraint file, null otherwise.
-
getSigningCertificateDigestAlgorithmConstraint
Description copied from interface:ValidationPolicy
Checks if a used DigestAlgorithm in signing-certificate-reference creation matches the corresponding cryptographic constraint- Specified by:
getSigningCertificateDigestAlgorithmConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if SigningCertificateDigestAlgorithm for a given context element is present in the constraint file, null otherwise.
-
getSigningTimeConstraint
Description copied from interface:ValidationPolicy
Indicates if the signed property: signing-time should be checked. If SigningTime element is absent within the constraint file then null is returned.- Specified by:
getSigningTimeConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if SigningTime element is present in the constraint file, null otherwise.
-
getContentTypeConstraint
Description copied from interface:ValidationPolicy
Indicates if the signed property: content-type should be checked. If ContentType element is absent within the constraint file then null is returned.- Specified by:
getContentTypeConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
ValueConstraint
if ContentType element is present in the constraint file, null otherwise.
-
getCounterSignatureConstraint
Description copied from interface:ValidationPolicy
Returns CounterSignature constraint if present in the policy, null otherwise- Specified by:
getCounterSignatureConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
DiagnosticDataFacade- Returns:
LevelConstraint
if CounterSignature element is present in the constraint file, null otherwise.
-
getContentHintsConstraint
Description copied from interface:ValidationPolicy
Indicates if the signed property: content-hints should be checked. If ContentHints element is absent within the constraint file then null is returned.- Specified by:
getContentHintsConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
ValueConstraint
if ContentHints element is present in the constraint file, null otherwise.
-
getContentIdentifierConstraint
Description copied from interface:ValidationPolicy
Indicates if the signed property: content-identifier should be checked. If ContentIdentifier element is absent within the constraint file then null is returned.- Specified by:
getContentIdentifierConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
ValueConstraint
if ContentIdentifier element is present in the constraint file, null otherwise.
-
getMessageDigestOrSignedPropertiesConstraint
Description copied from interface:ValidationPolicy
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.- Specified by:
getMessageDigestOrSignedPropertiesConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if message-digests/SignedProperties element is present in the constraint file, null otherwise.
-
getEllipticCurveKeySizeConstraint
Description copied from interface:ValidationPolicy
This constraint checks whether a JWA signature has a valid elliptic curve key size- Specified by:
getEllipticCurveKeySizeConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if EllipticCurveKeySize element is present in the constraint file, null otherwise.
-
getCommitmentTypeIndicationConstraint
Description copied from interface:ValidationPolicy
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.- Specified by:
getCommitmentTypeIndicationConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
MultiValuesConstraint
if CommitmentTypeIndication element is present in the constraint file, null otherwise.
-
getSignerLocationConstraint
Description copied from interface:ValidationPolicy
Indicates if the signed property: signer-location should be checked. If SignerLocation element is absent within the constraint file then null is returned.- Specified by:
getSignerLocationConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if SignerLocation element is present in the constraint file, null otherwise.
-
getClaimedRoleConstraint
Description copied from interface:ValidationPolicy
Indicates if the unsigned property: claimed-role should be checked. If ClaimedRoles element is absent within the constraint file then null is returned.- Specified by:
getClaimedRoleConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
MultiValuesConstraint
if ClaimedRoles element is present in the constraint file, null otherwise.
-
getCertifiedRolesConstraint
Description copied from interface:ValidationPolicy
Return the mandated signer role.- Specified by:
getCertifiedRolesConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
MultiValuesConstraint
-
getPolicyName
Description copied from interface:ValidationPolicy
Returns the name of the policy.- Specified by:
getPolicyName
in interfaceValidationPolicy
- Returns:
String
-
getPolicyDescription
Description copied from interface:ValidationPolicy
Returns the policy description.- Specified by:
getPolicyDescription
in interfaceValidationPolicy
- Returns:
String
-
getSignatureCryptographicConstraint
Description copied from interface:ValidationPolicy
This method creates theSignatureCryptographicConstraint
corresponding to the context parameter. If AcceptableEncryptionAlgo is not present in the constraint file the null is returned.- Specified by:
getSignatureCryptographicConstraint
in interfaceValidationPolicy
- 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
public CryptographicConstraint getCertificateCryptographicConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
This method creates theSignatureCryptographicConstraint
corresponding to the context parameter. If AcceptableEncryptionAlgo is not present in the constraint file the null is returned.- Specified by:
getCertificateCryptographicConstraint
in interfaceValidationPolicy
- 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.
-
getDefaultCryptographicConstraint
Gets the global cryptographic constraints- Returns:
CryptographicConstraint
-
getCertificateCAConstraint
Description copied from interface:ValidationPolicy
Returns certificate CA constraint- Specified by:
getCertificateCAConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if CA for a given context element is present in the constraint file, null otherwise.
-
getCertificateMaxPathLengthConstraint
public LevelConstraint getCertificateMaxPathLengthConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Returns certificate MaxPathLength constraint- Specified by:
getCertificateMaxPathLengthConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if MaxPathLength for a given context element is present in the constraint file, null otherwise.
-
getCertificateKeyUsageConstraint
public MultiValuesConstraint getCertificateKeyUsageConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Returns certificate key usage constraint- Specified by:
getCertificateKeyUsageConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if key-usage for a given context element is present in the constraint file, null otherwise.
-
getCertificateExtendedKeyUsageConstraint
public MultiValuesConstraint getCertificateExtendedKeyUsageConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Returns certificate extended key usage constraint- Specified by:
getCertificateExtendedKeyUsageConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if extended key-usage for a given context element is present in the constraint file, null otherwise.
-
getCertificatePolicyTreeConstraint
Description copied from interface:ValidationPolicy
Returns certificate PolicyTree constraint- Specified by:
getCertificatePolicyTreeConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if PolicyTree for a given context element is present in the constraint file, null otherwise.
-
getCertificateNameConstraintsConstraint
public LevelConstraint getCertificateNameConstraintsConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Returns certificate NameConstraints constraint- Specified by:
getCertificateNameConstraintsConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if NameConstraints for a given context element is present in the constraint file, null otherwise.
-
getCertificateSupportedCriticalExtensionsConstraint
public MultiValuesConstraint getCertificateSupportedCriticalExtensionsConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Returns certificate supported critical extensions constraint- Specified by:
getCertificateSupportedCriticalExtensionsConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if SupportedCriticalExtensions constraint for a given context element is present in the constraint file,null otherwise.
-
getCertificateForbiddenExtensionsConstraint
public MultiValuesConstraint getCertificateForbiddenExtensionsConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Returns certificate forbidden extensions constraint- Specified by:
getCertificateForbiddenExtensionsConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if ForbiddenExtensions constraint for a given context element is present in the constraint file,null otherwise.
-
getCertificateSurnameConstraint
public MultiValuesConstraint getCertificateSurnameConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Returns CertificateSurname constraint if present in the policy, null otherwise- Specified by:
getCertificateSurnameConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
MultiValuesConstraint
if CertificateSurname element is present in the constraint file, null otherwise.
-
getCertificateGivenNameConstraint
public MultiValuesConstraint getCertificateGivenNameConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Returns CertificateGivenName constraint if present in the policy, null otherwise- Specified by:
getCertificateGivenNameConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
MultiValuesConstraint
if CertificateGivenName element is present in the constraint file, null otherwise.
-
getCertificateCommonNameConstraint
public MultiValuesConstraint getCertificateCommonNameConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Returns CertificateCommonName constraint if present in the policy, null otherwise- Specified by:
getCertificateCommonNameConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
MultiValuesConstraint
if CertificateCommonName element is present in the constraint file, null otherwise.
-
getCertificatePseudonymConstraint
public MultiValuesConstraint getCertificatePseudonymConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Returns CertificatePseudonym constraint if present in the policy, null otherwise- Specified by:
getCertificatePseudonymConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
MultiValuesConstraint
if CertificatePseudonym element is present in the constraint file, null otherwise.
-
getCertificateCountryConstraint
public MultiValuesConstraint getCertificateCountryConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Returns CertificateCountry constraint if present in the policy, null otherwise- Specified by:
getCertificateCountryConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
MultiValuesConstraint
if CertificateCountry element is present in the constraint file, null otherwise.
-
getCertificateOrganizationNameConstraint
public MultiValuesConstraint getCertificateOrganizationNameConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Returns CertificateOrganizationName constraint if present in the policy, null otherwise- Specified by:
getCertificateOrganizationNameConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
MultiValuesConstraint
if CertificateOrganizationName element is present in the constraint file, null otherwise.
-
getCertificateOrganizationUnitConstraint
public MultiValuesConstraint getCertificateOrganizationUnitConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Returns CertificateOrganizationUnit constraint if present in the policy, null otherwise- Specified by:
getCertificateOrganizationUnitConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
MultiValuesConstraint
if CertificateOrganizationUnit element is present in the constraint file, null otherwise.
-
getCertificatePseudoUsageConstraint
Description copied from interface:ValidationPolicy
Returns CertificatePseudoUsage constraint if present in the policy, null otherwise- Specified by:
getCertificatePseudoUsageConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if CertificatePseudoUsage element is present in the constraint file, null otherwise.
-
getCertificateSerialNumberConstraint
Description copied from interface:ValidationPolicy
Returns CertificateSerialNumber constraint if present in the policy, null otherwise- Specified by:
getCertificateSerialNumberConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if CertificateSerialNumber element is present in the constraint file, null otherwise.
-
getCertificateNotExpiredConstraint
Description copied from interface:ValidationPolicy
Returns certificate's validity range constraint- Specified by:
getCertificateNotExpiredConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if NotExpired constraint for a given certificate context is present in the constraint file, null otherwise.
-
getProspectiveCertificateChainConstraint
Description copied from interface:ValidationPolicy
This constraint requests the presence of the trust anchor in the certificate chain.- Specified by:
getProspectiveCertificateChainConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if ProspectiveCertificateChain element for a given context element is present in the constraint file, null otherwise.
-
getCertificateAuthorityInfoAccessPresentConstraint
public LevelConstraint getCertificateAuthorityInfoAccessPresentConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Returns CertificateAuthorityInfoAccessPresent constraint if present in the policy, null otherwise- Specified by:
getCertificateAuthorityInfoAccessPresentConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if CertificateAuthorityInfoAccessPresent element is present in the constraint file, null otherwise.
-
getCertificateRevocationInfoAccessPresentConstraint
public LevelConstraint getCertificateRevocationInfoAccessPresentConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Returns CertificateRevocationInfoAccessPresent constraint if present in the policy, null otherwise- Specified by:
getCertificateRevocationInfoAccessPresentConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if CertificateRevocationInfoAccessPresent element is present in the constraint file, null otherwise.
-
getCertificateSignatureConstraint
Description copied from interface:ValidationPolicy
Returns certificate's signature constraint- Specified by:
getCertificateSignatureConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if Signature for a given context element is present in the constraint file, null otherwise.
-
getUnknownStatusConstraint
Description copied from interface:ValidationPolicy
The method returns UnknownStatus constraint- Specified by:
getUnknownStatusConstraint
in interfaceValidationPolicy
- Returns:
LevelConstraint
-
getOCSPResponseResponderIdMatchConstraint
Description copied from interface:ValidationPolicy
The method returns OCSPResponderIdMatch constraint- Specified by:
getOCSPResponseResponderIdMatchConstraint
in interfaceValidationPolicy
- Returns:
LevelConstraint
-
getOCSPResponseCertHashPresentConstraint
Description copied from interface:ValidationPolicy
The method returns OCSPCertHashPresent constraint- Specified by:
getOCSPResponseCertHashPresentConstraint
in interfaceValidationPolicy
- Returns:
LevelConstraint
-
getOCSPResponseCertHashMatchConstraint
Description copied from interface:ValidationPolicy
The method returns OCSPCertHashMatch constraint- Specified by:
getOCSPResponseCertHashMatchConstraint
in interfaceValidationPolicy
- Returns:
LevelConstraint
-
getSelfIssuedOCSPConstraint
Description copied from interface:ValidationPolicy
The method returns SelfIssuedOCSP constraint- Specified by:
getSelfIssuedOCSPConstraint
in interfaceValidationPolicy
- Returns:
LevelConstraint
-
getRevocationDataAvailableConstraint
Description copied from interface:ValidationPolicy
Returns revocation data available constraint- Specified by:
getRevocationDataAvailableConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if RevocationDataAvailable for a given context element is present in the constraint file, null otherwise.
-
getAcceptableRevocationDataFoundConstraint
public LevelConstraint getAcceptableRevocationDataFoundConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Returns acceptable revocation data available constraint- Specified by:
getAcceptableRevocationDataFoundConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if AcceptableRevocationDataFound for a given context element is present in the constraint file, null otherwise.
-
getCRLNextUpdatePresentConstraint
Description copied from interface:ValidationPolicy
Returns CRL's nextUpdate present constraint- Specified by:
getCRLNextUpdatePresentConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if CRLNextUpdatePresent for a given context element is present in the constraint file, null otherwise.
-
getOCSPNextUpdatePresentConstraint
Description copied from interface:ValidationPolicy
Returns OCSP's nextUpdate present constraint- Specified by:
getOCSPNextUpdatePresentConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if OCSPNextUpdatePresent for a given context element is present in the constraint file, null otherwise.
-
getRevocationFreshnessConstraint
Description copied from interface:ValidationPolicy
Returns revocation data's freshness constraint- Specified by:
getRevocationFreshnessConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
TimeConstraint
if RevocationFreshness for a given context element is present in the constraint file, null otherwise.
-
getRevocationFreshnessNextUpdateConstraint
public LevelConstraint getRevocationFreshnessNextUpdateConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Returns revocation data's freshness for nextUpdate check constraint- Specified by:
getRevocationFreshnessNextUpdateConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if RevocationFreshnessNextUpdate for a given context element is present in the constraint file, null otherwise.
-
getCertificateNotRevokedConstraint
Description copied from interface:ValidationPolicy
Returns certificate's not revoked constraint- Specified by:
getCertificateNotRevokedConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if Revoked for a given context element is present in the constraint file, null otherwise.
-
getCertificateNotOnHoldConstraint
Description copied from interface:ValidationPolicy
Returns certificate's not onHold constraint- Specified by:
getCertificateNotOnHoldConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if OnHold for a given context element is present in the constraint file, null otherwise.
-
getRevocationIssuerNotExpiredConstraint
public LevelConstraint getRevocationIssuerNotExpiredConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Returns revocation issuer's validity range constraint- Specified by:
getRevocationIssuerNotExpiredConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if RevocationIssuerNotExpired constraint for a given certificate context is present in the constraint file, null otherwise.
-
getCertificateNotSelfSignedConstraint
public LevelConstraint getCertificateNotSelfSignedConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Returns certificate's not self-signed constraint- Specified by:
getCertificateNotSelfSignedConstraint
in interfaceValidationPolicy
- 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
Description copied from interface:ValidationPolicy
Returns certificate's self-signed constraint- Specified by:
getCertificateSelfSignedConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if self-signed for a given context element is present in the constraint file, null otherwise.
-
getTrustedServiceStatusConstraint
Description copied from interface:ValidationPolicy
Returns trusted service status constraint- Specified by:
getTrustedServiceStatusConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if trusted service status for a given context element is present in the constraint file, null otherwise.
-
getTrustedServiceTypeIdentifierConstraint
Description copied from interface:ValidationPolicy
Returns trusted service type identifier constraint- Specified by:
getTrustedServiceTypeIdentifierConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if trusted service type identifier for a given context element is present in the constraint file, null otherwise.
-
getCertificatePolicyIdsConstraint
public MultiValuesConstraint getCertificatePolicyIdsConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Returns CertificatePolicyIds constraint if present in the policy, null otherwise- Specified by:
getCertificatePolicyIdsConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
MultiValuesConstraint
if CertificatePolicyIds element is present in the constraint file, null otherwise.
-
getCertificatePolicyQualificationIdsConstraint
public LevelConstraint getCertificatePolicyQualificationIdsConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Indicates if the CertificatePolicyIds declare the certificate as qualified.- Specified by:
getCertificatePolicyQualificationIdsConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if PolicyQualificationIds for a given context element is present in the constraint file, null otherwise.
-
getCertificatePolicySupportedByQSCDIdsConstraint
public LevelConstraint getCertificatePolicySupportedByQSCDIdsConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Indicates if the CertificatePolicyIds mandate the certificate as to be supported by a secure signature creation device (QSCD).- Specified by:
getCertificatePolicySupportedByQSCDIdsConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if PolicySupportedByQSCDIds for a given context element is present in the constraint file, null otherwise.
-
getCertificateQCComplianceConstraint
Description copied from interface:ValidationPolicy
Indicates if the end user certificate used in validating the signature is QC Compliant.- Specified by:
getCertificateQCComplianceConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if QcCompliance for a given context element is present in the constraint file, null otherwise.
-
getCertificateQcEuLimitValueCurrencyConstraint
public ValueConstraint getCertificateQcEuLimitValueCurrencyConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Indicates the allowed currency used to specify certificate's QCLimitValue statement.- Specified by:
getCertificateQcEuLimitValueCurrencyConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
IntValueConstraint
if QcTransactionLimitCurrency for a given context element is present in the constraint file, null otherwise.
-
getCertificateMinQcEuLimitValueConstraint
public IntValueConstraint getCertificateMinQcEuLimitValueConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Indicates the minimal allowed QcEuLimitValue transaction limit for which the end user certificate used for the signature can be used.- Specified by:
getCertificateMinQcEuLimitValueConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
IntValueConstraint
if MinQcTransactionLimit for a given context element is present in the constraint file, null otherwise.
-
getCertificateMinQcEuRetentionPeriodConstraint
public IntValueConstraint getCertificateMinQcEuRetentionPeriodConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Indicates the minimal allowed QC retention period for material information relevant to the use of the end user certificate used for the signature.- Specified by:
getCertificateMinQcEuRetentionPeriodConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
IntValueConstraint
if MinQcRetentionPeriod for a given context element is present in the constraint file, null otherwise.
-
getCertificateQcSSCDConstraint
Description copied from interface:ValidationPolicy
Indicates if the end user certificate used in validating the signature is mandated to be supported by a secure signature creation device (QSCD).- Specified by:
getCertificateQcSSCDConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if QcSSCD for a given context element is present in the constraint file, null otherwise.
-
getCertificateQcEuPDSLocationConstraint
public MultiValuesConstraint getCertificateQcEuPDSLocationConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Indicates the location or set of locations of PKI Disclosure Statements.- Specified by:
getCertificateQcEuPDSLocationConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
MultiValuesConstraint
the the location or set of locations of PKI Disclosure Statements
-
getCertificateQcTypeConstraint
Description copied from interface:ValidationPolicy
Indicates the certificate is claimed as a certificate of a particular type.- Specified by:
getCertificateQcTypeConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
MultiValuesConstraint
the types that the certificate is claimed to be of
-
getCertificateQcCCLegislationConstraint
public MultiValuesConstraint getCertificateQcCCLegislationConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Indicates the country or set of countries under the legislation of which the certificate is issued as a qualified certificate is present. NOTE: in order to verify the EU compliance, the value shall be empty (no QcCCLegislation is allowed)- Specified by:
getCertificateQcCCLegislationConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
MultiValuesConstraint
the country or set of countries under the legislation of which the certificate is issued as a qualified certificate
-
getCertificateIssuedToNaturalPersonConstraint
public LevelConstraint getCertificateIssuedToNaturalPersonConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Indicates if the end user certificate used in validating the signature is issued to a natural person.- Specified by:
getCertificateIssuedToNaturalPersonConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if IssuedToNaturalPerson for a given context element is present in the constraint file, null otherwise.
-
getCertificateIssuedToLegalPersonConstraint
public LevelConstraint getCertificateIssuedToLegalPersonConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Indicates if the end user certificate used in validating the signature is issued to a legal person.- Specified by:
getCertificateIssuedToLegalPersonConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if IssuedToLegalPerson for a given context element is present in the constraint file, null otherwise.
-
getCertificateSemanticsIdentifierConstraint
public MultiValuesConstraint getCertificateSemanticsIdentifierConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Indicates the certificate's QCStatement contains an acceptable semantics identifier.- Specified by:
getCertificateSemanticsIdentifierConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
LevelConstraint
if SemanticsIdentifier for a given context element is present in the constraint file, null otherwise.
-
getCertificatePS2DQcTypeRolesOfPSPConstraint
public MultiValuesConstraint getCertificatePS2DQcTypeRolesOfPSPConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Indicates the acceptable QC PS2D roles for the certificate used for a signature.- Specified by:
getCertificatePS2DQcTypeRolesOfPSPConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
MultiValuesConstraint
the set of acceptable QC PS2D roles
-
getCertificatePS2DQcCompetentAuthorityNameConstraint
public MultiValuesConstraint getCertificatePS2DQcCompetentAuthorityNameConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Indicates the acceptable QC PS2D names for the certificate used for a signature.- Specified by:
getCertificatePS2DQcCompetentAuthorityNameConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
MultiValuesConstraint
the set of acceptable QC PS2D names
-
getCertificatePS2DQcCompetentAuthorityIdConstraint
public MultiValuesConstraint getCertificatePS2DQcCompetentAuthorityIdConstraint(Context context, SubContext subContext) Description copied from interface:ValidationPolicy
Indicates the acceptable QC PS2D ids for the certificate used for a signature.- Specified by:
getCertificatePS2DQcCompetentAuthorityIdConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
subContext
-SubContext
- Returns:
MultiValuesConstraint
the set of acceptable QC PS2D ids
-
getSigningCertificateRecognitionConstraint
Description copied from interface:ValidationPolicy
Indicates if signing-certificate has been identified.- Specified by:
getSigningCertificateRecognitionConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if Recognition for a given context element is present in the constraint file, null otherwise.
-
getSigningCertificateAttributePresentConstraint
Description copied from interface:ValidationPolicy
Indicates if the signing certificate attribute is present- Specified by:
getSigningCertificateAttributePresentConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if SigningCertificateAttribute for a given context element is present in the constraint file, null otherwise.
-
getUnicitySigningCertificateAttributeConstraint
Description copied from interface:ValidationPolicy
Indicates if the signing certificate is not ambiguously determines- Specified by:
getUnicitySigningCertificateAttributeConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if UnicitySigningCertificate for a given context element is present in the constraint file, null otherwise.
-
getSigningCertificateDigestValuePresentConstraint
Description copied from interface:ValidationPolicy
Indicates if the signing certificate reference's digest value is present- Specified by:
getSigningCertificateDigestValuePresentConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if DigestValuePresent for a given context element is present in the constraint file, null otherwise.
-
getSigningCertificateDigestValueMatchConstraint
Description copied from interface:ValidationPolicy
Indicates if the signing certificate reference's digest value matches- Specified by:
getSigningCertificateDigestValueMatchConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if DigestValueMatch for a given context element is present in the constraint file, null otherwise.
-
getSigningCertificateIssuerSerialMatchConstraint
Description copied from interface:ValidationPolicy
Indicates if the signing certificate reference's issuer serial matches- Specified by:
getSigningCertificateIssuerSerialMatchConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if IssuerSerialMatch for a given context element is present in the constraint file, null otherwise.
-
getKeyIdentifierPresent
Description copied from interface:ValidationPolicy
Indicates if the 'kid' (key identifier) header parameter is present within the protected header of the signature- Specified by:
getKeyIdentifierPresent
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if KeyIdentifierPresent for a given context element is present in the constraint file, null otherwise.
-
getKeyIdentifierMatch
Description copied from interface:ValidationPolicy
Indicates if the value of 'kid' (key identifier) header parameter matches the signing-certificate used to create the signature- Specified by:
getKeyIdentifierMatch
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if KeyIdentifierMatch for a given context element is present in the constraint file, null otherwise.
-
getReferenceDataExistenceConstraint
Description copied from interface:ValidationPolicy
Indicates if the referenced data is found- Specified by:
getReferenceDataExistenceConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if ReferenceDataExistence for a given context element is present in the constraint file, null otherwise.
-
getReferenceDataIntactConstraint
Description copied from interface:ValidationPolicy
Indicates if the referenced data is intact- Specified by:
getReferenceDataIntactConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if ReferenceDataIntact for a given context element is present in the constraint file, null otherwise.
-
getManifestEntryObjectExistenceConstraint
Description copied from interface:ValidationPolicy
Indicates if the manifested document is found- Specified by:
getManifestEntryObjectExistenceConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if ManifestEntryObjectExistence for a given context element is present in the constraint file, null otherwise.
-
getSignatureIntactConstraint
Description copied from interface:ValidationPolicy
Indicates if the signature is intact- Specified by:
getSignatureIntactConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
SignatureDataIntact
if SignatureIntact for a given context element is present in the constraint file, null otherwise.
-
getSignatureDuplicatedConstraint
Description copied from interface:ValidationPolicy
Indicates if the signature is not ambiguous- Specified by:
getSignatureDuplicatedConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
SignatureDuplicated
if SignatureDuplicated for a given context element is present in the constraint file, null otherwise.
-
getBestSignatureTimeBeforeExpirationDateOfSigningCertificateConstraint
Description copied from interface:ValidationPolicy
This constraint checks if the certificate is not expired on best-signature-time- Specified by:
getBestSignatureTimeBeforeExpirationDateOfSigningCertificateConstraint
in interfaceValidationPolicy
- Returns:
LevelConstraint
if BestSignatureTimeBeforeExpirationDateOfSigningCertificate element is present in the constraint file, null otherwise.
-
getRevocationTimeAgainstBestSignatureTimeConstraint
Description copied from interface:ValidationPolicy
Returns RevocationTimeAgainstBestSignatureTime constraint if present in the policy, null otherwise- Specified by:
getRevocationTimeAgainstBestSignatureTimeConstraint
in interfaceValidationPolicy
- Returns:
LevelConstraint
if RevocationTimeAgainstBestSignatureTime element is present in the constraint file, null otherwise.
-
getTimestampCoherenceConstraint
Description copied from interface:ValidationPolicy
This constraint checks if the timestamp order is coherent- Specified by:
getTimestampCoherenceConstraint
in interfaceValidationPolicy
- Returns:
LevelConstraint
if TimestampCoherence element is present in the constraint file, null otherwise.
-
getTimestampDelayConstraint
Description copied from interface:ValidationPolicy
Returns TimestampDelay constraint if present in the policy, null otherwise- Specified by:
getTimestampDelayConstraint
in interfaceValidationPolicy
- Returns:
TimeConstraint
if TimestampDelay element is present in the constraint file, null otherwise.
-
getTimestampTSAGeneralNamePresent
Description copied from interface:ValidationPolicy
Indicates if the timestamp's TSTInfo.tsa field is present- Specified by:
getTimestampTSAGeneralNamePresent
in interfaceValidationPolicy
- Returns:
LevelConstraint
if TSAGeneralNamePresent for a given context element is present in the constraint file, null otherwise.
-
getTimestampTSAGeneralNameContentMatch
Description copied from interface:ValidationPolicy
Indicates if the timestamp's TSTInfo.tsa field's value matches the timestamp's issuer distinguishing name when present- Specified by:
getTimestampTSAGeneralNameContentMatch
in interfaceValidationPolicy
- Returns:
LevelConstraint
if TSAGeneralNameContentMatch for a given context element is present in the constraint file, null otherwise.
-
getTimestampTSAGeneralNameOrderMatch
Description copied from interface:ValidationPolicy
Indicates if the timestamp's TSTInfo.tsa field's value and order match the timestamp's issuer distinguishing name when present- Specified by:
getTimestampTSAGeneralNameOrderMatch
in interfaceValidationPolicy
- Returns:
LevelConstraint
if TSAGeneralNameOrderMatch for a given context element is present in the constraint file, null otherwise.
-
getFullScopeConstraint
Description copied from interface:ValidationPolicy
Returns FullScope constraint if present in the policy, null otherwise- Specified by:
getFullScopeConstraint
in interfaceValidationPolicy
- Returns:
LevelConstraint
if FullScope element is present in the constraint file, null otherwise.
-
getContentTimestampConstraint
Description copied from interface:ValidationPolicy
Indicates if the signed property: content-time-stamp should be checked. If ContentTimeStamp element is absent within the constraint file then null is returned.- Specified by:
getContentTimestampConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if ContentTimeStamp element is present in the constraint file, null otherwise.
-
getContentTimestampMessageImprintConstraint
Description copied from interface:ValidationPolicy
Indicates if the signed property: content-time-stamp message-imprint should be checked. If ContentTimeStampMessageImprint element is absent within the constraint file then null is returned.- Specified by:
getContentTimestampMessageImprintConstraint
in interfaceValidationPolicy
- Parameters:
context
-Context
- Returns:
LevelConstraint
if ContentTimeStampMessageImprint element is present in the constraint file, null otherwise.
-
getAcceptedContainerTypesConstraint
Description copied from interface:ValidationPolicy
Returns AcceptedContainerTypes constraint if present in the policy, null otherwise- Specified by:
getAcceptedContainerTypesConstraint
in interfaceValidationPolicy
- Returns:
MultiValuesConstraint
if AcceptedContainerTypes element is present in the constraint file, null otherwise.
-
getZipCommentPresentConstraint
Description copied from interface:ValidationPolicy
Returns ZipCommentPresent constraint if present in the policy, null otherwise- Specified by:
getZipCommentPresentConstraint
in interfaceValidationPolicy
- Returns:
LevelConstraint
if ZipCommentPresent element is present in the constraint file, null otherwise.
-
getAcceptedZipCommentsConstraint
Description copied from interface:ValidationPolicy
Returns AcceptedZipComments constraint if present in the policy, null otherwise- Specified by:
getAcceptedZipCommentsConstraint
in interfaceValidationPolicy
- Returns:
MultiValuesConstraint
if AcceptedZipComments element is present in the constraint file, null otherwise.
-
getMimeTypeFilePresentConstraint
Description copied from interface:ValidationPolicy
Returns MimeTypeFilePresent constraint if present in the policy, null otherwise- Specified by:
getMimeTypeFilePresentConstraint
in interfaceValidationPolicy
- Returns:
LevelConstraint
if MimeTypeFilePresent element is present in the constraint file, null otherwise.
-
getAcceptedMimeTypeContentsConstraint
Description copied from interface:ValidationPolicy
Returns AcceptedMimeTypeContents constraint if present in the policy, null otherwise- Specified by:
getAcceptedMimeTypeContentsConstraint
in interfaceValidationPolicy
- Returns:
MultiValuesConstraint
if AcceptedMimeTypeContents element is present in the constraint file, null otherwise.
-
getAllFilesSignedConstraint
Description copied from interface:ValidationPolicy
Returns AllFilesSigned constraint if present in the policy, null otherwise- Specified by:
getAllFilesSignedConstraint
in interfaceValidationPolicy
- Returns:
LevelConstraint
if AllFilesSigned element is present in the constraint file, null otherwise.
-
getManifestFilePresentConstraint
Description copied from interface:ValidationPolicy
Returns ManifestFilePresent constraint if present in the policy, null otherwise- Specified by:
getManifestFilePresentConstraint
in interfaceValidationPolicy
- Returns:
LevelConstraint
if ManifestFilePresent element is present in the constraint file, null otherwise.
-
getSignedFilesPresentConstraint
Description copied from interface:ValidationPolicy
Returns SignedFilesPresent constraint if present in the policy, null otherwise- Specified by:
getSignedFilesPresentConstraint
in interfaceValidationPolicy
- Returns:
LevelConstraint
if SignedFilesPresent element is present in the constraint file, null otherwise.
-
getAcceptablePDFAProfilesConstraint
Description copied from interface:ValidationPolicy
Returns AcceptablePDFAProfiles constraint if present in the policy, null otherwise- Specified by:
getAcceptablePDFAProfilesConstraint
in interfaceValidationPolicy
- Returns:
LevelConstraint
if AcceptablePDFAProfiles element is present in the constraint file, null otherwise.
-
getPDFACompliantConstraint
Description copied from interface:ValidationPolicy
Returns PDFACompliant constraint if present in the policy, null otherwise- Specified by:
getPDFACompliantConstraint
in interfaceValidationPolicy
- Returns:
LevelConstraint
if PDFACompliant element is present in the constraint file, null otherwise.
-
isEIDASConstraintPresent
public boolean isEIDASConstraintPresent()Description copied from interface:ValidationPolicy
Returns if EIDAS constraints present (qualification check shall be performed)- Specified by:
isEIDASConstraintPresent
in interfaceValidationPolicy
- Returns:
- TRUE if EIDAS constraint present, FALSE otherwise
-
getTLFreshnessConstraint
Description copied from interface:ValidationPolicy
Returns TLFreshness constraint if present in the policy, null otherwise- Specified by:
getTLFreshnessConstraint
in interfaceValidationPolicy
- Returns:
TimeConstraint
if TLFreshness element is present in the constraint file, null otherwise.
-
getTLWellSignedConstraint
Description copied from interface:ValidationPolicy
Returns TLWellSigned constraint if present in the policy, null otherwise- Specified by:
getTLWellSignedConstraint
in interfaceValidationPolicy
- Returns:
TimeConstraint
if TLWellSigned element is present in the constraint file, null otherwise.
-
getTLNotExpiredConstraint
Description copied from interface:ValidationPolicy
Returns TLNotExpired constraint if present in the policy, null otherwise- Specified by:
getTLNotExpiredConstraint
in interfaceValidationPolicy
- Returns:
TimeConstraint
if TLNotExpired element is present in the constraint file, null otherwise.
-
getTLVersionConstraint
Description copied from interface:ValidationPolicy
Returns TLVersion constraint if present in the policy, null otherwise- Specified by:
getTLVersionConstraint
in interfaceValidationPolicy
- Returns:
ValueConstraint
if TLVersion element is present in the constraint file, null otherwise.
-
getValidationModel
Description copied from interface:ValidationPolicy
Returns the used validation model (default is SHELL). Alternatives are CHAIN and HYBRID- Specified by:
getValidationModel
in interfaceValidationPolicy
- Returns:
- the validation model to be used
-
getContainerConstraints
Description copied from interface:ValidationPolicy
Returns the constraint used for ASiC Container validation- Specified by:
getContainerConstraints
in interfaceValidationPolicy
- Returns:
ContainerConstraints
-
getPDFAConstraints
Description copied from interface:ValidationPolicy
Returns the constraint used for ASiC Container validation- Specified by:
getPDFAConstraints
in interfaceValidationPolicy
- Returns:
ContainerConstraints
-
getSignatureConstraints
Description copied from interface:ValidationPolicy
Returns the constraint used for Signature validation- Specified by:
getSignatureConstraints
in interfaceValidationPolicy
- Returns:
SignatureConstraints
-
getCounterSignatureConstraints
Description copied from interface:ValidationPolicy
Returns the constraint used for Counter Signature validation- Specified by:
getCounterSignatureConstraints
in interfaceValidationPolicy
- Returns:
SignatureConstraints
-
getTimestampConstraints
Description copied from interface:ValidationPolicy
Returns the constraint used for Timestamp validation- Specified by:
getTimestampConstraints
in interfaceValidationPolicy
- Returns:
TimestampConstraints
-
getRevocationConstraints
Description copied from interface:ValidationPolicy
Returns the constraint used for Revocation validation- Specified by:
getRevocationConstraints
in interfaceValidationPolicy
- Returns:
RevocationConstraints
-
getEIDASConstraints
Description copied from interface:ValidationPolicy
Returns the constraint used for qualification validation- Specified by:
getEIDASConstraints
in interfaceValidationPolicy
- Returns:
EIDAS
-
getCryptographic
Description copied from interface:ValidationPolicy
Returns the common constraint used for cryptographic validation- Specified by:
getCryptographic
in interfaceValidationPolicy
- Returns:
CryptographicConstraint
-