Page MenuHome GnuPG
Feed Advanced Search

Oct 20 2017

werner edited projects for T2167: Unplugging USB Smartcard/Yubikey causes problems with scdaemon, added: gnupg (gpg22); removed gnupg.
Oct 20 2017, 1:30 PM · gnupg (gpg22), Restricted Project, patch, Windows 64, scd, Windows, Windows 32, Bug Report
werner removed projects from T2167: Unplugging USB Smartcard/Yubikey causes problems with scdaemon: gnupg (gpg20), gnupg (gpg21).

gniibe: Can you check the status?

Oct 20 2017, 1:28 PM · gnupg (gpg22), Restricted Project, patch, Windows 64, scd, Windows, Windows 32, Bug Report

Oct 17 2017

freysteinn added a comment to T3280: Cannot add subkeys to key stored on card.

Hello.
I am having the same problem with my Yubikey v4.

Oct 17 2017, 8:29 PM · gnupg (gpg22)

Sep 21 2017

werner added a project to T2440: scdaemon grabs card exclusively; it'd be nice if it didn't: scd.
Sep 21 2017, 3:46 PM · scd, Feature Request, gnupg

Sep 7 2017

gniibe claimed T2964: dirmngr and gpg-agent should work automatically even when GNUPGHOME is larger than sun_path.
Sep 7 2017, 12:35 AM · Stalled, scd, gpgagent, Bug Report, gnupg, dirmngr

Aug 1 2017

gniibe added a comment to T3286: card: Yubikey factory-reset failure .

D441: card: Yubikey factory-reset failure is the patch.

Aug 1 2017, 7:24 AM · gnupg (gpg22), scd
gniibe added a comment to T3286: card: Yubikey factory-reset failure .

This may fix the problem for new version 4.2.7:

Aug 1 2017, 6:36 AM · gnupg (gpg22), scd
gniibe updated subscribers of T3286: card: Yubikey factory-reset failure .
Aug 1 2017, 6:33 AM · gnupg (gpg22), scd

Jul 27 2017

marcus closed T2938: scd-event is annoying to use on Windows as Wontfix.
Jul 27 2017, 3:18 PM · Windows 32, scd, Windows, Bug Report, gnupg

Jul 25 2017

lorenz added a comment to T1854: Problems with same encryption and signing key on smartcard.

That is the way I get my certificate signed, there is nothing I can do about it ;-)

Jul 25 2017, 7:35 PM · gnupg, Feature Request, scd
marcus added a comment to T1854: Problems with same encryption and signing key on smartcard.

It's not really a good idea to use the same RSA key for encryption and signing. (Although when I wrote scute, I couldn't generate a CSR for the encryption key, because the CSR had to be self-signed, meh).

Jul 25 2017, 6:37 PM · gnupg, Feature Request, scd
marcus updated the task description for T1854: Problems with same encryption and signing key on smartcard.
Jul 25 2017, 6:36 PM · gnupg, Feature Request, scd
gniibe created T3300: scd: Support multiple readers by PC/SC driver.
Jul 25 2017, 11:32 AM · Restricted Project, gnupg (gpg23), scd
gniibe closed T3262: Longer URL (possibly, login) should be supported as Resolved.

Fixed in rG69614d55018d: scd: Support longer data length for special DOs for v3 card..

Jul 25 2017, 6:46 AM · scd, gnupg (gpg21)

Jul 24 2017

marcus added a project to T2683: Add config option to connect to HW token in non-exclusive (shared) mode: scd.
Jul 24 2017, 6:19 PM · scd, Feature Request

Jul 20 2017

marcus closed T2128: KEYTOCARD does not configure the card's key length as Resolved.

Given that 2.0 only gets important updates, and for 2.1 it is fixed, we can close it.

Jul 20 2017, 9:54 PM · Bug Report, gnupg, scd

Jul 19 2017

gniibe created T3286: card: Yubikey factory-reset failure .
Jul 19 2017, 12:59 AM · gnupg (gpg22), scd

Jul 17 2017

Mouse added a comment to T3267: scdaemon PC/SC OPEN failed: sharing violation (0x8010000b).

@werner I request re-consideration. I *have* read the discussion, and remain convinced that a parameter that allows shared access is necessary.

Jul 17 2017, 10:47 PM · FAQ, scd
marcus placed T671: card context shared between callers up for grabs.
Jul 17 2017, 6:26 PM · scd, Bug Report, gnupg
marcus closed T3012: gpg-agent 2.0.30 not able to create SHA-2 signatures with scute as Wontfix.

