Package jenkins.security
Class RSAConfidentialKey
java.lang.Object
jenkins.security.ConfidentialKey
jenkins.security.RSAConfidentialKey
- Direct Known Subclasses:
RSADigitalSignatureConfidentialKey
RSA public/private key pair as
ConfidentialKey
.
As per the design principle of ConfidentialKey
, not exposing PrivateKey
directly.
Define subtypes for different use cases.
- Author:
- Kohsuke Kawaguchi
-
Constructor Summary
ModifierConstructorDescriptionprotected
RSAConfidentialKey
(Class owner, String shortName) protected
-
Method Summary
Modifier and TypeMethodDescriptionGets base64-encoded public key.protected RSAPrivateKey
Obtains the private key (lazily.)Methods inherited from class jenkins.security.ConfidentialKey
getId, load, store
-
Constructor Details
-
RSAConfidentialKey
-
RSAConfidentialKey
-
-
Method Details
-
getPrivateKey
Obtains the private key (lazily.)This method is not publicly exposed as per the design principle of
ConfidentialKey
. Instead of exposing private key, define methods that use them in specific way, such asRSADigitalSignatureConfidentialKey
.- Throws:
Error
- If key cannot be loaded for some reasons, we fail.
-
getPublicKey
-
getEncodedPublicKey
Gets base64-encoded public key.
-