diff options
author | jperkin <jperkin@pkgsrc.org> | 2017-10-19 08:23:21 +0000 |
---|---|---|
committer | jperkin <jperkin@pkgsrc.org> | 2017-10-19 08:23:21 +0000 |
commit | 34d1f183f12ffcbc89d2bf492cad903c3f841f4e (patch) | |
tree | 090168c22d12b7d3d6f3c9d69aad16a3746c8a73 /security/netpgpverify | |
parent | 658ec98a23e911fe1f038fb8d3bb3ec566a3e675 (diff) | |
download | pkgsrc-34d1f183f12ffcbc89d2bf492cad903c3f841f4e.tar.gz |
netpgpverify: Update to 20171019.
Changes since 20170201:
+ Don't overwrite error messages generated by time checks, now the correct
error is printed instead of the generic "Signature does not match".
+ Remove extraneous newlines from time check errors.
Ok'd agc@
Diffstat (limited to 'security/netpgpverify')
-rw-r--r-- | security/netpgpverify/files/libverify.c | 13 | ||||
-rw-r--r-- | security/netpgpverify/files/verify.h | 4 |
2 files changed, 7 insertions, 10 deletions
diff --git a/security/netpgpverify/files/libverify.c b/security/netpgpverify/files/libverify.c index cd98aa75ed7..5e32df86694 100644 --- a/security/netpgpverify/files/libverify.c +++ b/security/netpgpverify/files/libverify.c @@ -2138,18 +2138,18 @@ valid_dates(pgpv_signature_t *signature, pgpv_pubkey_t *pubkey, char *buf, size_ cc = 0; if (signature->birth < pubkey->birth) { TIME_SNPRINTF(cc, buf, size, "Signature time (%.24s) was before pubkey creation ", signature->birth); - TIME_SNPRINTF(cc, &buf[cc], size - cc, "(%s)\n", pubkey->birth); + TIME_SNPRINTF(cc, &buf[cc], size - cc, "(%s)", pubkey->birth); return cc; } now = time(NULL); if (signature->expiry != 0) { if ((t = signature->birth + signature->expiry) < now) { - TIME_SNPRINTF(cc, buf, size, "Signature expired on %.24s\n", t); + TIME_SNPRINTF(cc, buf, size, "Signature expired on %.24s", t); return cc; } } if (now < signature->birth) { - TIME_SNPRINTF(cc, buf, size, "Signature not valid before %.24s\n", signature->birth); + TIME_SNPRINTF(cc, buf, size, "Signature not valid before %.24s", signature->birth); return cc; } return 0; @@ -2167,12 +2167,12 @@ key_expired(pgpv_pubkey_t *pubkey, char *buf, size_t size) cc = 0; if (pubkey->expiry != 0) { if ((t = pubkey->birth + pubkey->expiry) < now) { - TIME_SNPRINTF(cc, buf, size, "Pubkey expired on %.24s\n", t); + TIME_SNPRINTF(cc, buf, size, "Pubkey expired on %.24s", t); return (int)cc; } } if (now < pubkey->birth) { - TIME_SNPRINTF(cc, buf, size, "Pubkey not valid before %.24s\n", pubkey->birth); + TIME_SNPRINTF(cc, buf, size, "Pubkey not valid before %.24s", pubkey->birth); return (int)cc; } return 0; @@ -3222,9 +3222,6 @@ pgpv_verify(pgpv_cursor_t *cursor, pgpv_t *pgp, const void *p, ssize_t size) return 0; } if (!match_sig_id(cursor, pgp, signature, litdata, (unsigned)j, sub)) { - snprintf(cursor->why, sizeof(cursor->why), - "Signature does not match %.*s", - (int)obuf.c, (char *)obuf.v); return 0; } ARRAY_APPEND(cursor->datacookies, pkt); diff --git a/security/netpgpverify/files/verify.h b/security/netpgpverify/files/verify.h index 58e5b1a5b47..48c7f0c6cfa 100644 --- a/security/netpgpverify/files/verify.h +++ b/security/netpgpverify/files/verify.h @@ -23,9 +23,9 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef NETPGP_VERIFY_H_ -#define NETPGP_VERIFY_H_ 20170201 +#define NETPGP_VERIFY_H_ 20171019 -#define NETPGPVERIFY_VERSION "netpgpverify portable 20170201" +#define NETPGPVERIFY_VERSION "netpgpverify portable 20171019" #include <sys/types.h> |