pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security/netpgpverify/files netpgpverify: Update to 20...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1cd248100d6d
branches:  trunk
changeset: 370565:1cd248100d6d
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Thu Oct 19 08:23:21 2017 +0000

description:
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:

 security/netpgpverify/files/libverify.c |  13 +++++--------
 security/netpgpverify/files/verify.h    |   4 ++--
 2 files changed, 7 insertions(+), 10 deletions(-)

diffs (65 lines):

diff -r f2c03e2281c9 -r 1cd248100d6d security/netpgpverify/files/libverify.c
--- a/security/netpgpverify/files/libverify.c   Thu Oct 19 06:54:55 2017 +0000
+++ b/security/netpgpverify/files/libverify.c   Thu Oct 19 08:23:21 2017 +0000
@@ -2138,18 +2138,18 @@
        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 @@
        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 @@
                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 -r f2c03e2281c9 -r 1cd248100d6d security/netpgpverify/files/verify.h
--- a/security/netpgpverify/files/verify.h      Thu Oct 19 06:54:55 2017 +0000
+++ b/security/netpgpverify/files/verify.h      Thu Oct 19 08:23:21 2017 +0000
@@ -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>
 



Home | Main Index | Thread Index | Old Index