I'm not sure why a special case should be needed -- failure to create
the .kbx should not be a failure for a decryption operation in general.
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Advanced Search
Nov 13 2017
Nov 7 2017
I built gnupg 2.2.1 with the patch from D450, but that didn't help.
I even got an additional error:
Yes, it will be in 2.2.3. It's too late for 2.2.2.
So is 380bce13d94f the correct fix? If so, I will update the OpenBSD port including this as a local patch.
I believe this is due to the bug of gpg-agent. So, I put this report as a sub task under T3276: the calibrate_get_time() function depends on a system that has a non-tickless kernel.
This is a bug in gpg-agent.
Could you please testing gpgme with D450: clock_gettime if CLOCK_THREAD_CPUTIME_ID is available. for GnuPG?
Nov 6 2017
I confirm that applying the patch fixes the hang under a VM, and does not adversely affect running on a bare metal machine either.
Could you please try D450: clock_gettime if CLOCK_THREAD_CPUTIME_ID is available. patch of GnuPG?
Nov 1 2017
What do you think about a special case for the homedir "/dev/null" ? We use this device as a specila value at other places too. I have often seen "/nonexistent" in /etc/passwd but there is no standard for this. However, /dev/null is well defined.
Oct 29 2017
Oh sorry i mixed my explanation. I create a normal encrypted file with gpg --encrypt and this file can be decrypted successfully with "gpg -d".
But if I give that encrypted file to gpgme i get the described error, instead of GpgME::Error(0 (Success))).
Oct 28 2017
Here are a couple of traces of the hanging t-protect test under the VM. I just let it run for a bit under gdb and pressed ctrl+c on a couple of occasions:
I've been experimenting.
agreed, generically changing this check to log_info doesn't make sense. However, in *this circumstance*, gpg actually has no error.
Oct 27 2017
"gpg -d" decrypts data why do you think you can decrypt or verify it again?
$ gpg --homedir /notexistent -dv <1.msg --override-session-key 7:D6E1027D58A0CB047C41EA881A137197 --status-fd 2 gpg: keyblock resource '/notexistent/pubring.kbx': No such file or directory [GNUPG:] ERROR add_keyblock_resource 33587281 gpg: public key is 7F3B7ED4319BCCA8 [GNUPG:] ENC_TO 7F3B7ED4319BCCA8 18 0 [GNUPG:] ERROR keydb_search 33554445 gpg: encrypted with ECDH key, ID 7F3B7ED4319BCCA8
Indeed, this makes gpg return 2. The reason is that the first error message uses log_error which sets a flag to have gpg return 2. Now, changing this to log_info may produce problems for applications which expect that gpg errors out for a bad homedir.
can you try it with --homedir /does/not/exist
Oct 26 2017
Thanks for the list
Here is the list:
- libgcrypt
- libassuan
- ntbtls
- gpgme : autogen.sh is ready
- npth
Oct 24 2017
Just tried this but can't replicate it:
$ ../g10/gpg -dv <1.msg --override-session-key 7:D6E1027D58A0CB047C41EA881A137197 --status-fd 2 gpg: public key is 7F3B7ED4319BCCA8 [GNUPG:] ENC_TO 7F3B7ED4319BCCA8 18 0 gpg: encrypted with ECDH key, ID 7F3B7ED4319BCCA8 [GNUPG:] BEGIN_DECRYPTION gpg: AES encrypted data [GNUPG:] DECRYPTION_INFO 2 7 gpg: original file name='' [GNUPG:] PLAINTEXT 62 1508859245 [GNUPG:] PLAINTEXT_LENGTH 68 "Well hello there Charlie Brown, you blockhead." -- Lucy Van Pelt [GNUPG:] DECRYPTION_OKAY [GNUPG:] GOODMDC [GNUPG:] END_DECRYPTION $ echo $? 0 $ gpg -k 7F3B7ED4319BCCA8 gpg: error reading key: No public key
gpgme does not known about return codes because it uses a double fork approach. However, certain staus lines could have the same effect.
Hm, perhaps this non-zero return code is due to not being able to write to the GNUPGHOME directory, actually. It goes away when GNUPGHOME is writable. That doesn't make sense either -- this operation doesn't actually depend on being able to write to GNUPGHOME, so it shouldn't return a different error code if GNUPGHOME is unwritable.
Oct 20 2017
gpgme shall provide an interface for commonly required tasks but it shall not expose everything from gpg.
Oct 19 2017
I guess it depends on whether you want gpgme to be an interface to OpenPGP certificates more generally (in which case, exposing the primary flag would be useful), or just a gpg frontend (in which case, the current behavior might be ok)
Right, but gpg has a strategy to figure out what it considers the primary (ie. the user id commonly printed). If we would merely convey the primary key flag to gpgme, gpgme or the gpgme calling application still needs to figure out what it considers the primary key - that might be different from what gpg shows.
Oct 17 2017
But there can be several user IDs that are marked primary, right? I know that gpg tries to not let that happen, but there are other OpenPGP toolkits out there, and composite/hybridized keys, etc where this could happen.
Oct 16 2017
Well, it is already there:
gpg always returns the primary user id first. (see gnupg/g10.keylist.org:reorder_keyblock). gpgme keeps this order and thus the first user +id in the linked list is the primary user id. If the primary user id flag is not set the first is the same what gpg considers the primary user id. I can add this to the documentation.
Oct 15 2017
Oct 4 2017
No. GPGME can't check return codes because it uses a double fork approach.
Sep 19 2017
This is more or less what gpgme does/sees when loopback mode is enabled / disabled:
Sep 12 2017
Sep 8 2017
Aug 29 2017
In T2919#102889, @stbuehler wrote:I think bad.trace is very similar in the errors (chan_9 instead of chan_7); the difference is probably that the "bad mail" is not using a detached signature (possibly even encrypted), so mutt cannot find the body without actually decoding the message through gpgsm; the "good mail " is using a detached signature, and the body is the first part of a multi-part message which mutt can decode itself; it still can't verify the signature.
Do you have the specs for getenv_r? I can't find such a thing on FreeBSD or Debian
I think bad.trace is very similar in the errors (chan_9 instead of chan_7); the difference is probably that the "bad mail" is not using a detached signature (possibly even encrypted), so mutt cannot find the body without actually decoding the message through gpgsm; the "good mail " is using a detached signature, and the body is the first part of a multi-part message which mutt can decode itself; it still can't verify the signature.
Sure. Here's the stdout and stderr for gpgme-1.9 with GPGME_DEBUG=9 and
In T2919#102001, @stbuehler wrote:I just had a look at good.trace and it seems gpgsm --server exits instantly (chan_7 <- [eof]). The path seems to be correct though (/usr/pkg/bin/gpgsm), and /usr/pkg/bin/gpgsm --version reads (the first 79 bytes):
gpgsm (GnuPG) 2.1.18 libgcrypt 1.7.6 libksba 1.3.5 Copyright (C) 2017 Free SoftThe --version call passes the full path in argv[0] (but the full path is always passed as first argument to execv, so it shouldn't make a difference).
Sadly it seems there is no error message from gpgsm, and also the exit code isn't shown. Maybe you could try running gpgsm --server manually; it should greet you with OK GNU Privacy Guard's S/M server * ready. An strace log might provide more insight why gpgsm --server fails.
Aug 24 2017
Please see my comments on rM9f24e6c9010e171fd11c5cdac797cb8ce2e501dd
Aug 23 2017
I would suggest that MUAs who care about privacy do no use S/MIME at all or at least direct GPGME to not consider CRLs during signature verification. We don't have such a feature in GPGME right now but I think that is the right place to add it. X.509 is way to complicated to avoid meta data leaks.
Aug 21 2017
So it fails after a timeout. Which probably means that the conf->sync calls timeout which probably means that some gpgme process call to gpgconf hangs. Maybe some IO Flush that does not happen correctly on MIPS. But this is pure guessing.
Unfortunately, even building for two Python versions is a bit of a hassle with the existing autoconf framework for Python. I did that when porting the Python bindings back to Python2 after we decided to also support 2 so that people could start to use our bindings even if they still need Python2. I don't see us extending it for more versions.
Merged, thanks for the reminder.
Aug 18 2017
this is also https://bugs.debian.org/866555
Aug 17 2017
Aug 16 2017
I guess for older releases it is less relevant to have very accurate version information. From now on this is more a regular maintenance task than a unit of work, so I am closing it.
Gave it a head-start.
This is probably broken since Werner enabled descriptor passing by default in 5090f6f24. The analysis in https://dev.gnupg.org/T2919#99901 is correct, but it's not enough to put the operational error in the right place. Also, the calls to _gpgme_wait_one have to be replaced by _gpgme_wait_one_ext. The change overall will be somewhat destabilizing.
Aug 15 2017
Now you can do this:
gpgme_data_t are first class objects with an API to create and destroy them, and some articulated rules how to use them (only one thread at a time). gpgme_key_t objects can not be created but only be returned with gpgme_op_keylist_next.
It wasn't a natural thing to do gpgme_op_import because i already had my gpgme_key_t object, which i was using to display an index of available keys to the user.
Aug 12 2017
One way to prevent this mechanically would be to store an identifier for the gpgme_ctx_t object from which the gpgme_key_t object came inside the gpgme_key_t object itself, and then verifying that the keys really came from the same context. But such edge cases seem to be quite rare, and I'd hope that most developers make a tacit assumption that objects stemming from a specific context can not be repurposed in a different context ad lib.
Why wasn't the natural thing for you to do gpgme_op_import?
Aug 11 2017
I'm not sure i understand why i'm "chasing a ghost" -- i'm reporting the experience of a developer (me!) who tried to use gpgme, read all the docs, and was still surprised and dismayed by the metadata leakage.
This should be fixed by a0cc6e01. Just use the new gpgme_op_delete_ext operation with GPGME_DELETE_FORCE flag.
Turns out that 2963 fixed this at the same time.
You are chasing a bit of a ghost there. The operation was originally added for GPGSM to support the IMPORT --re-import command that removes the ephemeral flags from certificates that were previously imported as a side-effect of an external keylist operation. That's where the footnote comes from.
Thanks for the improvements, Marcus!
Aug 10 2017
Well, we need more information to proceed on this. Maybe run with GPGME_DEBUG=9 to see why it fails.
Most of your concerns seem to come from the "move keys" wording, which I removed. I also fixed the return values. The footnote is specific to X.509 peculiars.
Done in 274609ba.