Skip to content

Commit

Permalink
Changed to password prompt for private key passphrase.
Browse files Browse the repository at this point in the history
  • Loading branch information
dkocher committed Nov 8, 2017
1 parent fd77643 commit 6a15da9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Expand Up @@ -79,7 +79,8 @@ public char[] reqPassword(Resource<?> resource) {
String password = keychain.find(bookmark);
if(StringUtils.isEmpty(password)) {
try {
password = prompt.prompt(bookmark, credentials.getUsername(),
// Use password prompt
password = prompt.prompt(bookmark,
LocaleFactory.localizedString("Private key password protected", "Credentials"),
String.format("%s (%s)",
LocaleFactory.localizedString("Enter the passphrase for the private key file", "Credentials"),
Expand Down
Expand Up @@ -99,12 +99,13 @@ public char[] reqPassword(Resource<?> resource) {
final String password = keychain.find(bookmark);
if(StringUtils.isEmpty(password)) {
try {
return prompt.prompt(bookmark, credentials.getUsername(),
// Use password prompt
return prompt.prompt(bookmark,
LocaleFactory.localizedString("Private key password protected", "Credentials"),
String.format("%s (%s)",
LocaleFactory.localizedString("Enter the passphrase for the private key file", "Credentials"),
identity.getAbbreviatedPath()), new LoginOptions(bookmark.getProtocol())
.user(false).password(true)
.user(false).password(true).publickey(false)
).getPassword().toCharArray();
}
catch(LoginCanceledException e) {
Expand Down

0 comments on commit 6a15da9

Please sign in to comment.