Skip to content

Commit

Permalink
Fixes [JENKINS-26943]
Browse files Browse the repository at this point in the history
  • Loading branch information
felfert committed Oct 10, 2015
1 parent 3e1dd5c commit 67d7bb0
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -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) {
Expand All @@ -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"));
}

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

/**
Expand Down

0 comments on commit 67d7bb0

Please sign in to comment.