Skip to content
Permalink
Browse files
Fixes [JENKINS-26943]
  • Loading branch information
felfert committed Oct 10, 2015
1 parent 3e1dd5c commit 67d7bb0b0bbae40a808cedbabf558f63988e9127
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 67d7bb0

Please sign in to comment.