pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/security/netpgpverify/files Update netpgpverify and li...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8259e2aa9a88
branches:  trunk
changeset: 349377:8259e2aa9a88
user:      agc <agc%pkgsrc.org@localhost>
date:      Tue Jul 05 23:56:07 2016 +0000

description:
Update netpgpverify and libnetpgpverify to 20160704

+ get rid of redundant PGPV_ARRAY definition in libverify.c, brought in when
the definitions moved from verify.h

+ fix obuf_add_mem() to use a const void *, as any struct can be
dumped using it

+ remove redundant NO_SUBKEYS definition - unused

+ add an (unused as yet) ARRAY_FREE() macro

diffstat:

 security/netpgpverify/files/array.h     |   2 ++
 security/netpgpverify/files/libverify.c |  15 +++------------
 security/netpgpverify/files/verify.h    |   4 ++--
 3 files changed, 7 insertions(+), 14 deletions(-)

diffs (78 lines):

diff -r c15d7ce70daf -r 8259e2aa9a88 security/netpgpverify/files/array.h
--- a/security/netpgpverify/files/array.h       Tue Jul 05 20:24:12 2016 +0000
+++ b/security/netpgpverify/files/array.h       Tue Jul 05 23:56:07 2016 +0000
@@ -67,6 +67,8 @@
 #define ARRAY_SIZE(name)               name##vsize
 #define ARRAY_ARRAY(name)              name##s
 
+#define ARRAY_FREE(name)               free(name##s)
+
 #define ARRAY_APPEND(name, newel) do {                                 \
        ARRAY_EXPAND(name);                                             \
        ARRAY_COUNT(name) += 1;                                         \
diff -r c15d7ce70daf -r 8259e2aa9a88 security/netpgpverify/files/libverify.c
--- a/security/netpgpverify/files/libverify.c   Tue Jul 05 20:24:12 2016 +0000
+++ b/security/netpgpverify/files/libverify.c   Tue Jul 05 23:56:07 2016 +0000
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2012,2013,2014,2015 Alistair Crooks <agc%NetBSD.org@localhost>
+ * Copyright (c) 2012,2013,2014,2015,2016 Alistair Crooks <agc%NetBSD.org@localhost>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -53,13 +53,6 @@
 #include "rsa.h"
 #include "verify.h"
 
-#ifndef PGPV_ARRAY
-/* creates 2 unsigned vars called "name"c and "name"size in current scope */
-/* also creates an array called "name"s in current scope */
-#define PGPV_ARRAY(type, name)                                         \
-       unsigned name##c; unsigned name##vsize; type *name##s
-#endif
-
 /* 64bit key ids */
 #define PGPV_KEYID_LEN         8
 #define PGPV_STR_KEYID_LEN     (PGPV_KEYID_LEN + PGPV_KEYID_LEN + 1)
@@ -433,7 +426,7 @@
 
 /* add a fixed-length area of memory */
 static int
-obuf_add_mem(obuf_t *obuf, const char *s, size_t len)
+obuf_add_mem(obuf_t *obuf, const void *s, size_t len)
 {
        if (obuf && s && len > 0) {
                if (!growbuf(obuf, len)) {
@@ -2838,7 +2831,7 @@
 int
 pgpv_close(pgpv_t *pgp)
 {
-       unsigned        i;
+       unsigned         i;
 
        if (pgp == NULL) {
                return 0;
@@ -2851,8 +2844,6 @@
        return 1;
 }
 
-#define NO_SUBKEYS     0
-
 /* return the formatted entry for the primary key desired */
 size_t
 pgpv_get_entry(pgpv_t *pgp, unsigned ent, char **s, const char *modifiers)
diff -r c15d7ce70daf -r 8259e2aa9a88 security/netpgpverify/files/verify.h
--- a/security/netpgpverify/files/verify.h      Tue Jul 05 20:24:12 2016 +0000
+++ b/security/netpgpverify/files/verify.h      Tue Jul 05 23:56:07 2016 +0000
@@ -23,9 +23,9 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #ifndef NETPGP_VERIFY_H_
-#define NETPGP_VERIFY_H_       20160626
+#define NETPGP_VERIFY_H_       20160704
 
-#define NETPGPVERIFY_VERSION   "netpgpverify portable 20160626"
+#define NETPGPVERIFY_VERSION   "netpgpverify portable 20160704"
 
 #include <sys/types.h>
 



Home | Main Index | Thread Index | Old Index