Source-Changes-HG archive

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

[src/trunk]: src/crypto/external/bsd/netpgp/dist/src/netpgpverify Sync the sr...



details:   https://anonhg.NetBSD.org/src/rev/77a692447b3c
branches:  trunk
changeset: 335980:77a692447b3c
user:      agc <agc%NetBSD.org@localhost>
date:      Thu Feb 05 01:26:54 2015 +0000

description:
Sync the src version of netpgpverify with the version in pkgsrc

> ----------------------------
> revision 1.10
> date: 2015-02-04 16:58:02 -0800;  author: agc;  state: Exp;  lines: +1 -0;  commitid: 0v3HoBPFTnhDSK8y;
> appease compiler warning police - initialise a variable in case it's otherwise
> "used uninitialised". ride previous version bump.
> ----------------------------
> revision 1.9
> date: 2015-02-04 16:21:57 -0800;  author: agc;  state: Exp;  lines: +48 -21;  commitid: ElUADrlljB46GK8y;
> Update netpgpverify (and libnetpgpverify) to version 20150205
>
> + recognise signatures made by subkeys as well as by primary keys
>
> + print out the relevant key which signed the file, even if it's
> a subkey and not the primary key itself.
>
> + keep the same API as before
>
> with many thanks to Jonathan Perkin
> ----------------------------
> revision 1.8
> date: 2015-02-03 13:34:57 -0800;  author: agc;  state: Exp;  lines: +1 -3;  commitid: 6qTclEbv7hmZMB8y;
> Update netpgpverify, and libnetpgpverify, to 20150204
>
> + dump the huge output in testing script to /dev/null so that we can
> see what's happening with the other tests in testit.sh
>
> + fix from jperkin@, don't try to be clever when selecting the only
> key id in a keyring
>
> + add a test for single key (non-ssh) pubring
> ----------------------------
> revision 1.7
> date: 2015-02-03 13:13:17 -0800;  author: agc;  state: Exp;  lines: +3 -0;  commitid: ztXbqAi9ocXGFB8y;
> Update netpgpverify, and libnetpgpverify, to 20150203
>
> + portability fixes to make netpgpverify build on freebsd 10.1 with WARNS=5
>
> + fixed an oversight in the testit.sh script

diffstat:

 crypto/external/bsd/netpgp/dist/src/netpgpverify/1keypubring.gpg     |  Bin 
 crypto/external/bsd/netpgp/dist/src/netpgpverify/1keysecring.gpg     |  Bin 
 crypto/external/bsd/netpgp/dist/src/netpgpverify/1keytest.gpg.uu     |   86 ++++++++++
 crypto/external/bsd/netpgp/dist/src/netpgpverify/Makefile.bsd        |   10 +-
 crypto/external/bsd/netpgp/dist/src/netpgpverify/bzlib.c             |   12 +-
 crypto/external/bsd/netpgp/dist/src/netpgpverify/bzlib_private.h     |    6 +-
 crypto/external/bsd/netpgp/dist/src/netpgpverify/chk.sh              |    8 +-
 crypto/external/bsd/netpgp/dist/src/netpgpverify/digest-20121220.tgz |  Bin 
 crypto/external/bsd/netpgp/dist/src/netpgpverify/joyent-pubring.gpg  |  Bin 
 crypto/external/bsd/netpgp/dist/src/netpgpverify/libnetpgpverify.3   |    8 +-
 crypto/external/bsd/netpgp/dist/src/netpgpverify/libverify.c         |   75 ++++++--
 crypto/external/bsd/netpgp/dist/src/netpgpverify/mkdist              |   11 +
 crypto/external/bsd/netpgp/dist/src/netpgpverify/testit.sh           |   21 ++
 crypto/external/bsd/netpgp/dist/src/netpgpverify/verify.h            |    6 +-
 crypto/external/bsd/netpgp/dist/src/netpgpverify/zlib.c              |   28 +-
 15 files changed, 217 insertions(+), 54 deletions(-)

diffs (truncated from 650 to 300 lines):

