Skip to content

Commit

Permalink
Merge pull request #16 from felfert/fix
Browse files Browse the repository at this point in the history
Fixes [JENKINS-26943]
  • Loading branch information
stephenc committed Oct 12, 2015
2 parents 3e1dd5c + 67d7bb0 commit c7cbe9a
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 c7cbe9a

Please sign in to comment.