Re: dirmngr cygwin resolv.conf

2018-07-04 Thread Andre Heinecke
On Wednesday, July 4, 2018 2:25:41 PM CEST Werner Koch wrote:
> We should not try to fix bugs for Cygwin
> given that Cygwin is not offically supported.

I think that you have spent already way too much time with this thread. ;-)

IMO even a 
#ifdef __CYGWIN__ 
# error No you don't
#endif

in a central place would be appropiate. As the same policy is implicitly 
already applied for the much more important MSVC Windows target. There is one 
maintained way to get gnupg on windows. Cross compile it with mingw-w64 and 
run it natively.

Best Regards,
Andre

-- 
Andre Heinecke |  ++49-541-335083-262  | http://www.intevation.de/
Intevation GmbH, Neuer Graben 17, 49074 Osnabrück | AG Osnabrück, HR B 18998
Geschäftsführer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner

signature.asc
Description: This is a digitally signed message part.
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Verifying signatures with critical notations

2018-07-04 Thread Wiktor Kwapisiewicz via Gnupg-users

Hello,

Is it possible to verify a signature with critical notations that I 
recognize?


I created the signature with:

  echo x | gpg --sign --sig-notation !t...@metacode.biz=node-1 > f.sig

Now when I pass this file to gpgme_op_verify I get only summary 
GPGME_SIGSUM_RED and status GPG_ERR_BAD_SIGNATURE (with source GPGME).


That's obviously correct as the notation is critical and not recognized 
but I don't see a function to mark "t...@metacode.biz=node-1" as a 
recognized notation for verification purposes.


Is it possible?

Thank you in advance!

Kind regards,
Wiktor

--
https://metacode.biz/@wiktor



signature.asc
Description: OpenPGP digital signature
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: Pinentry: Inappropriate ioctl for device when getting smartcard PIN

2018-07-04 Thread Werner Koch
Hi!

Are you setting the homedir in your code also for the Assuan context?
That might explain the behaviour.


Shalom-Salam,

   Werner

-- 
#  Please read:  Daniel Ellsberg - The Doomsday Machine  #
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.


pgpGNpv0Jj7Xp.pgp
Description: PGP signature
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: Pinentry: Inappropriate ioctl for device when getting smartcard PIN

2018-07-04 Thread Werner Koch
On Wed, 27 Jun 2018 22:50, tookm...@gmail.com said:

> I have two gpgme contexts, one for openpgp and another for assuan
> commands to the smartcard. Pinentry triggered by the openpgp context
> works perfectly, but any pinentry launched in service of the assuan
> context fails with the error in the subject. They're both using the same

The gpg-agent log shows that the pinentry started on behalf of the "SCD
PASSWD 1" does not send the ttyname to pinentry.  I will do some code
staring ...


Salam-Shalom,

   Werner

-- 
#  Please read:  Daniel Ellsberg - The Doomsday Machine  #
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.


pgpaIpAkt7x7c.pgp
Description: PGP signature
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: dirmngr cygwin resolv.conf

2018-07-04 Thread Werner Koch
On Wed,  4 Jul 2018 09:11, gni...@fsij.org said:

> The patch is: Don't try to look the error code, but fallback TOR_PORT2
> always.

I don't like this patch because it is not specific enough.

If Cygwin really returns EPERM, than this is a bug in the Cygwin
emulation because all Unix systems (and actually all BSD sockets based
systems) return ECONNREFUSED.  We should not try to fix bugs for Cygwin
given that Cygwin is not offically supported.


Shalom-Salam,

   Werner

-- 
#  Please read:  Daniel Ellsberg - The Doomsday Machine  #
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.


pgp28JgsNMZYz.pgp
Description: PGP signature
___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: dirmngr cygwin resolv.conf

2018-07-04 Thread john doe

On 7/4/2018 9:11 AM, NIIBE Yutaka wrote:

Hello,

john doe  wrote:

I'm willing to confirm that but I'm not sure how I would do that!?


I am considering a patch like following.  If you can build GnuPG for
Cygwin, you can try.  Or, you can ask Cygwin's package maintainer for
GnuPG.

The patch is: Don't try to look the error code, but fallback TOR_PORT2
always.

==
diff --git a/dirmngr/dns-stuff.c b/dirmngr/dns-stuff.c
index ffac816f9..88a4fce5c 100644
--- a/dirmngr/dns-stuff.c
+++ b/dirmngr/dns-stuff.c
@@ -735,13 +735,12 @@ libdns_res_open (struct dns_resolver **r_res)
  static int
  libdns_switch_port_p (gpg_error_t err)
  {
-  if (tor_mode && gpg_err_code (err) == GPG_ERR_ECONNREFUSED
-  && libdns_tor_port == TOR_PORT)
+  if (tor_mode && libdns_tor_port == TOR_PORT)
  {
/* Switch port and try again.  */
if (opt_debug)
-log_debug ("dns: switching from SOCKS port %d to %d\n",
-   TOR_PORT, TOR_PORT2);
+log_debug ("dns: switching from SOCKS port %d to %d (%s)\n",
+   TOR_PORT, TOR_PORT2, gpg_strerror (err));
libdns_tor_port = TOR_PORT2;
libdns_reinit_pending = 1;
return 1;



I have applied your patch on top of master in the gnupg repository

I'm now in the process of building all the libraries require by 'gnupg' 
but I'm still missing the following libraries:


gcrypt
libiconv

How can I clone gcrypt and libiconv from git?

$ git clone git://git.gnupg.org/gcrypt.git
Cloning into 'gcrypt'...
fatal: remote error: access denied or repository not exported: /gcrypt.git

--
John Doe

___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users


Re: dirmngr cygwin resolv.conf

2018-07-04 Thread NIIBE Yutaka
Hello,

john doe  wrote:
> I'm willing to confirm that but I'm not sure how I would do that!?

I am considering a patch like following.  If you can build GnuPG for
Cygwin, you can try.  Or, you can ask Cygwin's package maintainer for
GnuPG.

The patch is: Don't try to look the error code, but fallback TOR_PORT2
always.

==
diff --git a/dirmngr/dns-stuff.c b/dirmngr/dns-stuff.c
index ffac816f9..88a4fce5c 100644
--- a/dirmngr/dns-stuff.c
+++ b/dirmngr/dns-stuff.c
@@ -735,13 +735,12 @@ libdns_res_open (struct dns_resolver **r_res)
 static int
 libdns_switch_port_p (gpg_error_t err)
 {
-  if (tor_mode && gpg_err_code (err) == GPG_ERR_ECONNREFUSED
-  && libdns_tor_port == TOR_PORT)
+  if (tor_mode && libdns_tor_port == TOR_PORT)
 {
   /* Switch port and try again.  */
   if (opt_debug)
-log_debug ("dns: switching from SOCKS port %d to %d\n",
-   TOR_PORT, TOR_PORT2);
+log_debug ("dns: switching from SOCKS port %d to %d (%s)\n",
+   TOR_PORT, TOR_PORT2, gpg_strerror (err));
   libdns_tor_port = TOR_PORT2;
   libdns_reinit_pending = 1;
   return 1;
-- 

___
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users