gpgtools will have to update.

Jul 17 2017, 5:42 PM · Won't Fix, gnupg (gpg20), Bug Report, scd, gnupg
justus created T3280: Cannot add subkeys to key stored on card.
Jul 17 2017, 12:21 PM · gnupg (gpg22)

Jul 13 2017

marcus edited projects for T2964: dirmngr and gpg-agent should work automatically even when GNUPGHOME is larger than sun_path, added: Stalled; removed In Progress, gnupg (gpg22).
Jul 13 2017, 1:29 AM · Stalled, scd, gpgagent, Bug Report, gnupg, dirmngr

Jul 10 2017

werner updated the task description for T3267: scdaemon PC/SC OPEN failed: sharing violation (0x8010000b).
Jul 10 2017, 4:26 PM · FAQ, scd
werner closed T3267: scdaemon PC/SC OPEN failed: sharing violation (0x8010000b) as Wontfix.

This is on purpose. Please read the discussions. Use card-timeout in scdaemon.conf or "gpgconf --kill scdaemon"

Jul 10 2017, 4:24 PM · FAQ, scd

Jul 7 2017

gniibe created T3262: Longer URL (possibly, login) should be supported.
Jul 7 2017, 1:43 AM · scd, gnupg (gpg21)

Jun 26 2017

kristianf closed T3219: Regression in 2.1.21: Creates (local) signature on other public keyblock using signing subkey when certification key is not available as Resolved.
Jun 26 2017, 7:20 PM · scd, Bug Report
justus triaged T3219: Regression in 2.1.21: Creates (local) signature on other public keyblock using signing subkey when certification key is not available as Normal priority.

If this is gone in master, please close this bug. Thanks :).

Jun 26 2017, 3:14 PM · scd, Bug Report

Jun 23 2017

kristianf added a comment to T3219: Regression in 2.1.21: Creates (local) signature on other public keyblock using signing subkey when certification key is not available.

Issue seems to be gone in gpg (GnuPG) 2.1.22-beta75

Jun 23 2017, 9:32 PM · scd, Bug Report
kristianf added a project to T3219: Regression in 2.1.21: Creates (local) signature on other public keyblock using signing subkey when certification key is not available: scd.
Jun 23 2017, 8:36 PM · scd, Bug Report

Jun 9 2017

gniibe created T3201: KDF DO support enhancement.
Jun 9 2017, 6:26 AM · gnupg (gpg22), scd
gniibe removed a project from T3152: KDF DO support in OpenPGP card: g10code Sprint (KW 23).

Specification is finished.

Jun 9 2017, 6:24 AM · scd
gniibe added a comment to T3152: KDF DO support in OpenPGP card.

bit 0 (in smartcard context, we say b1 as it starts from 1) of Extended Capabilities specifies if KDF-DO is supported.

Jun 9 2017, 4:57 AM · scd
gniibe added a comment to T3152: KDF DO support in OpenPGP card.

Tag for KDF-DO is assigned as:

Jun 9 2017, 4:32 AM · scd

Jun 6 2017

marcus edited projects for T3152: KDF DO support in OpenPGP card, added: g10code Sprint (KW 23); removed g10code Sprint (KW 22).
Jun 6 2017, 10:16 AM · scd

May 29 2017

marcus edited projects for T3152: KDF DO support in OpenPGP card, added: g10code Sprint (KW 22); removed g10code Sprint (KW 21).
May 29 2017, 10:16 AM · scd

May 24 2017

justus moved T2964: dirmngr and gpg-agent should work automatically even when GNUPGHOME is larger than sun_path from Backlog to Deferred on the gnupg (gpg22) board.
May 24 2017, 1:29 PM · Stalled, scd, gpgagent, Bug Report, gnupg, dirmngr

May 22 2017

marcus edited projects for T3152: KDF DO support in OpenPGP card, added: g10code Sprint (KW 21); removed g10code Sprint (KW 20).
May 22 2017, 10:43 AM · scd

May 15 2017

marcus edited projects for T3152: KDF DO support in OpenPGP card, added: g10code Sprint (KW 20); removed g10code Sprint (KW 19).
May 15 2017, 10:35 AM · scd
justus added a comment to T2964: dirmngr and gpg-agent should work automatically even when GNUPGHOME is larger than sun_path.

Automatic creation of socket directories creates cleanup trouble for projects previously relying on the agent-shutdown if $GNUPGHOME is removed: https://notmuchmail.org/pipermail/notmuch/2017/024550.html

