delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/01/22/09:36:54

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:from:to:references:message-id:date
:mime-version:in-reply-to:content-type; q=dns; s=default; b=JuCV
RsS2phI3EjMqDHcl4lUZA0OMIKjuF1CNIPKlChenJau1SjQ7nLUnXQxJPw69+mTq
XRgxQ1Pg7nKtgODJG2tJwOPj91wmtV2wj6C4mJxlmZa7Zurl6jahAPnJqmW9ERS7
MJwP7WRkIMDNSDCP3D6HzFPq6BpaPQdXpmE7iHU=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:subject:from:to:references:message-id:date
:mime-version:in-reply-to:content-type; s=default; bh=APsHuF8vuZ
hZDrqSzlnHnuYAzoE=; b=D5U7y7hQo5N+wWc5aaTCHix4r0lXsin6m5EmuoMxwT
dB8d9/OEoNJ4G8UPkUeDsO2Nbhy8fvBaGImPnLs91bUipgSdULPTyGbMxfXHoJRx
iENGqSRVsZkb5k3LSHHcyKbhpianCfqIsjTCjORnlcx3EArxfWnn2AG/T4dNREFa
Q=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=RDP, rdp, alert, yaakov
X-HELO: mail-qk1-f178.google.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=qSXic+8GS7PSTsPI8AfUBawLj677ph/+F8HxDhS1ar0=; b=FJlAwx81mwCxxyIJN7iRGnxCgcz/RWB8XStrmsQk9ZhWDs/gfi+SY//vp47um/OWFL wRC4MzdjkI3dl0p590AtkGgtqCma3NKftyf6/0ncqperek4XTsG5dRNf09slimmzJ4jk M0/6BzT6v8BPdTV7OvM3/6cK/VdF/62Uyc0A6EDHoPs4xNDZBez+sJtKQ9YRJjejlTQz Z+9rLiePf6AVi2mTCrBm9/E/YwV9zm0in35rZArG3pyBXMQMtT18YzKSHW0w6je/ptVF hGqOrhcFcVAYoUjRNueXd1F+9K/3YGtEU7hvqf4h45RBuzoXQFCHCA/bdg2cwMa5Edn3 4cXA==
Subject: Re: pinentry-curses not available?
From: David Dombrowsky <6thstreetradio AT gmail DOT com>
To: cygwin AT cygwin DOT com
References: <CAHdnY6Pk62_ciujMvz319pUd6=Y7mQBj0POwnYgYh_sm1Lccwg AT mail DOT gmail DOT com> <68db5725-5c97-4f30-1d63-4284a59fea0e AT gmail DOT com> <CAHdnY6O0_XTFYnwhQ-Eg5AVAhhTB5yuocGERBV_4TWPkdV+AoA AT mail DOT gmail DOT com>
Message-ID: <2283765c-1f5a-1a09-8901-2ef9239c14bd@gmail.com>
Date: Tue, 22 Jan 2019 09:36:37 -0500
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:60.0) Gecko/20100101 Thunderbird/60.2.1
MIME-Version: 1.0
In-Reply-To: <CAHdnY6O0_XTFYnwhQ-Eg5AVAhhTB5yuocGERBV_4TWPkdV+AoA@mail.gmail.com>
X-IsSubscribed: yes

--------------D14AA1FBB458378ECB191B0C
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

