-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow options to be passed to the script #4
base: master
Are you sure you want to change the base?
Conversation
This way, options can be set by, say `NOTIFY=0 pinentry-wsl-ps1.sh`; thus the script can be updated without losing once set options.
Nice idea. Thanks for the contribution. with NOTIFY="" pinentry-wsl-ps1.sh
inside script NOTIFY="" with NOTIFY="" pinentry-wsl-ps1.sh
inside script NOTIFY=1 And have you tested step 2 of setup using the An alternative might be to use the env var |
as discussed in diablodale#4 (comment)
Well observed. The last commit adapts the code accordingly.
I have no WSL system at hand, but this is rather a question of documenting the feature. I suppose then that |
I do not think From what I can understand (unless you see otherwise in your testing), it is not possible to set environment variables on the "same line" as this pinentry program in the real-world. This is due to the gpg agent interface between that agent and a pinentry program. It might be possible to set Testing is needed for your proposed code change. Trying your idea in a real-world WSL, Windows, GPG setup to see if it is successful. I like your idea. But I predict problems that testing can surface or prove me wrong 😅 To move forward, you'll need to do the testing I've written about above to explore what works and not. Maybe its your envvar technique, maybe its PINENTRY_USER_DATA, or maybe something else. |
Okay, testing is called for this setup. In the meanwhile, alternative setups, such as wrapping |
Okay, indeed either PERSISTENCE=${PERSISTENCE-""}
NOTIFY=${NOTIFY-"1"}
DEBUGLOG=${DEBUGLOG-""} be set globally, or better pinentry-wsl-ps1 parse Because the same config can be used on different machines, it could also fall back to other pinentry programs adding a case "wls". |
I don't see any gpg2 standard I only found https://www.gnupg.org/documentation/manuals/gnupg/GPG-Configuration.html#index-PINENTRY_005fUSER_005fDATA which passes data from agent->pinentry, and the related Assuan option https://www.gnupg.org/documentation/manuals/gnupg/GPGSM-OPTION.html. Both of them do not seem (to me) to be designed for a user to set options. And not designed for concatenating/appending options together...instead options are overwritten and therefore a user's options are easily overwritten by the agent->pinentry step. |
There is no PINENTRY_USER_DATA is documented on page 89 of the GPG documentation, Version 2.2.29 from June 2021. Not sure if this makes it a gpg2 standard. Citing
One use case could be a custom pinentry that opts for pinentry-wsl-ps1 on a WSL system. |
Thanks. Here are my thoughts....
I don't have the bandwidth to code this. Do you want to submit a PR? I will gladly review a PR and do some testing on it. |
This way, options can be set by, say
NOTIFY=0 pinentry-wsl-ps1.sh
; thus the script can be updated without losing once set options.