# clunky (e.g. asking for password twice) to make it worth it.
function _gpg_socketpath {
# dirs are percent-encoded: https://stackoverflow.com/a/64312099
# clunky (e.g. asking for password twice) to make it worth it.
function _gpg_socketpath {
# dirs are percent-encoded: https://stackoverflow.com/a/64312099
}
if [[ ! -v _sev_setup_gpg_forward && -v commands[gpg] ]] {
# XXX: assuming /tmp exists and is writable on destination
}
if [[ ! -v _sev_setup_gpg_forward && -v commands[gpg] ]] {
# XXX: assuming /tmp exists and is writable on destination
export GPG_TTY=$(tty)
if [[ ( -v DISPLAY || -v WAYLAND_DISPLAY ) &&
${PINENTRY_USER_DATA/USE_TTY=0} == $PINENTRY_USER_DATA ]]
export GPG_TTY=$(tty)
if [[ ( -v DISPLAY || -v WAYLAND_DISPLAY ) &&
${PINENTRY_USER_DATA/USE_TTY=0} == $PINENTRY_USER_DATA ]]
- export PINENTRY_USER_DATA=USE_TTY=$((
- ${+DISPLAY} + ${+WAYLAND_DISPLAY} == 0))
- # XXX: don't know if gpg-agent supports comments after directives
- # XXX: path could have #
+ export PINENTRY_USER_DATA=USE_TTY=0
${GNUPGHOME:-~/.gnupg}/gpg-agent.conf 2>/dev/null
# XXX: could check for changes before doing this to save perf
gpg-connect-agent RELOADAGENT UPDATESTARTUPTTY /bye >/dev/null 2>&1
if {$p} {
gpg-connect-agent /subst /serverpid \
${GNUPGHOME:-~/.gnupg}/gpg-agent.conf 2>/dev/null
# XXX: could check for changes before doing this to save perf
gpg-connect-agent RELOADAGENT UPDATESTARTUPTTY /bye >/dev/null 2>&1
if {$p} {
gpg-connect-agent /subst /serverpid \
# subshells can't be used to capture output and print.
c='TMPDIR=$_sev_tmp ${okc}ssh-agent'
if [[ -o interactive ]] {
# subshells can't be used to capture output and print.
c='TMPDIR=$_sev_tmp ${okc}ssh-agent'
if [[ -o interactive ]] {