Class InstanceIdentityProvider.KeyTypes<PUB extends PublicKey,PRIV extends PrivateKey>

java.lang.Object
jenkins.model.identity.InstanceIdentityProvider.KeyTypes<PUB,PRIV>
Type Parameters:
PUB - the type of public key.
PRIV - the type of private key.
Enclosing class:
InstanceIdentityProvider<PUB extends PublicKey,PRIV extends PrivateKey>

@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static final class InstanceIdentityProvider.KeyTypes<PUB extends PublicKey,PRIV extends PrivateKey> extends Object
Holds information about the paired keytypes that can be used to form the various identity keys.
  • Method Details

    • getPublicKeyClass

      public Class<PUB> getPublicKeyClass()
      Gets the interface for the public key.
      Returns:
      the interface for the public key.
    • getPrivateKeyClass

      public Class<PRIV> getPrivateKeyClass()
      Gets the interface for the private key.
      Returns:
      the interface for the private key.
    • getKeyPair

      @CheckForNull public KeyPair getKeyPair()
      Gets the KeyPair that comprises the instance identity.
      Returns:
      the KeyPair that comprises the instance identity. null could technically be returned in the event that a keypair could not be generated, for example if the specific key type of this provider is not permitted at the required length by the JCA policy.
    • getPublicKey

      @CheckForNull public PUB getPublicKey()
      Shortcut to KeyPair.getPublic().
      Returns:
      the public key. null if getKeyPair() is null.
    • getPrivateKey

      @CheckForNull public PRIV getPrivateKey()
      Returns:
      the private key. null if getKeyPair() is null.
    • getCertificate

      @CheckForNull public X509Certificate getCertificate()
      Gets the self-signed X509Certificate that is associated with this identity. The certificate will must be currently valid. Repeated calls to this method may result in new certificates being generated.
      Returns:
      the certificate. null if getKeyPair() is null.