Skip to content

Commit

Permalink
#3299 remove 'notok' handling (broken)
Browse files Browse the repository at this point in the history
add commented out 'GETINFO' examples
  • Loading branch information
totaam committed Oct 12, 2021
1 parent 78236bc commit dd3aff0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion xpra/net/socket_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,7 @@ def ssl_retry(e, ssl_ca_certs):
"",
"Do you want to accept this certificate?",
))
r = run_pinentry_confirm(pinentry_cmd, title, prompt) #, "save it")
r = run_pinentry_confirm(pinentry_cmd, title, prompt)
ssllog("run_pinentry_confirm(..) returned %r", r)
if r!="OK":
return None
Expand Down
14 changes: 9 additions & 5 deletions xpra/scripts/pinentry_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,19 +120,23 @@ def rec(value=None):
return None
return values[0]

def run_pinentry_confirm(pinentry_cmd, title, prompt, notok=None):
def run_pinentry_confirm(pinentry_cmd, title, prompt):
proc = popen_pinentry(pinentry_cmd)
if proc is None:
return None
messages = []
if notok:
messages.append("SETNOTOK %s" % notok)
messages = [
#we can't use those as the response is multi-line:
#"GETINFO flavor",
#"GETINFO version",
#"GETINFO pid",
]
messages += [
"SETPROMPT %s" % title,
"SETDESC %s" % prompt,
#"SETKEYINFO %c/%s"
]
messages.append("CONFIRM")
log("run_pinentry_confirm%s messages=%s", (pinentry_cmd, title, prompt, notok), messages)
log("run_pinentry_confirm%s messages=%s", (pinentry_cmd, title, prompt), messages)
def get_input():
if not messages:
return None
Expand Down

0 comments on commit dd3aff0

Please sign in to comment.