diff -r 557a079a0b14 -r 77a692447b3c crypto/external/bsd/netpgp/dist/src/netpgpverify/1keypubring.gpg
Binary file crypto/external/bsd/netpgp/dist/src/netpgpverify/1keypubring.gpg has changed
diff -r 557a079a0b14 -r 77a692447b3c crypto/external/bsd/netpgp/dist/src/netpgpverify/1keysecring.gpg
Binary file crypto/external/bsd/netpgp/dist/src/netpgpverify/1keysecring.gpg has changed
diff -r 557a079a0b14 -r 77a692447b3c crypto/external/bsd/netpgp/dist/src/netpgpverify/1keytest.gpg.uu
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/netpgpverify/1keytest.gpg.uu  Thu Feb 05 01:26:54 2015 +0000
@@ -0,0 +1,86 @@
+begin 644 1keytest.gpg
+MQ`T#``@!;&)E`*V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@*@H@*B!42$E3(%-/1E1705)%
+M($E3(%!23U9)1$5$($)9(%1(12!.151"4T0@1D]53D1!5$E/3BP@24Y#+B!!
+M3D0@0T].5%))0E543U)3"B`J(&!@05,@25,G)R!!3D0@04Y9($584%)%4U,@
+M3U(@24U03$E%1"!705)204Y42453+"!)3D-,541)3D<L($)55"!.3U0@3$E-
+M251%1`H@*B!43RP@5$A%($E-4$Q)140@5T%24D%.5$E%4R!/1B!-15)#2$%.
+M5$%"24Q)5%D@04Y$($9)5$Y%4U,@1D]2($$@4$%25$E#54Q!4@H@*B!055)0
+M3U-%($%212!$25-#3$%)345$+B`@24X@3D\@159%3E0@4TA!3$P@5$A%($9/
+M54Y$051)3TX@3U(@0T].5%))0E543U)3"B`J($)%($Q)04),12!&3U(@04Y9
+M($1)4D5#5"P@24Y$25)%0U0L($E.0TE$14Y404PL(%-014-)04PL($5814U0
+M3$%262P@3U(*("H@0T].4T51545.5$E!3"!$04U!1T53("A)3D-,541)3D<L
+M($)55"!.3U0@3$E-251%1"!43RP@4%)/0U5214U%3E0@3T8*("H@4U5"4U1)
+M5%5412!'3T]$4R!/4B!315)624-%4SL@3$]34R!/1B!54T4L($1!5$$L($]2
+M(%!23T9)5%,[($]2($)54TE.15-3"B`J($E.5$524E505$E/3BD@2$]7159%
+M4B!#0553140@04Y$($].($%.62!42$5/4ED@3T8@3$E!0DE,2519+"!72$54
+M2$52($E."B`J($-/3E1204-4+"!35%))0U0@3$E!0DE,2519+"!/4B!43U)4
+M("A)3D-,541)3D<@3D5'3$E'14Y#12!/4B!/5$A%4E=)4T4I"B`J($%225-)
+M3D<@24X@04Y9(%=!62!/550@3T8@5$A%(%5312!/1B!42$E3(%-/1E1705)%
+M+"!%5D5.($E&($%$5DE3140@3T8@5$A%"B`J(%!/4U-)0DE,2519($]&(%-5
+M0T@@1$%-04=%+@H@*B\*(VEF;F1E9B!$14937TA?"B-D969I;F4@1$5&4U](
+M7PH*(VEN8VQU9&4@/'-Y<R]T>7!E<R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````)$&QB
+M90"MA22P``",=!``R2^C8"/Z(.]^N&Z\EI0D7OD:'ZCU!'UF5Y]7&[DR)G\'
+M0()`BLY[_^^=IL!XDWJV27+@.J_O)C#?OX5?C/=,6ERU)E-Z6879??U_%57[
+M#GZGRW)HO4D"'RF&XC`1_WM?]SHB'%S'^.%!W=SF.K\^+,P@%I<T\OEXC6L&
+M*>$9,ZZ)7&ZPS0'*9LS>BW"FH5EMYA!ZW8]*D%:F$J`6VR`>$Z</'`_C7KR>
+MH-$^_G+1].)F[.VWN2P=?1*GT_TG<'22PV'8X>M>'".JW)BZ"'!&0-/1=CZE
+M`[T@-*0@IZ";+?LQ8UOG"/8MHG:MO"+/$&H)Z,7/P\B9Y(BGO:>:EKK-<L)\
+M;^-D&1Q])%-><1,L?H6R(._?U3U88B-3)Y]<KK?9I![G*NN)@V62IISM8=:R
+MFI5Y\[_DPS40H$4RR"$6>*P?MQ&`+)S1YA)^/#5Q`/'2Z[4WP<MM"<E'0@3<
+M?@)S`Y@Y+HZ"=8M5!M1X/=E61^8#76UVD./*N#KN%+K\@F``YD)39=KU%_`T
+M*;<#>_BBN\8O-O@?D/!-B]3!5H;2%:.Q;\OTKC;3TWYL:L:T,_]@1`HL1#[F
+ML#H/G5N<Z&(QE4&.C(1"`:6PZC[F-?+BC,.3!9J+/X(9O&;>0SN#?.`)5Y_]
+=*CT.Q56883<>]E&=6=.!4%:1H5]1;`SHG5#'WD.+
+`
+end
diff -r 557a079a0b14 -r 77a692447b3c crypto/external/bsd/netpgp/dist/src/netpgpverify/Makefile.bsd
--- a/crypto/external/bsd/netpgp/dist/src/netpgpverify/Makefile.bsd     Wed Feb 04 14:23:18 2015 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/netpgpverify/Makefile.bsd     Thu Feb 05 01:26:54 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.bsd,v 1.3 2015/01/30 18:58:59 agc Exp $
+# $NetBSD: Makefile.bsd,v 1.4 2015/02/05 01:26:54 agc Exp $
 
 PROG=netpgpverify
 
@@ -34,6 +34,12 @@
        @echo "expected failure, no valid key for verification"
        -./${PROG} -k /dev/null NetBSD-6.0_RC1_hashes.gpg
        @echo "dumping now"
-       ./${PROG} -c dump -k pubring.gpg NetBSD-6.0_RC1_hashes.asc
+       ./${PROG} -c dump -k pubring.gpg NetBSD-6.0_RC1_hashes.asc > /dev/null
        @echo "dumping ssh now"
        ./${PROG} -c dump -S sshtest-20140202.pub data.gpg
+       @echo "testing pubring with one key"
+       uudecode 1keytest.gpg.uu
+       ./${PROG} -k 1keypubring.gpg 1keytest.gpg
+       rm -f 1keytest.gpg
+       @echo "testing signing with a subkey"
+       ./chk.sh -k joyent-pubring.gpg digest-20121220.tgz
diff -r 557a079a0b14 -r 77a692447b3c crypto/external/bsd/netpgp/dist/src/netpgpverify/bzlib.c
--- a/crypto/external/bsd/netpgp/dist/src/netpgpverify/bzlib.c  Wed Feb 04 14:23:18 2015 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/netpgpverify/bzlib.c  Thu Feb 05 01:26:54 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bzlib.c,v 1.2 2014/03/09 07:01:42 christos Exp $       */
+/*     $NetBSD: bzlib.c,v 1.3 2015/02/05 01:26:54 agc Exp $    */
 
 
 /*-------------------------------------------------------------*/
@@ -35,7 +35,7 @@
 #include "bzlib_private.h"
 
 
-/*     $NetBSD: bzlib.c,v 1.2 2014/03/09 07:01:42 christos Exp $       */
+/*     $NetBSD: bzlib.c,v 1.3 2015/02/05 01:26:54 agc Exp $    */
 
 
 /*-------------------------------------------------------------*/
@@ -930,7 +930,7 @@
    int    smallMode     = 0;
    int    nUnused       = 0; 
 
-   __USE(blockSize100k);
+   USE_ARG(blockSize100k);
 
    if (mode == NULL) return NULL;
    while (*mode) {
@@ -1082,7 +1082,7 @@
 /*-------------------------------------------------------------*/
 /*--- end                                           bzlib.c ---*/
 /*-------------------------------------------------------------*/
-/*     $NetBSD: bzlib.c,v 1.2 2014/03/09 07:01:42 christos Exp $       */
+/*     $NetBSD: bzlib.c,v 1.3 2015/02/05 01:26:54 agc Exp $    */
 
 
 /*-------------------------------------------------------------*/
@@ -1728,7 +1728,7 @@
 /*-------------------------------------------------------------*/
 /*--- end                                      decompress.c ---*/
 /*-------------------------------------------------------------*/
-/*     $NetBSD: bzlib.c,v 1.2 2014/03/09 07:01:42 christos Exp $       */
+/*     $NetBSD: bzlib.c,v 1.3 2015/02/05 01:26:54 agc Exp $    */
 
 
 /*-------------------------------------------------------------*/
@@ -1832,7 +1832,7 @@
 /*-------------------------------------------------------------*/
 /*--- end                                        crctable.c ---*/
 /*-------------------------------------------------------------*/
-/*     $NetBSD: bzlib.c,v 1.2 2014/03/09 07:01:42 christos Exp $       */
+/*     $NetBSD: bzlib.c,v 1.3 2015/02/05 01:26:54 agc Exp $    */
 
 
 /*-------------------------------------------------------------*/
diff -r 557a079a0b14 -r 77a692447b3c crypto/external/bsd/netpgp/dist/src/netpgpverify/bzlib_private.h
--- a/crypto/external/bsd/netpgp/dist/src/netpgpverify/bzlib_private.h  Wed Feb 04 14:23:18 2015 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/netpgpverify/bzlib_private.h  Thu Feb 05 01:26:54 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bzlib_private.h,v 1.2 2014/03/11 17:20:23 joerg Exp $  */
+/*     $NetBSD: bzlib_private.h,v 1.3 2015/02/05 01:26:54 agc Exp $    */
 
 
 /*-------------------------------------------------------------*/
@@ -57,6 +57,10 @@
 
 #ifndef BZ_NO_STDIO
 
+#ifndef __dead
+#define __dead
+#endif
+
 void BZ2_bz__AssertH__fail ( int errcode ) __dead;
 #define AssertH(cond,errcode) \
    { if (!(cond)) BZ2_bz__AssertH__fail ( errcode ); }
diff -r 557a079a0b14 -r 77a692447b3c crypto/external/bsd/netpgp/dist/src/netpgpverify/chk.sh
--- a/crypto/external/bsd/netpgp/dist/src/netpgpverify/chk.sh   Wed Feb 04 14:23:18 2015 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/netpgpverify/chk.sh   Thu Feb 05 01:26:54 2015 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: chk.sh,v 1.2 2015/01/30 18:58:59 agc Exp $
+# $NetBSD: chk.sh,v 1.3 2015/02/05 01:26:54 agc Exp $
 
 # Copyright (c) 2013,2014,2015 Alistair Crooks <agc%NetBSD.org@localhost>
 # All rights reserved.
@@ -35,9 +35,11 @@
 osrev=6
 arch=amd64
 pkgsrc=pkgsrc-2013Q1
+keyring=pubring.gpg
 while [ $# -gt 0 ]; do
        case "$1" in
        --arch|-a)      arch=$2; shift ;;
+       --keyring|-k)   keyring=$2; shift ;;
        --os|-o)        os=$2; shift ;;
        --pkgsrc)       pkgsrc=$2; shift ;;
        -v)             set -x ;;
