Class SshX509DsaPublicKey

java.lang.Object
com.sshtools.common.ssh.components.jce.Ssh2DsaPublicKey
com.sshtools.common.ssh.x509.SshX509DsaPublicKey
All Implemented Interfaces:
com.sshtools.common.ssh.components.Component, com.sshtools.common.ssh.components.SshDsaPublicKey, com.sshtools.common.ssh.components.SshPublicKey, com.sshtools.common.ssh.components.SshX509PublicKey, com.sshtools.common.ssh.SecureComponent

public class SshX509DsaPublicKey extends com.sshtools.common.ssh.components.jce.Ssh2DsaPublicKey implements com.sshtools.common.ssh.components.SshX509PublicKey
Basic implementation of X509 certificate support.
Author:
not attributable
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     

    Nested classes/interfaces inherited from class com.sshtools.common.ssh.components.jce.Ssh2DsaPublicKey

    com.sshtools.common.ssh.components.jce.Ssh2DsaPublicKey.Ssh2DsaPublicKeyFactory
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     

    Fields inherited from class com.sshtools.common.ssh.components.jce.Ssh2DsaPublicKey

    pubkey
  • Constructor Summary

    Constructors
    Constructor
    Description
     
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the algorithm name for the public key.
     
     
    byte[]
    Encode the public key into a blob of binary data, the encoded result will be passed into init to recreate the key.
     
    void
    init(byte[] blob, int start, int len)
    Initialize the public key from a blob of binary data.

    Methods inherited from class com.sshtools.common.ssh.components.jce.Ssh2DsaPublicKey

    equals, getBitLength, getEncodingAlgorithm, getFingerprint, getG, getJCEPublicKey, getP, getPriority, getQ, getSecurityLevel, getY, hashCode, test, verifySignature

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.sshtools.common.ssh.components.SshPublicKey

    isCertificate
  • Field Details

  • Constructor Details

    • SshX509DsaPublicKey

      public SshX509DsaPublicKey()
    • SshX509DsaPublicKey

      public SshX509DsaPublicKey(Certificate cert)
  • Method Details

    • getAlgorithm

      public String getAlgorithm()
      Get the algorithm name for the public key.
      Specified by:
      getAlgorithm in interface com.sshtools.common.ssh.SecureComponent
      Specified by:
      getAlgorithm in interface com.sshtools.common.ssh.components.SshPublicKey
      Overrides:
      getAlgorithm in class com.sshtools.common.ssh.components.jce.Ssh2DsaPublicKey
      Returns:
      the algorithm name, for example "ssh-dss"
    • getSigningAlgorithm

      public String getSigningAlgorithm()
      Specified by:
      getSigningAlgorithm in interface com.sshtools.common.ssh.components.SshPublicKey
      Overrides:
      getSigningAlgorithm in class com.sshtools.common.ssh.components.jce.Ssh2DsaPublicKey
    • getEncoded

      public byte[] getEncoded() throws com.sshtools.common.ssh.SshException
      Encode the public key into a blob of binary data, the encoded result will be passed into init to recreate the key.
      Specified by:
      getEncoded in interface com.sshtools.common.ssh.components.SshPublicKey
      Overrides:
      getEncoded in class com.sshtools.common.ssh.components.jce.Ssh2DsaPublicKey
      Returns:
      an encoded byte array
      Throws:
      com.sshtools.common.ssh.SshException
    • init

      public void init(byte[] blob, int start, int len) throws com.sshtools.common.ssh.SshException
      Initialize the public key from a blob of binary data.
      Specified by:
      init in interface com.sshtools.common.ssh.components.SshPublicKey
      Overrides:
      init in class com.sshtools.common.ssh.components.jce.Ssh2DsaPublicKey
      Parameters:
      blob - byte[]
      start - int
      len - int
      Throws:
      com.sshtools.common.ssh.SshException
    • getCertificate

      public Certificate getCertificate()
      Specified by:
      getCertificate in interface com.sshtools.common.ssh.components.SshX509PublicKey
    • getCertificateChain

      public Certificate[] getCertificateChain()
      Specified by:
      getCertificateChain in interface com.sshtools.common.ssh.components.SshX509PublicKey