Package hudson.plugins.ec2
Class EC2PrivateKey
java.lang.Object
hudson.plugins.ec2.EC2PrivateKey
RSA private key (the one that you generate with ec2-add-keypair.)
Starts with "----- BEGIN RSA PRIVATE KEY------\n".
- Author:
- Kohsuke Kawaguchi
-
Method Summary
Modifier and TypeMethodDescriptiondecryptWindowsPassword
(String encodedPassword) boolean
static EC2PrivateKey
static EC2PrivateKey
fetchFromDisk
(String filepath) find
(software.amazon.awssdk.services.ec2.Ec2Client ec2) Finds theKeyPairInfo
that corresponds to this key in EC2.Obtains the fingerprint of the key in the "ab:cd:ef:...:12" format.int
hashCode()
boolean
Is this file really a private key?toString()
-
Method Details
-
getPrivateKey
-
getPrivateKeySecret
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public Secret getPrivateKeySecret() -
getFingerprint
Obtains the fingerprint of the key in the "ab:cd:ef:...:12" format.- Throws:
IOException
- if the underlying private key is invalid: empty or password protected (password protected private keys are not yet supported)
-
getPublicFingerprint
- Throws:
IOException
-
isPrivateKey
Is this file really a private key?- Throws:
IOException
-
find
public KeyPair find(software.amazon.awssdk.services.ec2.Ec2Client ec2) throws IOException, software.amazon.awssdk.core.exception.SdkException Finds theKeyPairInfo
that corresponds to this key in EC2.- Throws:
IOException
software.amazon.awssdk.core.exception.SdkException
-
decryptWindowsPassword
public String decryptWindowsPassword(String encodedPassword) throws software.amazon.awssdk.core.exception.SdkException - Throws:
software.amazon.awssdk.core.exception.SdkException
-
fetchFromDisk
-
fetchFromDisk
-
hashCode
public int hashCode() -
equals
-
toString
-