May 15 2017, 9:47 AM · Stalled, scd, gpgagent, Bug Report, gnupg, dirmngr
gniibe triaged T3152: KDF DO support in OpenPGP card as Normal priority.
May 15 2017, 4:15 AM · scd

May 11 2017

gniibe added a comment to T3152: KDF DO support in OpenPGP card.

Here is the spec.

May 11 2017, 4:38 AM · scd

May 9 2017

gniibe created T3152: KDF DO support in OpenPGP card.
May 9 2017, 11:06 PM · scd

May 1 2017

gniibe added a comment to T2298: Unblocking a smartcard PIN not possible in 2.1.

The debug log includes communication between host PC and the reader, thus, it may include your input of PIN when you do that.

May 1 2017, 6:06 AM · Info Needed, gnupg, scd, Bug Report

Apr 30 2017

languitar added a comment to T2298: Unblocking a smartcard PIN not possible in 2.1.

Ping? Otherwise I would provide the required information.

Apr 30 2017, 2:35 PM · Info Needed, gnupg, scd, Bug Report

Apr 12 2017

gniibe added a project to T3083: Smartcard access may fail with error "Invalid Value" after resuming system from suspend: In Progress.

By the commit: rGf053f99ed0b0: scd: Handle unexpected suspend/resume by CCID driver., I put some code to handle such an expected return from the device.
Please try.
I couldn't reproduce this on my machine. (Suspend-to-RAM keeps my USB device running.)

Apr 12 2017, 4:28 AM · Restricted Project, gnupg (gpg22), scd

Apr 11 2017

gniibe added a comment to T3083: Smartcard access may fail with error "Invalid Value" after resuming system from suspend.

It looks like the device got suspended and resumed.
But the application (scdaemon) didn't get noticed by libusb.
So, scdaemon kept communicating as usual, but got unexpected msg type = 0x81,
which is error report status (RDR_to_PC_DataBlock).

Apr 11 2017, 1:57 PM · Restricted Project, gnupg (gpg22), scd
gniibe triaged T3083: Smartcard access may fail with error "Invalid Value" after resuming system from suspend as Normal priority.
Apr 11 2017, 1:32 PM · Restricted Project, gnupg (gpg22), scd
gniibe added a comment to T3082: Ship hwdb files for USB smartcards and crypto tokens.

FWIW, the syntax of "vendor-id:product-id" is used for USB for any USB tools.

Apr 11 2017, 12:48 PM · scd
pwithnall added a comment to T3082: Ship hwdb files for USB smartcards and crypto tokens.
In T3082#95656, @gniibe wrote:

Thank you for your comment.

I think that a practical approach for us would be having a list of vendor-id:product-id in a file under gnupg/doc/ and maintain the list.
It will be up to distributions to use the list to build hwdb, udev rules, or whatever.

Apr 11 2017, 12:36 PM · scd
gniibe added a comment to T3082: Ship hwdb files for USB smartcards and crypto tokens.

Thank you for your comment.

Apr 11 2017, 12:23 PM · scd
pwithnall added a comment to T3082: Ship hwdb files for USB smartcards and crypto tokens.
In T3082#95636, @gniibe wrote:

(3) We don't know which smartcard reader works fine, while we know some readers don't work well.

Apr 11 2017, 10:48 AM · scd
gniibe claimed T3082: Ship hwdb files for USB smartcards and crypto tokens.

While I understand your request, it's complicated.

Apr 11 2017, 10:16 AM · scd
gniibe merged T1113: sign + encryption OK but decryption failed with 3072 bits key on smartcard V2 into T1405: Print a warning for readers not supporting extended APDUs..
Apr 11 2017, 3:16 AM · Feature Request, gnupg, scd
gniibe merged task T1113: sign + encryption OK but decryption failed with 3072 bits key on smartcard V2 into T1405: Print a warning for readers not supporting extended APDUs..
Apr 11 2017, 3:16 AM · Not A Bug, gnupg, Feature Request, Documentation, scd
gniibe added a project to T1113: sign + encryption OK but decryption failed with 3072 bits key on smartcard V2: Not A Bug.

No way to fix, itself. Better warning/error message can be done.

Apr 11 2017, 3:13 AM · Not A Bug, gnupg, Feature Request, Documentation, scd

Apr 4 2017

gniibe removed a project from T2285: decryption fails with "Missing item in object" even though private key is available: OpenPGP.
Apr 4 2017, 2:59 AM · Info Needed, Bug Report, gnupg, scd

