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 X509Certificate
getCertificate()
Gets the self-signedX509Certificate
that is associated with this identity.KeyPair
getKeyPair()
Gets theKeyPair
that comprises the instance identity.PRIV
getPrivateKey()
Shortcut toKeyPair.getPrivate()
.Class<PRIV>
getPrivateKeyClass()
Gets the interface for the private key.PUB
getPublicKey()
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 theKeyPair
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 toKeyPair.getPublic()
.- Returns:
- the public key.
null
ifgetKeyPair()
isnull
.
-
getPrivateKey
@CheckForNull public PRIV getPrivateKey()
Shortcut toKeyPair.getPrivate()
.- Returns:
- the private key.
null
ifgetKeyPair()
isnull
.
-
getCertificate
@CheckForNull public X509Certificate getCertificate()
Gets the self-signedX509Certificate
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
ifgetKeyPair()
isnull
.
-
-