-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
-
v1.0.15
if credentials private key is incorrect then readObject() returns null and further code fails with error java.lang.Exception: Instance creation fails because: null
/oracle-cloud-infrastructure-compute-plugin/src/main/java/com/oracle/cloud/baremetal/jenkins/SshKeyUtil.java
public static String getPublicKey(String privateSshKey, String privateSshKeyPassphrase) throws IOException, NotImplementedException {
...
Object keyObj = new PEMParser(new StringReader(privateSshKey)).readObject(); <<<<< keyObj is null if privateSshKey is invalid key
...
PEMEncryptedKeyPair encKeyPair = (PEMEncryptedKeyPair) keyObj;
...
keyPair = encKeyPair.decryptKeyPair(decryptionProv);