Apr 3 2017

werner closed T2230: gpgsm decryption with smartcard fails with "Invalid session key" as Resolved.

we are now at 2.1.20 - time to mark this one as resolved.

Apr 3 2017, 10:51 PM · Restricted Project, gnupg, S/MIME, scd, Bug Report
gniibe added a member for scd: gniibe.
Apr 3 2017, 11:18 AM

Mar 30 2017

admin created scd.
Mar 30 2017, 6:42 PM

Mar 24 2017

werner added a project to T2964: dirmngr and gpg-agent should work automatically even when GNUPGHOME is larger than sun_path: In Progress.
Mar 24 2017, 4:52 PM · Stalled, scd, gpgagent, Bug Report, gnupg, dirmngr
werner added a comment to T2964: dirmngr and gpg-agent should work automatically even when GNUPGHOME is larger than sun_path.

We also have a discussion of the mailing list. It does currently not make sense
to continue here.

The problem of NFS mounted home directories is _real_ and we have a solution for
this which is better than the old redirection hack.

The problem with too long socket names is not severe and has been around for
decades (for other software and 14 years for GnuPG). There are workaround and
/run/user also solves this.

I proposed a change which does not even require --create-socketdir. There was
no comment on this and thus I will push that now so that we can do a real life test.

Mar 24 2017, 4:52 PM · Stalled, scd, gpgagent, Bug Report, gnupg, dirmngr
justus added a comment to T2964: dirmngr and gpg-agent should work automatically even when GNUPGHOME is larger than sun_path.

Justus: I told you several times that we are not going to change working code
for no good reason.

Except that it is not working. If it was working, then
06f1f163e96f1039304fd3cf565cf9de1ca45849
would not be necessary.

Even if your hack (I call it a hack because it does not
work with getsockname)

1/ Yes it does. It returns precisely the path that was used in bind.

2/ We only use getsockname on sockets that were given us by a service manager
like systemd, and thus those sockets would be unaffected by "the hack".

would make it, it does not solve the major problem: The
inability of creating sockets on certain file systems. THAT is the major reason
why we moved to /var/run.

Please stop conflating these things. This bug is about "dirmngr and gpg-agent
should work automatically even when GNUPGHOME is larger than sun_path". It is
not about NFS or FAT or something.

Mar 24 2017, 1:44 PM · Stalled, scd, gpgagent, Bug Report, gnupg, dirmngr
werner closed T1618: Make gnupg more friendly to multiple readers as Resolved.
Mar 24 2017, 11:07 AM · gnupg, Feature Request, scd
werner added a comment to T1618: Make gnupg more friendly to multiple readers.

Implemented in 2.1.19

Mar 24 2017, 11:07 AM · gnupg, Feature Request, scd

Mar 22 2017

wglas85 added a comment to T3012: gpg-agent 2.0.30 not able to create SHA-2 signatures with scute.

Hello Werner,

The problem is, that some projects liek gpgtools for MacOS are reluctantly sticking to
gnupg-2.0 :-/

So, I'd love to have this patch committed in order to ease the transition phase from

2.0 to 2.1 for them.

Regards, Wolfgang
Mar 22 2017, 1:17 PM · Won't Fix, gnupg (gpg20), Bug Report, scd, gnupg
werner added projects to T3012: gpg-agent 2.0.30 not able to create SHA-2 signatures with scute: scd, gnupg (gpg20), Won't Fix.
Mar 22 2017, 12:28 PM · Won't Fix, gnupg (gpg20), Bug Report, scd, gnupg

Mar 21 2017

werner added a comment to T2964: dirmngr and gpg-agent should work automatically even when GNUPGHOME is larger than sun_path.

Justus: I told you several times that we are not going to change working code
for no good reason. Even if your hack (I call it a hack because it does not
work with getsockname) would make it, it does not solve the major problem: The
inability of creating sockets on certain file systems. THAT is the major reason
why we moved to /var/run.

Mar 21 2017, 7:25 PM · Stalled, scd, gpgagent, Bug Report, gnupg, dirmngr
justus added a comment to T2964: dirmngr and gpg-agent should work automatically even when GNUPGHOME is larger than sun_path.

The whole IPC thing is pretty complex and adding a non-standard hack as proposed
by Justus will for sure cause breakage on some platforms.

I'm not sure why you call it a hack. I've been looking at POSIX, [0] introduces
pathname resolution, and the terms 'relative path' and 'absolute path'.

0: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13