On 11/5/18 11:06 AM, David Dombrowsky wrote:> On Sat, Nov 3, 2018 at
2:23 PM Marco Atzeri <marco DOT atzeri AT gmail DOT com> wrote:
>>> In any case, I got pinentry-1.1.0 to compile against a cygwin-supplied
>>> version of ncurses, and it mostly works (you still need to tell it to
>>> not detach from the tty, not sure what's up with that).
>>
>> can you clarify ?
>> May be it was the reason why I and Yaakov found it not functional
>
> That's very possible.
>
> I downloaded the stock source for pinentry 1.1.0 from gnupg.org and
> tried to build it.  After "fixing" one of the build errors (ttytype is
> a macro and needs to be renamed in the pinentry source, at least on my
> cygwin install), I got it to build and install.

For the record, I've had to do this on a couple of machines, so I
figured I'd post the patch.  Still doesn't work reliably.  I need to log
in to the desktop, start a screen session, and then run

gpg-agent --daemon --disable-scdaemon --no-detach -vv --pinentry-program
/usr/local/bin/pinentry-curses > agent.log 2>&1 &

to get it to work.  After that I can sign git commits all day without
having to RDP back into the box.

Not the best, but it works.  If anyone has a better solution, please let
me know.



-- 
David Dombrowsky, Software Engineer
davek AT 6thstreetradio DOT org | 518-374-3204
https://www.linkedin.com/in/david-dombrowsky-94334415

--------------D14AA1FBB458378ECB191B0C
Content-Type: text/x-patch;
 name="pinentry-1.1.0-cygwin.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="pinentry-1.1.0-cygwin.patch"

diff -ur orig/pinentry-1.1.0/pinentry/pinentry.c pinentry-1.1.0/pinentry/pinentry.c
--- orig/pinentry-1.1.0/pinentry/pinentry.c	2017-12-03 11:13:15.000000000 -0500
+++ pinentry-1.1.0/pinentry/pinentry.c	2018-11-02 15:29:16.945203400 -0400
@@ -97,7 +97,7 @@
      Don't reset them.  */
   int grab = pinentry.grab;
   char *ttyname = pinentry.ttyname;
-  char *ttytype = pinentry.ttytype;
+  char *ttytype_ = pinentry.ttytype_;
   char *ttyalert = pinentry.ttyalert;
   char *lc_ctype = pinentry.lc_ctype;
   char *lc_messages = pinentry.lc_messages;
@@ -135,7 +135,7 @@
   if (use_defaults)
     {
       free (pinentry.ttyname);
-      free (pinentry.ttytype);
+      free (pinentry.ttytype_);
       free (pinentry.ttyalert);
       free (pinentry.lc_ctype);
       free (pinentry.lc_messages);
@@ -194,7 +194,7 @@
     {
       pinentry.grab = grab;
       pinentry.ttyname = ttyname;
-      pinentry.ttytype = ttytype;
+      pinentry.ttytype_ = ttytype_;
       pinentry.ttyalert = ttyalert;
       pinentry.lc_ctype = lc_ctype;
       pinentry.lc_messages = lc_messages;
@@ -950,8 +950,8 @@
 	    }
 	  break;
 	case 'N':
-	  pinentry.ttytype = strdup (pargs.r.ret_str);
-	  if (!pinentry.ttytype)
+	  pinentry.ttytype_ = strdup (pargs.r.ret_str);
+	  if (!pinentry.ttytype_)
 	    {
 #ifndef HAVE_W32CE_SYSTEM
 	      fprintf (stderr, "%s: %s\n", this_pgmname, strerror (errno));
@@ -1070,10 +1070,10 @@
     }
   else if (!strcmp (key, "ttytype"))
     {
-      if (pinentry.ttytype)
-	free (pinentry.ttytype);
-      pinentry.ttytype = strdup (value);
-      if (!pinentry.ttytype)
+      if (pinentry.ttytype_)
+	free (pinentry.ttytype_);
+      pinentry.ttytype_ = strdup (value);
+      if (!pinentry.ttytype_)
 	return gpg_error_from_syserror ();
     }
   else if (!strcmp (key, "ttyalert"))
@@ -1755,7 +1755,7 @@
     {
       snprintf (buffer, sizeof buffer, "%s %s %s",
                 pinentry.ttyname? pinentry.ttyname : "-",
-                pinentry.ttytype? pinentry.ttytype : "-",
+                pinentry.ttytype_? pinentry.ttytype_ : "-",
                 pinentry.display? pinentry.display : "-" );
       buffer[sizeof buffer -1] = 0;
       rc = assuan_send_data (ctx, buffer, strlen (buffer));
diff -ur orig/pinentry-1.1.0/pinentry/pinentry.h pinentry-1.1.0/pinentry/pinentry.h
--- orig/pinentry-1.1.0/pinentry/pinentry.h	2017-12-03 11:13:05.000000000 -0500
+++ pinentry-1.1.0/pinentry/pinentry.h	2018-11-02 15:25:42.578732900 -0400
@@ -75,7 +75,7 @@
      supported.  (Assuan: "OPTION ttyname TTYNAME".)  */
   char *ttyname;
   /* The type of the terminal.  (Assuan: "OPTION ttytype TTYTYPE".)  */
-  char *ttytype;
+  char *ttytype_;
   /* Set the alert mode (none, beep or flash).  */
   char *ttyalert;
   /* The LC_CTYPE value for the terminal.  (Assuan: "OPTION lc-ctype
diff -ur orig/pinentry-1.1.0/pinentry/pinentry-curses.c pinentry-1.1.0/pinentry/pinentry-curses.c
--- orig/pinentry-1.1.0/pinentry/pinentry-curses.c	2017-12-03 11:13:05.000000000 -0500
+++ pinentry-1.1.0/pinentry/pinentry-curses.c	2018-11-02 15:27:00.269222900 -0400
@@ -1188,7 +1188,7 @@
     }
 #endif
 
-  rc = dialog_run (pinentry, pinentry->ttyname, pinentry->ttytype);
+  rc = dialog_run (pinentry, pinentry->ttyname, pinentry->ttytype_);
   do_touch_file (pinentry);
   return rc;
 }


--------------D14AA1FBB458378ECB191B0C
Content-Type: text/plain; charset=us-ascii


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
--------------D14AA1FBB458378ECB191B0C--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019