@@ -95,13 +97,13 @@
 if [ -x /usr/bin/netpgpverify -o -x /usr/pkg/bin/netpgpverify ]; then
        echo "=== Using netpgpverify to verify the package signature ==="
        # check the signature in +PKG_GPG_SIGNATURE
-       cp ${here}/pubring.pub ${dir}/pubring.gpg
+       cp ${keyring} ${dir}/pubring.gpg
        # calculate the sig file we want to verify
        echo "-----BEGIN PGP SIGNED MESSAGE-----" > ${dir}/${name}.sig
        echo "Hash: ${digest}" >> ${dir}/${name}.sig
        echo "" >> ${dir}/${name}.sig
        cat ${dir}/+PKG_HASH ${dir}/+PKG_GPG_SIGNATURE >> ${dir}/${name}.sig
-       (cd ${dir} && netpgpverify -k pubring.gpg ${name}.sig) || die "Bad signature"
+       (cd ${dir} && ${here}/netpgpverify -k pubring.gpg ${name}.sig) || die "Bad signature"
 else
        echo "=== Using gpg to verify the package signature ==="
        gpg --recv --keyserver pgp.mit.edu 0x6F3AF5E2
diff -r 557a079a0b14 -r 77a692447b3c crypto/external/bsd/netpgp/dist/src/netpgpverify/digest-20121220.tgz
Binary file crypto/external/bsd/netpgp/dist/src/netpgpverify/digest-20121220.tgz has changed
diff -r 557a079a0b14 -r 77a692447b3c crypto/external/bsd/netpgp/dist/src/netpgpverify/joyent-pubring.gpg
Binary file crypto/external/bsd/netpgp/dist/src/netpgpverify/joyent-pubring.gpg has changed
diff -r 557a079a0b14 -r 77a692447b3c crypto/external/bsd/netpgp/dist/src/netpgpverify/libnetpgpverify.3
--- a/crypto/external/bsd/netpgp/dist/src/netpgpverify/libnetpgpverify.3        Wed Feb 04 14:23:18 2015 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/netpgpverify/libnetpgpverify.3        Thu Feb 05 01:26:54 2015 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: libnetpgpverify.3,v 1.2 2014/12/05 04:42:36 agc Exp $
+.\" $NetBSD: libnetpgpverify.3,v 1.3 2015/02/05 01:26:54 agc Exp $
 .\"
 .\" Copyright (c) 2014 Alistair Crooks <agc%NetBSD.org@localhost>
 .\" All rights reserved.
