Skip to content

Commit 3f196ac

Browse files
committed
Merge branch 'initial_migrate'
* initial_migrate: (10 commits) updated README clarified password persistence; code comments fixed password verify; persist=Enterprise - fixed password verification - credential persistance to be Enterprise to enable sync across computers - added linefeed decoding to more pinentry commands get keyid as user from dialog description fixed cache error loops, text formatting - fixed cache loop on error - fixed line feeds on description and error text - fixed button accelerator parsing - changed back to 6 param Prompt...Cred() to prevent user format validation ...
2 parents 67e7525 + e4648a1 commit 3f196ac

3 files changed

Lines changed: 474 additions & 1 deletion

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ bld/
2626

2727
# Visual Studio 2015 cache/options directory
2828
.vs/
29+
.vscode/
2930
# Uncomment if you have tasks that create the project's static files in wwwroot
3031
#wwwroot/
3132

README.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,41 @@
11
# pinentry-wsl-ps1
2-
pinentry GUI for Windows WSL (useful for GPG)
2+
3+
GUI for GPG within Windows WSL for passwords, pins, etc.
4+
Optional persistence of passwords into Windows Credential Manager
5+
6+
(c) 2018 Dale Phurrough
7+
Licensed under the Mozilla Public License 2.0
8+
9+
## Features
10+
11+
* Allows GnuPG to prompt and read passphrases by the pinentry protocol
12+
with a GUI when running within WSL (Windows Subsystem for Linux)
13+
* Works for all keys managed by gpg-agent (GPG, SSH, etc)
14+
* Drop-in replacement GUI to pinentry-curses, pinentry-gtk-2, etc.
15+
16+
## Setup
17+
18+
1. Save the `pinentry-wsl-ps1.sh` script and set its permissions to be executable
19+
2. Configure gpg-agent to use this script for pinentry using
20+
one of the following methods
21+
* Set pinentry-program within ~/.gnupg/gpg-agent.conf to the script's path, e.g.
22+
`pinentry-program /mnt/c/repos/pinentry-wsl-ps1/pinentry-wsl-ps1.sh`
23+
* ... or, set the path to this script when you launch gpg-agent, e.g.
24+
`gpg-agent --pinentry-program /mnt/c/repos/pinentry-wsl-ps1/pinentry-wsl-ps1.sh`
25+
3. Optionally enable persistence of passwords.
26+
1. Follow instructions https://github.com/davotronic5000/PowerShell_Credential_Manager
27+
to install the needed module from the Powershell Gallery or GitHub.
28+
2. Note security perspectives like https://security.stackexchange.com/questions/119765/how-secure-is-the-windows-credential-manager
29+
3. Edit the script and set `PERSISTENCE` to one of the values:
30+
* `""` no persistence
31+
* `"Session"` persists the password only for the current Windows login session
32+
* `"LocalMachine"` persists the password for the current Windows login on the local Windows computer
33+
* `"Enterprise"` persists the password for the current Windows login and requests Windows Credential Manager to synchronize it across Windows computers for that same Windows login
34+
35+
## References
36+
37+
* https://www.gnupg.org/software/pinentry/index.html
38+
* https://www.gnupg.org/documentation/manuals/gnupg/Agent-Options.html
39+
* https://github.com/GPGTools/pinentry/blob/master/doc/pinentry.texi
40+
* https://gist.github.com/mdeguzis/05d1f284f931223624834788da045c65
41+
* https://github.com/GPGTools/pinentry/blob/master/pinentry/pinentry.c

0 commit comments

Comments
 (0)