Class Abstract19322CryptographicSuite

java.lang.Object
eu.europa.esig.dss.model.policy.Abstract19322CryptographicSuite
All Implemented Interfaces:
CryptographicSuite, LevelRule

public abstract class Abstract19322CryptographicSuite extends Object implements CryptographicSuite
This class contains common methods for processing XML and JSON TS 119 322 schemas.
  • Field Details

    • MODULES_LENGTH_PARAMETER

      protected static final String MODULES_LENGTH_PARAMETER
      Key size parameter used by RSA algorithms
      See Also:
    • PLENGTH_PARAMETER

      protected static final String PLENGTH_PARAMETER
      P Length key size parameter used by DSA algorithms (supported)
      See Also:
    • QLENGTH_PARAMETER

      protected static final String QLENGTH_PARAMETER
      Q Length key size parameter used by DSA algorithms (not supported)
      See Also:
  • Constructor Details

    • Abstract19322CryptographicSuite

      protected Abstract19322CryptographicSuite()
      Default constructor
  • Method Details

    • getLevel

      public eu.europa.esig.dss.enumerations.Level getLevel()
      Description copied from interface: LevelRule
      Gets the constraint execution level
      Specified by:
      getLevel in interface LevelRule
      Returns:
      Level
    • setLevel

      public void setLevel(eu.europa.esig.dss.enumerations.Level level)
      Description copied from interface: CryptographicSuite
      Sets the global execution level for the cryptographic suite constraints
      Specified by:
      setLevel in interface CryptographicSuite
      Parameters:
      level - Level
    • getAcceptableDigestAlgorithmsLevel

      public eu.europa.esig.dss.enumerations.Level getAcceptableDigestAlgorithmsLevel()
      Description copied from interface: CryptographicSuite
      Returns a level constraint for AcceptableDigestAlgo constraint if present, the global getLevel otherwise.
      Specified by:
      getAcceptableDigestAlgorithmsLevel in interface CryptographicSuite
      Returns:
      Level
    • setAcceptableDigestAlgorithmsLevel

      public void setAcceptableDigestAlgorithmsLevel(eu.europa.esig.dss.enumerations.Level acceptableDigestAlgorithmsLevel)
      Description copied from interface: CryptographicSuite
      Sets the execution level for the acceptable digest algorithms check
      Specified by:
      setAcceptableDigestAlgorithmsLevel in interface CryptographicSuite
      Parameters:
      acceptableDigestAlgorithmsLevel - Level
    • getAcceptableEncryptionAlgorithmsLevel

      public eu.europa.esig.dss.enumerations.Level getAcceptableEncryptionAlgorithmsLevel()
      Description copied from interface: CryptographicSuite
      Returns a level constraint for AcceptableEncryptionAlgo constraint if present, the global getLevel otherwise.
      Specified by:
      getAcceptableEncryptionAlgorithmsLevel in interface CryptographicSuite
      Returns:
      Level
    • setAcceptableEncryptionAlgorithmsLevel

      public void setAcceptableEncryptionAlgorithmsLevel(eu.europa.esig.dss.enumerations.Level acceptableEncryptionAlgorithmsLevel)
      Description copied from interface: CryptographicSuite
      Sets the execution level for the acceptable encryption algorithms check
      Specified by:
      setAcceptableEncryptionAlgorithmsLevel in interface CryptographicSuite
      Parameters:
      acceptableEncryptionAlgorithmsLevel - Level
    • getAcceptableEncryptionAlgorithmsMiniKeySizeLevel

      public eu.europa.esig.dss.enumerations.Level getAcceptableEncryptionAlgorithmsMiniKeySizeLevel()
      Description copied from interface: CryptographicSuite
      Returns a level constraint for MiniPublicKeySize constraint if present, the global getLevel otherwise.
      Specified by:
      getAcceptableEncryptionAlgorithmsMiniKeySizeLevel in interface CryptographicSuite
      Returns:
      Level
    • setAcceptableEncryptionAlgorithmsMiniKeySizeLevel

      public void setAcceptableEncryptionAlgorithmsMiniKeySizeLevel(eu.europa.esig.dss.enumerations.Level acceptableEncryptionAlgorithmsMiniKeySizeLevel)
      Description copied from interface: CryptographicSuite
      Sets the execution level for the acceptable minimum key sizes of encryption algorithms check
      Specified by:
      setAcceptableEncryptionAlgorithmsMiniKeySizeLevel in interface CryptographicSuite
      Parameters:
      acceptableEncryptionAlgorithmsMiniKeySizeLevel - Level
    • getAlgorithmsExpirationDateLevel

      public eu.europa.esig.dss.enumerations.Level getAlgorithmsExpirationDateLevel()
      Description copied from interface: CryptographicSuite
      Returns a level constraint for AlgoExpirationDate constraint if present, the global getLevel otherwise.
      Specified by:
      getAlgorithmsExpirationDateLevel in interface CryptographicSuite
      Returns:
      Level
    • setAlgorithmsExpirationDateLevel

      public void setAlgorithmsExpirationDateLevel(eu.europa.esig.dss.enumerations.Level algorithmsExpirationDateLevel)
      Description copied from interface: CryptographicSuite
      Sets the execution level for checking algorithms expiration
      Specified by:
      setAlgorithmsExpirationDateLevel in interface CryptographicSuite
      Parameters:
      algorithmsExpirationDateLevel - Level
    • getAlgorithmsExpirationDateAfterUpdateLevel

      public eu.europa.esig.dss.enumerations.Level getAlgorithmsExpirationDateAfterUpdateLevel()
      Description copied from interface: CryptographicSuite
      Returns a level constraint for AlgoExpirationDate constraint if present, the global getLevel otherwise.
      Specified by:
      getAlgorithmsExpirationDateAfterUpdateLevel in interface CryptographicSuite
      Returns:
      Level
    • setAlgorithmsExpirationTimeAfterPolicyUpdateLevel

      public void setAlgorithmsExpirationTimeAfterPolicyUpdateLevel(eu.europa.esig.dss.enumerations.Level algorithmsExpirationTimeAfterPolicyUpdateLevel)
      Description copied from interface: CryptographicSuite
      Sets the execution level for checking algorithms expiration after the validation policy update Default : Level.WARN (warning message is returned in case of expiration of the used cryptographic constraints after the policy update date)
      Specified by:
      setAlgorithmsExpirationTimeAfterPolicyUpdateLevel in interface CryptographicSuite
      Parameters:
      algorithmsExpirationTimeAfterPolicyUpdateLevel - Level
    • getAcceptableDigestAlgorithms

      public List<eu.europa.esig.dss.enumerations.DigestAlgorithm> getAcceptableDigestAlgorithms()
      Description copied from interface: CryptographicSuite
      Gets a list of digest algorithms accepted by the validation policy
      Specified by:
      getAcceptableDigestAlgorithms in interface CryptographicSuite
      Returns:
      a list of DigestAlgorithms
    • getAcceptableEncryptionAlgorithms

      public List<eu.europa.esig.dss.enumerations.EncryptionAlgorithm> getAcceptableEncryptionAlgorithms()
      Description copied from interface: CryptographicSuite
      Gets a list of encryption algorithms accepted by the validation policy
      Specified by:
      getAcceptableEncryptionAlgorithms in interface CryptographicSuite
      Returns:
      a list of EncryptionAlgorithms
    • getAcceptableEncryptionAlgorithmsWithMinKeySizes

      public List<EncryptionAlgorithmWithMinKeySize> getAcceptableEncryptionAlgorithmsWithMinKeySizes()
      Description copied from interface: CryptographicSuite
      Gets a list of encryption algorithms together with their minimum used key sizes accepted by the validation policy
      Specified by:
      getAcceptableEncryptionAlgorithmsWithMinKeySizes in interface CryptographicSuite
      Returns:
      a list of EncryptionAlgorithmWithMinKeySizes
    • getAcceptableDigestAlgorithmsWithExpirationDates

      public Map<eu.europa.esig.dss.enumerations.DigestAlgorithm,Date> getAcceptableDigestAlgorithmsWithExpirationDates()
      Description copied from interface: CryptographicSuite
      Gets a map of supported digest algorithms with the corresponding expiration dates
      Specified by:
      getAcceptableDigestAlgorithmsWithExpirationDates in interface CryptographicSuite
      Returns:
      a map between DigestAlgorithms and expiration Dates
    • getAcceptableEncryptionAlgorithmsWithExpirationDates

      public Map<EncryptionAlgorithmWithMinKeySize,Date> getAcceptableEncryptionAlgorithmsWithExpirationDates()
      Description copied from interface: CryptographicSuite
      Gets a map of supported encryption algorithms with the applicable key sizes with the corresponding expiration dates
      Specified by:
      getAcceptableEncryptionAlgorithmsWithExpirationDates in interface CryptographicSuite
      Returns:
      a map between EncryptionAlgorithmWithMinKeySizes and expiration Dates
    • buildAcceptableDigestAlgorithmsWithExpirationDates

      protected abstract Map<eu.europa.esig.dss.enumerations.DigestAlgorithm,Date> buildAcceptableDigestAlgorithmsWithExpirationDates()
      Builds a list of acceptable digest algorithms with their corresponding expiration times
      Returns:
      a map between DigestAlgorithms and their corresponding expiration Dates
    • buildAcceptableEncryptionAlgorithmsWithExpirationDates

      protected abstract Map<EncryptionAlgorithmWithMinKeySize,Date> buildAcceptableEncryptionAlgorithmsWithExpirationDates()
      Builds a list of acceptable encryption algorithms with their corresponding expiration times relatively the key sizes
      Returns:
      a map between EncryptionAlgorithmWithMinKeySizes and their corresponding expiration Dates