Neither the page for connect [1], nor the one for bind [2] state that the path
used to connect/bind unix sockets must be an absolute path.

1: http: / / pubs.opengroup.org/onlinepubs/9699919799/functions/connect.html#
2: http: / / pubs.opengroup.org/onlinepubs/9699919799/functions/bind.html#

Furthermore, my test across a wide range of UNIX implementations did not show
any issues with using relative paths.

Mar 21 2017, 3:12 PM · Stalled, scd, gpgagent, Bug Report, gnupg, dirmngr

Mar 14 2017

werner added a comment to T2964: dirmngr and gpg-agent should work automatically even when GNUPGHOME is larger than sun_path.

I agreed in T2964 (wk on Mar 01 2017, 07:31 AM / Roundup) to auto create socket directories. I would like to do that
only for a tmpfs but we can also try to do this always. Adding a inotify watch
to remove the directory is more complex and I am not sure whether this is really
needed. The other thing is simple and we could do that for 2.1.20.

The whole IPC thing is pretty complex and adding a non-standard hack as proposed
by Justus will for sure cause breakage on some platforms.

Yes, we should document /var/run recommendations in the README. I will do that
for the next release.

Mar 14 2017, 12:06 PM · Stalled, scd, gpgagent, Bug Report, gnupg, dirmngr
dkg added a comment to T2964: dirmngr and gpg-agent should work automatically even when GNUPGHOME is larger than sun_path.

This bug report simply asks to solve the generic problem of GNUPGHOME being
larger than sun_path. Justus's proposed mechanism is only one way of solving
that problem.

Another proposed mechanism is what i originally proposed in T2964 (dkg on Feb 17 2017, 01:52 AM / Roundup), which
*does* address remote filesystems and re-mounted filesystems.

I don't undertstand the critique about the code not yet being mature. Code
doesn't become mature by not being written, it needs to be written first and
then tested in order to become mature.

Lastly, i think if we expect that /run/user/$(id -u)/ is a "simple dependency"
for building other software, we need to make that expectation explicit someplace
reasonable (e.g. doc/HACKING or something similar)

Mar 14 2017, 4:39 AM · Stalled, scd, gpgagent, Bug Report, gnupg, dirmngr

Mar 13 2017

aheinecke added a comment to T2982: Scdaemon, w32 hang if two assuan connections are made in parallel.

I've tried latest master and it no longer hangs for me.

Thanks. Changing the status to not-released as this is fixed.

Mar 13 2017, 11:57 AM · Unreleased, gpg4win, Bug Report, gnupg, scd
aheinecke added a project to T2982: Scdaemon, w32 hang if two assuan connections are made in parallel: Unreleased.
Mar 13 2017, 11:57 AM · Unreleased, gpg4win, Bug Report, gnupg, scd
aheinecke closed T2982: Scdaemon, w32 hang if two assuan connections are made in parallel as Resolved.
Mar 13 2017, 11:57 AM · Unreleased, gpg4win, Bug Report, gnupg, scd

Mar 6 2017

werner added a comment to T2964: dirmngr and gpg-agent should work automatically even when GNUPGHOME is larger than sun_path.

My main reasons why I don't want to consider this now are:

  • That code is not written and thus will not be matured.
  • It does not solve the major problem why we moved to /var/run, namely remote file systems and avoidance of possible re-mounted file systems
  • The claim that /var/run/user does not exists is not valid, because that is a simple dependency for building the software or using it with non-common setups (remot, long $HOME). Thus an admin will anyway be on duty and adding a few lines to /etc/rc.local is not a bug deal.

FWIW, we may try this in 2.3 see T2987.

Mar 6 2017, 12:29 PM · Stalled, scd, gpgagent, Bug Report, gnupg, dirmngr
justus added a comment to T2964: dirmngr and gpg-agent should work automatically even when GNUPGHOME is larger than sun_path.

Werner does not think that this is a problem and does not want me to spend time
on this.

Mar 6 2017, 11:28 AM · Stalled, scd, gpgagent, Bug Report, gnupg, dirmngr
justus added a comment to T2964: dirmngr and gpg-agent should work automatically even when GNUPGHOME is larger than sun_path.

getsockname is only used to recover the paths of sockets bound by a supervisor
like systemd. So unless systemd starts doing the same trick that I propose,
there is no problem.

Mar 6 2017, 10:38 AM · Stalled, scd, gpgagent, Bug Report, gnupg, dirmngr

Mar 4 2017

