Class AutoSelfSignedKeyManager

java.lang.Object
javax.net.ssl.X509ExtendedKeyManager
net.dona.doip.util.tls.AutoSelfSignedKeyManager
All Implemented Interfaces:
KeyManager, X509KeyManager

public class AutoSelfSignedKeyManager extends X509ExtendedKeyManager
This object is used to provide a private key for authentication to the other side of a secure socket connection.
  • Constructor Details

    • AutoSelfSignedKeyManager

      public AutoSelfSignedKeyManager(String id, X509Certificate[] chain, PrivateKey privKey)
      Constructs a key manager corresponding to the supplied certificate chain and private key.
      Parameters:
      id - the identifier of the entity
      chain - the certificate chain of the entity
      privKey - the private key of the entity
    • AutoSelfSignedKeyManager

      public AutoSelfSignedKeyManager(String id, X509Certificate cert, PrivateKey privKey)
      Constructs a key manager corresponding to the supplied certificate and private key.
      Parameters:
      id - the identifier of the entity
      cert - the certificate of the entity
      privKey - the private key of the entity
    • AutoSelfSignedKeyManager

      public AutoSelfSignedKeyManager(String id, PublicKey pubKey, PrivateKey privKey)
      Constructs a key manager corresponding the the supplied keypair. A self-signed certificate will be generated with the appropriate id.
      Parameters:
      id - the identifier of the entity
      pubKey - the public key of the entity
      privKey - the private key of the entity
    • AutoSelfSignedKeyManager

      public AutoSelfSignedKeyManager(String id) throws Exception
      Constructs a key manager for the supplied identity with a newly minted keypair.
      Parameters:
      id - the identifier of the entity
      Throws:
      Exception - if there is any issue minting a keypair
  • Method Details