Package jenkins.model.identity
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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description X509CertificategetCertificate()Gets the self-signedX509Certificatethat is associated with this identity.KeyPairgetKeyPair()Gets theKeyPairthat comprises the instance identity.PRIVgetPrivateKey()Shortcut toKeyPair.getPrivate().Class<PRIV>getPrivateKeyClass()Gets the interface for the private key.PUBgetPublicKey()Shortcut toKeyPair.getPublic().Class<PUB>getPublicKeyClass()Gets the interface for the public key.
-
-
-
Method Detail
-
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 theKeyPairthat comprises the instance identity.- Returns:
- the
KeyPairthat comprises the instance identity.nullcould 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 toKeyPair.getPublic().- Returns:
- the public key.
nullifgetKeyPair()isnull.
-
getPrivateKey
@CheckForNull public PRIV getPrivateKey()
Shortcut toKeyPair.getPrivate().- Returns:
- the private key.
nullifgetKeyPair()isnull.
-
getCertificate
@CheckForNull public X509Certificate getCertificate()
Gets the self-signedX509Certificatethat 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.
nullifgetKeyPair()isnull.
-
-