The --allow-weak-digest-algos option is not available in my version of
GnuPG.
The --allow-weak-digest-algos option is not available in my version of
GnuPG.
You'll need GnuPG 1.x to verify old keys.
I'm having some minor issues with pgpverify. The primary issue is that
the gpg command executed is failing:
./bin/pgpverify -test < control.test
<SNIP>
gpg: invalid option "--allow-weak-digest-algos"
The --allow-weak-digest-algos option is not available in my version of
GnuPG. Apparently it was introduced in GnuPG 2.0.23, but CentOS/RHEL 7 installs 2.0.22.
When I remove --allow-weak-digest-algos from pgpverify it executes, but
I'm wondering whether this portion of the output is expected:
[GNUPG:] TRUST_UNDEFINED
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the
owner.
Jesse Rehmer <jesse.rehmer@blueworldhosting.com> writes:
When pgpverify 1.3.0 (with the --allow-weak-digest-algos option
removed) and installing the gnupg1 package, both the new and old style
keys are being verified:
So you still have to modify pgpverify with gpg1? Hm. I guess that
makes sense; both GnuPG implementations are too old to support the flag. Well, that's irritating, although I guess we already knew that was going
to be a problem on some hosts.
The right fix here is probably to make sure you have gpg1 installed (I'm think any vintage of Linux distro that has gpg v2 also has a gpg1
package), and then set GPG=/usr/bin/gpg1 (I think that will do it,
although not completely sure). You can also use an older version of pgpverify, but using gpg1 is probably simplest.
In general, right now you want to use gpg1 instead of gpg v2 to verify control messages since some control message issuers haven't updated their keys and produce signatures that the current versions of gpg v2 can't
verify at all.
When pgpverify 1.3.0 (with the --allow-weak-digest-algos option removed)
and installing the gnupg1 package, both the new and old style keys are
being verified:
Correct, if I don't remove that flag from pgpverify no matter what I try I end with:
gpg: invalid option "--allow-weak-digest-algos"
I can sympathize that this is not an easy solution for developers to work around given the large variation in "default" versions of GnuPG between distributions.
So you still have to modify pgpverify with gpg1? Hm. I guess that
makes sense; both GnuPG implementations are too old to support the flag.
Well, that's irritating, although I guess we already knew that was going
to be a problem on some hosts.
Oh, I see, you need to convince it to use gpgv and then I think it will
not pass that flag and might work. I'm not sure off-hand what the best
way to do that is. I think it only uses gpgv if it can't find gpg, so forcing that situation is a little tricky.
Jesse Rehmer <jesse.rehmer@blueworldhosting.com> writes:
Correct, if I don't remove that flag from pgpverify no matter what I try I >> end with:
gpg: invalid option "--allow-weak-digest-algos"
The thing to try would be to set $gpg to '' in INN::Config and make sure $gpgv points to the gpgv binary on your system. I bet that will work, but making it work automatically is harder. We'd have to somehow probe for whether gpg supported the option.
Correct, if I don't remove that flag from pgpverify no matter what I try I >> end with:
gpg: invalid option "--allow-weak-digest-algos"
The thing to try would be to set $gpg to '' in INN::Config and make sure $gpgv points to the gpgv binary on your system. I bet that will work, but making it work automatically is harder. We'd have to somehow probe for whether gpg supported the option.
gpg seems to check its arguments in order, and it exits with status 2 if
an argument is not supported. Why not just run:
gpg --allow-weak-digest-algos --version
If the option is supported, gpg displays several lines and exits
gracefully. Otherwise, it raises an error:
gpg: Invalid option "--allow-weak-digest-algos"
zsh: exit 2 gpg --allow-weak-digest-algos --version
I think it's safe to make the assumption that any version of GnuPG too old
to support that flag will still support the weak digest algorithms,
although I admit that while I researched this while updating PGP::Sign, I have now forgotten all of my conclusions other than the version bound I decided to adopt.
gpg seems to check its arguments in order, and it exits with status 2 if
an argument is not supported. Why not just run:
gpg --allow-weak-digest-algos --version
If the option is supported, gpg displays several lines and exits
gracefully. Otherwise, it raises an error:
gpg: Invalid option "--allow-weak-digest-algos"
zsh: exit 2 gpg --allow-weak-digest-algos --version
Thanks, yes, that was exactly the kind of thing I was hoping for but was
too groggy from travel to think through.
I wonder if we could do something like that in configure and pass down something to pgpverify via INN::Config to tell it whether or not to add
that flag. This will probably only be needed temporarily, but it looks
like we have at least one user who is going to run into that version
bound, so there will probably be more.
Would the following changes correspond to what you had in mind?
(the patch is not complete, but has the main logic)
I'll bump the version number of pgpverify to 1.31 if that's OK for you.
Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> writes:
Would the following changes correspond to what you had in mind?
(the patch is not complete, but has the main logic)
I'll bump the version number of pgpverify to 1.31 if that's OK for you.
Yup, this looks great, that's exactly the sort of thing I was thinking of. Thank you!
Following up on this (in the correct thread this time), I think it
should be better documented that to successfully process the majority of control articles and NoCeM notices you need GnuPG <2.1.0.
Following up on this (in the correct thread this time)
I think it
should be better documented that to successfully process the majority of control articles and NoCeM notices you need GnuPG <2.1.0.
To compound matters, there also exists a potential conflict of gpg/gpgv binaries and which versions of GnuPG they point to based on
OS/distribution if GnuPG 1.4.x and 2.x packages are installed at the
same time. In the case of CentOS vs FreeBSD with both GnuPG packages installed, CentOS's gpg and gpgv are symlinks to gpgv2 (so to get GnuPG
1.4 functionality I need to execute gpgv1), but on FreeBSD gpg and gpgv
are the v1 binary. Not sure if it is worth testing for this and
preferring the "gpg1" binary above all else?
This is already handled by INN at configure time. It checks for the
binary to use in the following order: gpg1, gpg, then gpg2.
So GnuPG 1.x will be selected, if present at configure time.
This is already handled by INN at configure time. It checks for the
binary to use in the following order: gpg1, gpg, then gpg2.
So GnuPG 1.x will be selected, if present at configure time.
Thank you, I forget many of these items are set from configure. Since initially I had only the gnupg2 package installed when I built INN, I understand I may need to re-configure/compile/update now.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 498 |
Nodes: | 16 (1 / 15) |
Uptime: | 67:47:06 |
Calls: | 9,814 |
Calls today: | 2 |
Files: | 13,755 |
Messages: | 6,189,352 |