gniibe added a comment to T2982: Scdaemon, w32 hang if two assuan connections are made in parallel.

This patch tried to fix the issue:
https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commit;h=f9acc7d18bb90f47dafe7e32ae92f567756d6b12

I was wrong that PIPE can be select(2)-ed on Windows. This patch changes the
code so that it uses kill(2) on UNIX and SetEvent on Windows
to break the loop.

Mar 4 2017, 2:37 AM · Unreleased, gpg4win, Bug Report, gnupg, scd

Mar 3 2017

aheinecke added a comment to T2982: Scdaemon, w32 hang if two assuan connections are made in parallel.

With this patch the log message is different (No such file or directory). Hang
still happens.

2017-03-03 10:21:06 scdaemon[8604] DBG: enter: apdu_get_status: slot=0 hang=0
2017-03-03 10:21:06 scdaemon[8604] DBG: leave: apdu_get_status => sw=0x0 status=7
2017-03-03 10:21:06 scdaemon[8604] npth_pselect failed: No such file or
directory - waiting 1s

Mar 3 2017, 10:22 AM · Unreleased, gpg4win, Bug Report, gnupg, scd
aheinecke added a comment to T2982: Scdaemon, w32 hang if two assuan connections are made in parallel.

Version was 2.1.19 from the installer built by werner / the speedo system.

I'll try out the patch

Mar 3 2017, 9:09 AM · Unreleased, gpg4win, Bug Report, gnupg, scd
gniibe added a comment to T2982: Scdaemon, w32 hang if two assuan connections are made in parallel.

It seems npth_eselect is for network FDs.

How about this change?

diff --git a/scd/scdaemon.c b/scd/scdaemon.c
index f7e9f83b5..462ff1b3e 100644

  • a/scd/scdaemon.c

+++ b/scd/scdaemon.c
@@ -1291,7 +1291,7 @@ handle_connections (int listen_fd)

while (npth_sigev_get_pending(&signo))
  handle_signal (signo);

#else

  • ret = npth_eselect (nfd+1, &read_fdset, NULL, NULL, t, NULL, NULL);

+ ret = npth_select (nfd+1, &read_fdset, NULL, NULL, t);

saved_errno = errno;

#endif

Mar 3 2017, 6:24 AM · Unreleased, gpg4win, Bug Report, gnupg, scd
gniibe added a comment to T2982: Scdaemon, w32 hang if two assuan connections are made in parallel.

It is selecting FD which is created by gnupg_create_pipe.

Mar 3 2017, 6:15 AM · Unreleased, gpg4win, Bug Report, gnupg, scd
gniibe added a comment to T2982: Scdaemon, w32 hang if two assuan connections are made in parallel.

Version information, please.

I cannot replicate this on GNU/Linux with PC/SC (by disable-ccid).
Anyway, I am looking into this issue:

npth_pselect failed: Input/output error - waiting 1s
Mar 3 2017, 5:55 AM · Unreleased, gpg4win, Bug Report, gnupg, scd

Mar 2 2017

werner reassigned T2982: Scdaemon, w32 hang if two assuan connections are made in parallel from werner to gniibe.
Mar 2 2017, 4:48 PM · Unreleased, gpg4win, Bug Report, gnupg, scd
werner added a comment to T2982: Scdaemon, w32 hang if two assuan connections are made in parallel.

I doubt that this is Windows only. On Linux we use our own driver but on
Windows we have to resort to PC/SC. My educated guess is that we are in some
blocking system call which is not npth_unprotected.

Mar 2 2017, 4:48 PM · Unreleased, gpg4win, Bug Report, gnupg, scd
aheinecke added projects to T2982: Scdaemon, w32 hang if two assuan connections are made in parallel: scd, gnupg, Bug Report, gpg4win.
Mar 2 2017, 4:37 PM · Unreleased, gpg4win, Bug Report, gnupg, scd
justus added a comment to T2964: dirmngr and gpg-agent should work automatically even when GNUPGHOME is larger than sun_path.

From what I've seen there is no variation in getsockname, it just returns
whatever path is passed to bind. I don't understand the need for getsockname
tbh, because we are the ones that bind the socket in the first place.

(The only variation seems to be that the function is broken on Hurd...).

Mar 2 2017, 11:45 AM · Stalled, scd, gpgagent, Bug Report, gnupg, dirmngr

Mar 1 2017

dkg added a comment to T2964: dirmngr and gpg-agent should work automatically even when GNUPGHOME is larger than sun_path.