@@ -23,7 +23,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd December 4, 2014
+.Dd January 15, 2015
 .Dt LIBNETPGPVERIFY 3
 .Os
 .Sh NAME
@@ -54,6 +54,10 @@
 .Fa "pgpv_cursor_t *cursor" "size_t element"
 .Fc
 .Ft size_t
+.Fo pgpv_dump
+.Fa "pgpv_t *pgp" "char **data"
+.Fc
+.Ft size_t
 .Fo pgpv_get_entry
 .Fa "pgpv_t *pgp" "unsigned ent" "char **ret" "const char *modifiers"
 .Fc
diff -r 557a079a0b14 -r 77a692447b3c crypto/external/bsd/netpgp/dist/src/netpgpverify/libverify.c
--- a/crypto/external/bsd/netpgp/dist/src/netpgpverify/libverify.c      Wed Feb 04 14:23:18 2015 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/netpgpverify/libverify.c      Thu Feb 05 01:26:54 2015 +0000
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2012 Alistair Crooks <agc%NetBSD.org@localhost>
+ * Copyright (c) 2012,2013,2014,2015 Alistair Crooks <agc%NetBSD.org@localhost>
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -1473,14 +1473,16 @@
 
 /* print a primary key, per RFC 4880 */
 static size_t
-fmt_primary(char *s, size_t size, pgpv_primarykey_t *primary, const char *modifiers)
+fmt_primary(char *s, size_t size, pgpv_primarykey_t *primary, unsigned subkey, const char *modifiers)
 {
        pgpv_signed_userid_t    *userid;
+       pgpv_pubkey_t           *pubkey;
        unsigned                 i;
        unsigned                 j;
        size_t                   cc;
 
-       cc = fmt_pubkey(s, size, &primary->primary, "signature    ");
+       pubkey = (subkey == 0) ? &primary->primary : &ARRAY_ELEMENT(primary->signed_subkeys, subkey - 1).subkey;
+       cc = fmt_pubkey(s, size, pubkey, "signature    ");
        cc += fmt_userid(&s[cc], size - cc, primary, primary->primary_userid);
        for (i = 0 ; i < ARRAY_COUNT(primary->signed_userids) ; i++) {
                if (i != primary->primary_userid) {
@@ -2190,6 +2192,7 @@
 {
        uint32_t         len;
 
+       USE_ARG(header);
        (void) bufgap_getbin(bg, &len, sizeof(len));
        len = pgp_ntoh32(len);
        (void) bufgap_seek(bg, sizeof(len), BGFromHere, BGByte);



Home | Main Index | Thread Index | Old Index