Class AlgorithmRequirements

java.lang.Object
org.xbill.DNS.dnssec.AlgorithmRequirements

class AlgorithmRequirements extends Object
Storage for DNSKEY algorithm requirements.
  • Field Details

    • MAX_ALGORITHMS

      private static final int MAX_ALGORITHMS
      See Also:
    • valUtils

      private final ValUtils valUtils
    • needs

      private final short[] needs
      the algorithms (8-bit) with each a number.

      0: not marked.
      1: marked 'necessary but not yet fulfilled'
      2: marked bogus.

      Indexed by algorithm number.

    • num

      private int num
      The number of entries in needs that are unfulfilled
  • Constructor Details

    • AlgorithmRequirements

      public AlgorithmRequirements(ValUtils valUtils)
  • Method Details

    • initList

      void initList(List<Integer> sigalg)
      Initialize this instance from a signalled algo list.
      Parameters:
      sigalg - signalled algorithm list.
    • initDs

      List<Integer> initDs(RRset dsRRset, int favoriteDsAlgorithm)
      Initialize algo needs structure, set algos from rrset as needed.
      Parameters:
      dsRRset - algorithms from this RRset are necessary.
      favoriteDsAlgorithm - filter to use only this DS algo.
      Returns:
      List of signalled algorithms.
    • setSecure

      boolean setSecure(int algo)
      Mark this algorithm as a success (SecurityStatus.SECURE), and see if we are done.
      Parameters:
      algo - : the algorithm processed to be secure.
      Returns:
      if true, processing has finished successfully, we are satisfied.
    • setBogus

      void setBogus(int algo)
      Mark this algorithm a failure (SecurityStatus.BOGUS). It can later be overridden by a success for this algorithm (with a different signature).
      Parameters:
      algo - the algorithm processed to be bogus.
    • missing

      int missing()
      See how many algorithms are missing (not bogus or secure, but not processed)
      Returns:
      number of algorithms missing after processing.