Justus, thanks for this work, it's great!. If we can solve the problem by doing
more clever socket(7) manipulation, that would be a big win.

How do you propose dealing with the getsockname() variations? or should we just
forbid the use of getsockname() entirely in the gnupg codebase?

Mar 1 2017, 7:24 PM · Stalled, scd, gpgagent, Bug Report, gnupg, dirmngr
justus added a comment to T2964: dirmngr and gpg-agent should work automatically even when GNUPGHOME is larger than sun_path.

dkg, I understand that GnuPG does not work with such a homedir, however, it is
not the act of creating the socket that is problematic. In fact, both
bind(2)ing and connect(2)ing is ok if one uses relative paths, as demonstrated
by the test program I have attached here.

Here is the program binding and connecting to a socket with an absolute path
length of ~10 * sizeof sockaddr_un.sun_path:

System: OpenBSD:6.0:GENERIC.MP#1992
sizeof addr.sun_path: 104
Running test with strlen (cwd): 22, name: '/tmp/test-unix-sockets/socket'

getsockname returned '/tmp/test-unix-sockets/socket', addrlen: 106

Running test with strlen (cwd): 22, name: 'socket'

getsockname returned 'socket', addrlen: 106

Running test with strlen (cwd): 126, name: 'socket'

getsockname returned 'socket', addrlen: 106

Running test with strlen (cwd): 1062, name: 'socket'

  getsockname returned 'socket', addrlen: 106

This works on all Unices that I have access to. I've asked on gnupg-devel@ for
people to run it elsewhere.

I understand that '--create-socketdir' solves problems besides this one. But I
disagree with the statement that our handling of socket paths is unproblematic
because --create-socketdir solves this problem.

Mar 1 2017, 3:10 PM · Stalled, scd, gpgagent, Bug Report, gnupg, dirmngr
justus added a comment to T2964: dirmngr and gpg-agent should work automatically even when GNUPGHOME is larger than sun_path.

Mar 1 2017, 3:10 PM · Stalled, scd, gpgagent, Bug Report, gnupg, dirmngr
werner added a comment to T2964: dirmngr and gpg-agent should work automatically even when GNUPGHOME is larger than sun_path.

Can we test whether /run is mounted on a tmpfs ?
should we assume that /run is always on a tmpfs but /var/run is a classical Unix
w/o a tmpfs? Or is it better to have a configure option.

I can imagine to agree to auto-create the directory on a tmpfs.

Mar 1 2017, 7:31 AM · Stalled, scd, gpgagent, Bug Report, gnupg, dirmngr
dkg added a comment to T2964: dirmngr and gpg-agent should work automatically even when GNUPGHOME is larger than sun_path.

Yes, notmuch decided that they needed to workaround the situation anyway,
because they're in an environment that doesn't create the standard per-user
rundir. That doesn't seem like a great argument that gpg should also fail in
environments where the standard per-user rundir is available. I can demonstrate
a number of environments where gpg or its daemons will fail, but i don't think
any of them justify forcing gpg or its daemons to *also* fail when those
environments aren't present.

In answer to your nitpick, here is evidence that gpg's daemons cannot create
their sockets when the GNUPGHOME is too long:

1 dkg@alice:~$ mkdir -m 0700
/home/dkg/tmp/very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long
0 dkg@alice:~$
GNUPGHOME=/home/dkg/tmp/very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-very-long
gpgconf --launch dirmngr
gpgconf: error running '/usr/bin/gpg-connect-agent': exit status 1
gpgconf: error running '/usr/bin/gpg-connect-agent --dirmngr NOP': General error
1 dkg@alice:~$

Mar 1 2017, 2:02 AM · Stalled, scd, gpgagent, Bug Report, gnupg, dirmngr
gniibe claimed T2953: scdaemon fails to decrypt if unusual key-size is chosen.
Mar 1 2017, 1:05 AM · Bug Report, gnupg, scd

Feb 28 2017

justus added projects to T2964: dirmngr and gpg-agent should work automatically even when GNUPGHOME is larger than sun_path: gnupg (gpg22), gpgagent, scd.
Feb 28 2017, 4:39 PM · Stalled, scd, gpgagent, Bug Report, gnupg, dirmngr

Feb 14 2017

werner added projects to T2938: scd-event is annoying to use on Windows: Windows, scd, Windows 32.
Feb 14 2017, 3:21 PM · Windows 32, scd, Windows, Bug Report, gnupg

Feb 13 2017

