Package hudson.plugins.ec2
Class EC2PrivateKey
- java.lang.Object
-
- hudson.plugins.ec2.EC2PrivateKey
-
public class EC2PrivateKey extends Object
RSA private key (the one that you generate with ec2-add-keypair.) Starts with "----- BEGIN RSA PRIVATE KEY------\n".- Author:
- Kohsuke Kawaguchi
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
decryptWindowsPassword(String encodedPassword)
boolean
equals(Object that)
com.amazonaws.services.ec2.model.KeyPair
find(com.amazonaws.services.ec2.AmazonEC2 ec2)
Finds theKeyPairInfo
that corresponds to this key in EC2.String
getFingerprint()
Obtains the fingerprint of the key in the "ab:cd:ef:...:12" format.String
getPrivateKey()
Secret
getPrivateKeySecret()
String
getPublicFingerprint()
int
hashCode()
boolean
isPrivateKey()
Is this file really a private key?String
toString()
-
-
-
Method Detail
-
getPrivateKey
public String getPrivateKey()
-
getPrivateKeySecret
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public Secret getPrivateKeySecret()
-
getFingerprint
public String getFingerprint() throws IOException
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
public String getPublicFingerprint() throws IOException
- Throws:
IOException
-
isPrivateKey
public boolean isPrivateKey() throws IOException
Is this file really a private key?- Throws:
IOException
-
find
public com.amazonaws.services.ec2.model.KeyPair find(com.amazonaws.services.ec2.AmazonEC2 ec2) throws IOException, com.amazonaws.AmazonClientException
Finds theKeyPairInfo
that corresponds to this key in EC2.- Throws:
IOException
com.amazonaws.AmazonClientException
-
decryptWindowsPassword
public String decryptWindowsPassword(String encodedPassword) throws com.amazonaws.AmazonClientException
- Throws:
com.amazonaws.AmazonClientException
-
-