May 25 2023
secring.gpg is only used by unsupported legacy versions of GnuPG. Since 2.1 it is not anymore used.
May 24 2023
So if I have \MyDirectory\pubring.pgp and MyDirectory\secring.pgp files, how do I use the --homedir option to access those?
May 19 2023
This is not really what the issue here is talking about. This issue was about "merging" multiple keyrings into a single view. If I understand you correctly you want to have matching pubrings and secret key directories for different applications. That is fully covered and what many users do by setting GNUPGHOME through the environment, the --homedir option or the windows registry.
Did anything get implemented to handle this? We have a central network file share where we store our public and secret key rings. We have several different applications that access these key rings. I'm trying to convert one of them from using gpg.exe via the command line with the --keyring and --secret-keyring paramters to using gpgme, but I don't see a way to specify the keyrings. Any help would be appreciated.
Jul 8 2021
There is no point in questioning whether a couple of words change racism or any other human problems of these days. It will not.
Jul 7 2021
Sorry, this is not acceptable to me. <rant>You don't change racism by avoid words which are may be connected to racism. Master is a term used for example to indicate that a person is proficient in her profession. Slave is (in theory) a historic term to describe, well slaves. That is humans who are non-free and are not allowed to control their lives - like the majority of humans these days - they are just called different and the methods of suppression are different than in the past. In fact a Roman slave (but not a medieval bondsman) had well defined and esteemed rights not something the majority of US citizen with a dark skin has in practice. Term abolished, racism abolished, works as good as freeing the US slaves in the 1856, the 1960, or still today. It did not work. Mr. Kings hope has not yet realized itself and is now maybe farther away than we all had hoped in the second half of the last century. Don't cover facts by changing words used in a very different context.</rant>
Jul 27 2017
Jul 17 2017
gpgtools will have to update.
werner said this won't be fixed.
Jun 22 2017
If we will ever do this, then only in conjunction with appropriate continuous integration tools that report on new warnings and progress. Closing here.
Nobody started to hack on it in two years, and buried in this bug report nobody will find it. If this is still a desirable task, a new ticket should be opened.
May 9 2017
Well, this will be a different thing and more related to the to-be-implemented key origin feature.
I would thus suggest to open a new task for this.
I think we are talking "aneinander vorbei". AFAIK we agreed (on the Osnabrück meeting) that we will cater to this usecase: Multiple different keyrings for some operations. Or "curated" keyring. Through GPGK and so we will have some API (key probably not a keyring for a context) like this in GPGME at some point in the next years. This is why I think this issue might be kept open to say: Yes we see the usecase but we will not solve it by exposing, what you call a hack, through GPGME. But we will solve it at some point with a better solution.
May 8 2017
Back to you original problem: What you are trying to do is a hack to work around properties of GnuPG. Namely, that GnuPG stores its state in a _directory_ and you are modifying parts of this state (e.g. pubring.gpg). This is why GPGME allows you to switch to another directory but obviously does not allow you to modify parts of a directory (i.e. the state).
FWIW I strongly disagree with the sentiment that GPGME should be a "dumbed down" "Easy" GnuPG API. It should be GnuPG made stable -> A stable and reliable C API for the Free Software OpenPGP implementation GnuPG. But this is off topic. SCNR. It's much easier just to use process calls in many cases but I understand why this should not be done and leads to maintenance problems / bugs.
As discussed: The proper solution for this is GPGK, a Pubkey deaemon for GnuPG that would cater to audited / monitored keyrings. The usecase has not gone away and from my talks with people in the community and my general experience it is not "special" and definitely not "very special". It's important for Software Developers using GPGME that want to have keyrings for their Software Seperate from the general GnuPG user setup.
GPGME is about making GPG easy and not to cover very special use cases. I'll thus close this bug.
Mar 31 2017
Mar 30 2017
Mar 28 2017
Mar 22 2017
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 1 2017
Yes, it's the same issue.
Isn't this the same as T2975 ?
Feb 23 2017
Ok, thanks!
You need to wait for 1.8 - in a few weeks.
I looked at the required changes but decided not to backport that for 1.7.6.
Jan 6 2017
Jan 2 2017
Note that ff you have the secret key you can set the preferences.
Can't be fixed in 1.4 or 2.0. Has been fixed in 2.1.
Dec 9 2016
Nov 20 2016
Nov 14 2016
Regarding the original issue discussed here:
What about an option in gpg/gpgme to limit all operations to keys contained in a
"whitelist" file?
(accept --recipient keys only if they are contained in the file, --list-keys
shows only keys listed in this file, --refresh-keys only refreshes keys listed
here, etc.)
Reported the problem mentioned here in T2835
("keyid-format none" ignored for --verify and other commands)
(repost, I just noticed that neal is not in the nosy list. I'll unlink the old
entry afterwards)
neal: Interesting idea, this (or for a non-gui version: a signed list of
fingerprints available from a central source and retrieving those keys) would
solve 2 (iterating over all keys) and 3 (regularly update).
For the non-gui variant I wondered about how to use --verify and check that the
file was signed by the authority key (--verify only prints the keyid,
"--keyid-format none" does not allow --verify to print fingerprints in 2.1.15,
I'll file a separate issue). I was a bit disappointed when I saw that gpg sync
just calls the command line with --keyid-format 0xlong and does screen scraping
to verify the verification.
But still, how to solve 1 with gpg itself? Of course I could "manually" verify
in the application that only the intended keys have been used, but as shown with
gpg sync's code above: This is not always easily possible.
@thomas: You may want to look at gpg sync, which I think makes at least some of
what you want to do easier.
https://firstlook.org/code/2016/10/12/introducing-gpg-sync-an-open-source-tool-for-organizations-that-encrypt-email/
Sign the keys and set the signing key to fully trusted.
does not solve 1.:
Encrypt a file to any of those key (but no others!),
(because people may trust other keys)
and it does not solve 2. without keeping a separate list of keys/fingerprints:
Iterate over all keys
additionally _all_ users have to regularly update _all_ these keys, otherwise
things like expired subkeys will lead to failing encryption. (This is no theory:
We've been there and don't want to have this again)
Nov 11 2016
Sign the keys and set the signing key to fully trusted.
Nov 10 2016
Please tell me how I should model my workflows in this case:
- There is a a centrally managed set of public keys (currently in a keyring
file, but I'm open to suggestions)
- Different users should be able to use this set of keys (and no others) for
certain tasks:
- Encrypt a file to any of those key (but no others!), but also decrypt the
file with their secret key (which is not centrally managed)
- Iterate over all keys and do something with them (here: publish them in the
WKD after having made changes to the set of keys)
We try to deprecate the use of the --keyring option because that is too
troublesome for many reasons. We can't remove that option from gpg proper for
compatibilty reasons. But not adding a new feature to GPGME won't raise any
compatibility problem and thus we can fortunately reject this request.