werner lowered the priority of T2953: scdaemon fails to decrypt if unusual key-size is chosen from High to Normal.
Feb 13 2017, 12:34 PM · Bug Report, gnupg, scd

Feb 9 2017

bslbckr added a comment to T2953: scdaemon fails to decrypt if unusual key-size is chosen.

I'm having trouble decrypting some mails. I use an encryption sub-key with a
unusual length of 3104 bits. I described my problem in the gnupg-users mailing
list and there the following problem was identified:
<quote>
I think that it is deterministic; The cause is that the RSA keysize is
not the one in the set of: 1024, 1536, 2048, 3072, 4096. When data to
be decrypted is padded, scdaemon can't decrypt, I suppose.

I am not sure the exact reason why scdaemon only supports limited set of
keysize for encryption. But we have this handling of padding in the
current code:

https://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob;f=scd/app-openpgp.c;h=71c9e1b83003af07b0984688ba1ec5e9013b877c;hb=refs/heads/master#l4334

       /* We might encounter a couple of leading zeroes in the
          cryptogram.  Due to internal use of MPIs these leading zeroes
          are stripped.  However the OpenPGP card expects exactly 128
          bytes for the cryptogram (for a 1k key).  Thus we need to fix
          it up.  We do this for up to 16 leading zero bytes; a
          cryptogram with more than this is with a very high
          probability anyway broken.  If a signed conversion was used
          we may also encounter one leading zero followed by the correct
          length.  We fix that as well.  */
       if (indatalen >= (128-16) && indatalen < 128)      /* 1024 bit key.  */
         fixuplen = 128 - indatalen;
       else if (indatalen >= (192-16) && indatalen < 192) /* 1536 bit key.  */
         fixuplen = 192 - indatalen;
       else if (indatalen >= (256-16) && indatalen < 256) /* 2048 bit key.  */
         fixuplen = 256 - indatalen;
       else if (indatalen >= (384-16) && indatalen < 384) /* 3072 bit key.  */
         fixuplen = 384 - indatalen;
       else if (indatalen >= (512-16) && indatalen < 512) /* 4096 bit key.  */
         fixuplen = 512 - indatalen;
       else if (!*(const char *)indata && (indatalen == 129
                                           || indatalen == 193
                                           || indatalen == 257
                                           || indatalen == 385
                                           || indatalen == 513))
         fixuplen = -1;
       else
         fixuplen = 0;

Perhaps, it was due to support all existing OpenPGP card
implementations, I mean, somehow historical, and it was easier to list
up specific keysizes.

This should be fixed.
</quote>

I also attached to log-files of the scdaemon. One for a successful and one for a
failed decryption attempt.

Please let me know if you need any additional information.

Feb 9 2017, 8:46 PM · Bug Report, gnupg, scd
bslbckr added a comment to T2953: scdaemon fails to decrypt if unusual key-size is chosen.

Feb 9 2017, 8:42 PM · Bug Report, gnupg, scd
bslbckr added projects to T2953: scdaemon fails to decrypt if unusual key-size is chosen: scd, gnupg, Bug Report.
Feb 9 2017, 8:42 PM · Bug Report, gnupg, scd

Dec 8 2016

yeti closed T2860: Yubikey Sucessfully detected by Win7 but gpg --card-status fails as Resolved.
Dec 8 2016, 12:06 AM · Bug Report, Windows 64, scd, Windows, gnupg, Windows 32
yeti added a comment to T2860: Yubikey Sucessfully detected by Win7 but gpg --card-status fails.

I tested with the GnuPG version 2.0.30 (GPG4WIn) as well as the current 2.1.16
Windows binaries. SCdaemon was running but was unable to get exclusive card access.
Why?
The Cisco Network Manager as well as Cisco Anyconnect VPN did both gain shared
card access (they were not told to do so!). I needed both programs to get access
to the university network.

Uninstalling both Programs and restarting did resolve the issue. To find the
two offenders I used Process Explorer (Processes for all users) and used the
Find Handle or DLL functon with the search term "SCARD". All crosschecked all
Processes (except for scdaemon which sould access the card) and Services
(svchost) to be only scdaemon aswell as the services to be Windows internal.
To determine the inital issue I used
https://sourceforge.net/projects/pcsctracker/ which told me the status of my
Yubikey (as Present,InUse -> Shared Access).

As a suggestion I like to see the experimental option to change the accessmode
from exclusive to shared on the commandline (If for example the other
application cannot be uninstalled).

Dec 8 2016, 12:06 AM · Bug Report, Windows 64, scd, Windows, gnupg, Windows 32