Class ReasonFlags

java.lang.Object
org.mozilla.jss.netscape.security.x509.ReasonFlags

public class ReasonFlags extends Object
Represent the CRL Reason Flags.

This extension, if present, defines the identifies the reason for the certificate revocation.

Version:
1.3
See Also:
  • Field Details

  • Constructor Details

    • ReasonFlags

      public ReasonFlags(byte[] reasons)
      Create a ReasonFlags with the passed bit settings.
      Parameters:
      reasons - the bits to be set for the ReasonFlags.
    • ReasonFlags

      public ReasonFlags(boolean[] reasons)
      Create a ReasonFlags with the passed bit settings.
      Parameters:
      reasons - the bits to be set for the ReasonFlags.
    • ReasonFlags

      public ReasonFlags(BitArray reasons)
      Create a ReasonFlags with the passed bit settings.
      Parameters:
      reasons - the bits to be set for the ReasonFlags.
    • ReasonFlags

      public ReasonFlags(DerInputStream in) throws IOException
      Create the object from the passed DER encoded value.
      Parameters:
      in - the DerInputStream to read the ReasonFlags from.
      Throws:
      IOException - on decoding errors.
    • ReasonFlags

      public ReasonFlags(DerValue derVal) throws IOException
      Create the object from the passed DER encoded value.
      Parameters:
      derVal - the DerValue decoded from the stream.
      Throws:
      IOException - on decoding errors.
  • Method Details

    • isSet

      private boolean isSet(int position)
      Check if bit is set.
      Parameters:
      position - the position in the bit string to check.
    • set

      private void set(int position, boolean val)
      Set the bit at the specified position.
    • set

      public void set(String name, Object obj) throws IOException
      Set the attribute value.
      Throws:
      IOException
    • get

      public Object get(String name) throws IOException
      Get the attribute value.
      Throws:
      IOException
    • delete

      public void delete(String name) throws IOException
      Delete the attribute value.
      Throws:
      IOException
    • toString

      public String toString()
      Returns a printable representation of the ReasonFlags.
      Overrides:
      toString in class Object
    • encode

      public void encode(DerOutputStream out) throws IOException
      Write the extension to the DerOutputStream.
      Parameters:
      out - the DerOutputStream to write the extension to.
      Throws:
      IOException - on encoding errors.
    • getElements

      public Enumeration<String> getElements()
      Return an enumeration of names of attributes existing within this attribute.