Page MenuHomePhabricator

Detect and prompt for passwords on SSH private keys, then strip them
ClosedPublic

Authored by epriestley on Jan 29 2014, 10:53 PM.
Tags
None
Referenced Files
F18808092: D8102.id18350.diff
Sun, Oct 19, 4:48 AM
F18808091: D8102.id18326.diff
Sun, Oct 19, 4:48 AM
F18788558: D8102.id.diff
Wed, Oct 15, 5:25 AM
F18766158: D8102.id.diff
Tue, Oct 7, 3:16 PM
F18763328: D8102.diff
Mon, Oct 6, 11:48 PM
F18763030: D8102.diff
Mon, Oct 6, 10:12 PM
F18630925: D8102.diff
Sep 16 2025, 1:38 PM
F18083576: D8102.id18326.diff
Aug 5 2025, 10:43 AM
Subscribers

Details

Summary

Fixes T4356. Currently, if users add a passworded private key to the Passphrase application, we never ask for the password and can not use it later. This makes several changes:

  • Prompt for the password.
  • Detect passworded private keys, and don't accept them until we can decrypt them.
  • Try to decrypt passworded private keys, and tell the user if the password is missing or incorrect.
  • Stop further creation of path-based private keys, which are really just for compatibility. We can't do anything reasonable about passwords with these, since users can change the files.
Test Plan

Created a private key with a password, was prompted to provide it, tried empty/bad passwords, provided the correct password and had the key decrypted for use.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped