Class OpenSshCertificate.CertificateOption

java.lang.Object
org.apache.sshd.common.config.keys.OpenSshCertificate.CertificateOption
Enclosing interface:
OpenSshCertificate

public static class OpenSshCertificate.CertificateOption extends Object
Certificate Options are a set of bytes that is
 [overall length][name(string)][[length of buffer][[length of string][data(string)]]]...
 

Where each Certificate Option is encoded as a name (string) and data (string packed in a buffer). The entire name (string) + data (buffer) are added as bytes (which will get a length prefix).

See Also:
  • Field Details

    • name

      private final String name
    • data

      private final String data
  • Constructor Details

    • CertificateOption

      public CertificateOption(String name, String data)
      Creates a new OpenSshCertificate.CertificateOption with the given name and data.
      Parameters:
      name - of the option; must be neither null nor empty
      data - for the option; may be null or empty
    • CertificateOption

      public CertificateOption(String name)
      Creates a new OpenSshCertificate.CertificateOption with a name without data.
      Parameters:
      name - of the option; must be neither null nor empty
  • Method Details

    • getName

      public final String getName()
      Retrieves the name.
      Returns:
      the name, never null
    • getData

      public final String getData()
      Retrieves the data.
      Returns:
      the data, may benull or empty
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object