Skip to content
Permalink
Browse files
Merge pull request #16 from felfert/fix
Fixes [JENKINS-26943]
  • Loading branch information
stephenc committed Oct 12, 2015
2 parents 3e1dd5c + 67d7bb0 commit c7cbe9a5c420026f8d118c7371cbaae16da6cade
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/main/java/com/cloudbees/jenkins/plugins/sshcredentials/impl/BasicSSHUserPrivateKey.java
@@ -229,11 +229,11 @@ public static class DirectEntryPrivateKeySource extends PrivateKeySource impleme
*/
private static final long serialVersionUID = 1L;

private final String privateKey;
private final Secret privateKey;

@DataBoundConstructor
public DirectEntryPrivateKeySource(String privateKey) {
this.privateKey = privateKey;
this.privateKey = Secret.fromString(privateKey);
}

public DirectEntryPrivateKeySource(List<String> privateKeys) {
@@ -246,7 +246,7 @@ public DirectEntryPrivateKeySource(List<String> privateKeys) {
@NonNull
@Override
public List<String> getPrivateKeys() {
return Arrays.asList(StringUtils.split(privateKey, "\f"));
return Arrays.asList(StringUtils.split(Secret.toString(privateKey), "\f"));
}

/**
@@ -256,7 +256,7 @@ public List<String> getPrivateKeys() {
*/
@SuppressWarnings("unused") // used by Jelly EL
public String getPrivateKey() {
return privateKey;
return Secret.toString(privateKey);
}

/**

0 comments on commit c7cbe9a

Please sign in to comment.