CVS commit: src/crypto/external/bsd/netpgp/dist/src/libverify
Module Name:src Committed By: agc Date: Tue Mar 4 17:29:06 UTC 2014 Modified Files: src/crypto/external/bsd/netpgp/dist/src/libverify: libverify.c Log Message: check the correct field in the structure in dsa_verify - pointed out by joerg - thanks! To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 \ src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c diff -u src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c:1.8 src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c:1.9 --- src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c:1.8 Fri Feb 21 01:55:10 2014 +++ src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c Tue Mar 4 17:29:06 2014 @@ -1609,7 +1609,9 @@ verify_dsa_sig(uint8_t *calculated, unsi BIGNUM *t1; int ret; - if (pubkey[DSA_P].bn == NULL || pubkey[DSA_Q].bn == NULL || pubkey[DSA_G].bn == NULL) { + if (pubkey-bn[DSA_P].bn == NULL || + pubkey-bn[DSA_Q].bn == NULL || + pubkey-bn[DSA_G].bn == NULL) { return 0; } M = W = t1 = NULL;
CVS commit: src/crypto/external/bsd/netpgp/dist/src/libverify
Module Name:src Committed By: agc Date: Tue Mar 4 17:29:06 UTC 2014 Modified Files: src/crypto/external/bsd/netpgp/dist/src/libverify: libverify.c Log Message: check the correct field in the structure in dsa_verify - pointed out by joerg - thanks! To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 \ src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/crypto/external/bsd/netpgp/dist/src/libverify
Module Name:src Committed By: joerg Date: Mon Jan 6 22:59:10 UTC 2014 Modified Files: src/crypto/external/bsd/netpgp/dist/src/libverify: libverify.c Log Message: Move __printflike to the prototype. Add explicit cast for void * - char * to make GCC happy. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c diff -u src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c:1.5 src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c:1.6 --- src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c:1.5 Mon Jan 6 21:15:15 2014 +++ src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c Mon Jan 6 22:59:10 2014 @@ -145,7 +145,8 @@ /* Forward declarations */ static int read_all_packets(pgpv_t */*pgp*/, pgpv_mem_t */*mem*/, const char */*op*/); -static int read_binary_file(pgpv_t */*pgp*/, const char */*op*/, const char */*fmt*/, ...); +static int read_binary_file(pgpv_t */*pgp*/, const char */*op*/, const char */*fmt*/, ...) +__printflike(3, 4); static int read_binary_memory(pgpv_t */*pgp*/, const char */*op*/, const void */*memory*/, size_t /*size*/); static int pgpv_find_keyid(pgpv_t */*pgp*/, const char */*strkeyid*/, uint8_t */*keyid*/); @@ -2046,7 +2047,7 @@ read_all_packets(pgpv_t *pgp, pgpv_mem_t } /* create a filename, read it, and then parse according to op */ -__printflike(3, 4) static int +static int read_binary_file(pgpv_t *pgp, const char *op, const char *fmt, ...) { va_list args; @@ -2335,7 +2336,7 @@ pgpv_read_pubring(pgpv_t *pgp, const voi if (keyring) { return (size 0) ? read_binary_memory(pgp, pubring, keyring, (size_t)size) : - read_binary_file(pgp, pubring, %s, keyring); + read_binary_file(pgp, pubring, %s, (const char *)keyring); } return read_binary_file(pgp, pubring, %s/%s, nonnull_getenv(HOME), .gnupg/pubring.gpg); }
CVS commit: src/crypto/external/bsd/netpgp/dist/src/libverify
Module Name:src Committed By: htodd Date: Mon Jan 6 23:23:10 UTC 2014 Modified Files: src/crypto/external/bsd/netpgp/dist/src/libverify: libverify.c Log Message: Fix build (cast to const char *). To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c diff -u src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c:1.6 src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c:1.7 --- src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c:1.6 Mon Jan 6 22:59:10 2014 +++ src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c Mon Jan 6 23:23:10 2014 @@ -1880,7 +1880,7 @@ setup_data(pgpv_cursor_t *cursor, pgpv_t if (is_armored(buf, sizeof(buf))) { read_ascii_armor_file(cursor, p); } else { - read_binary_file(pgp, signature, %s, p); + read_binary_file(pgp, signature, %s, (const char *)p); } fclose(fp); } else {
CVS commit: src/crypto/external/bsd/netpgp/dist/src/libverify
Module Name:src Committed By: joerg Date: Mon Jan 6 22:59:10 UTC 2014 Modified Files: src/crypto/external/bsd/netpgp/dist/src/libverify: libverify.c Log Message: Move __printflike to the prototype. Add explicit cast for void * - char * to make GCC happy. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/crypto/external/bsd/netpgp/dist/src/libverify
Module Name:src Committed By: htodd Date: Mon Jan 6 23:23:10 UTC 2014 Modified Files: src/crypto/external/bsd/netpgp/dist/src/libverify: libverify.c Log Message: Fix build (cast to const char *). To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 \ src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/crypto/external/bsd/netpgp/dist/src/libverify
Module Name:src Committed By: martin Date: Thu Nov 22 11:26:29 UTC 2012 Modified Files: src/crypto/external/bsd/netpgp/dist/src/libverify: libverify.c Log Message: Initialize ok (and thereby fix the vax build) To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c diff -u src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c:1.3 src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c:1.4 --- src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c:1.3 Tue Nov 20 18:45:37 2012 +++ src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c Thu Nov 22 11:26:28 2012 @@ -874,7 +874,7 @@ read_compressed(pgpv_t *pgp, pgpv_compre pgpv_mem_t *unzmem; bz_stream bz; z_stream z; - int ok; + int ok = 0; compressed-compalg = *p; compressed-s.size = len;
CVS commit: src/crypto/external/bsd/netpgp/dist/src/libverify
Module Name:src Committed By: martin Date: Thu Nov 22 11:26:29 UTC 2012 Modified Files: src/crypto/external/bsd/netpgp/dist/src/libverify: libverify.c Log Message: Initialize ok (and thereby fix the vax build) To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/crypto/external/bsd/netpgp/dist/src/libverify
Module Name:src Committed By: agc Date: Thu Nov 22 00:38:45 UTC 2012 Modified Files: src/crypto/external/bsd/netpgp/dist/src/libverify: pgpsum.c Log Message: Fix some lint To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/crypto/external/bsd/netpgp/dist/src/libverify/pgpsum.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/src/libverify/pgpsum.c diff -u src/crypto/external/bsd/netpgp/dist/src/libverify/pgpsum.c:1.2 src/crypto/external/bsd/netpgp/dist/src/libverify/pgpsum.c:1.3 --- src/crypto/external/bsd/netpgp/dist/src/libverify/pgpsum.c:1.2 Tue Nov 20 05:26:26 2012 +++ src/crypto/external/bsd/netpgp/dist/src/libverify/pgpsum.c Thu Nov 22 00:38:45 2012 @@ -36,6 +36,10 @@ #include digest.h #include pgpsum.h +#ifndef USE_ARG +#define USE_ARG(x) /*LINTED*/(void)(x) +#endif + /* add the ascii armor line endings (except for last line) */ static size_t don_armor(digest_t *hash, uint8_t *in, size_t insize, int doarmor) @@ -103,7 +107,7 @@ already_armored(uint8_t *in, size_t insi /* calculate the checksum for the data we have */ static int -calcsum(uint8_t *out, size_t size, const char *name, uint8_t *mem, size_t cc, const uint8_t *hashed, size_t hashsize, int doarmor) +calcsum(uint8_t *out, size_t size, uint8_t *mem, size_t cc, const uint8_t *hashed, size_t hashsize, int doarmor) { digest_t hash; uint32_t len32; @@ -111,6 +115,7 @@ calcsum(uint8_t *out, size_t size, const uint8_t hashalg; uint8_t trailer[6]; + USE_ARG(size); /* hashed data is non-null (previously checked) */ hashalg = hashed[3]; memcpy(len16, hashed[4], sizeof(len16)); @@ -122,7 +127,7 @@ calcsum(uint8_t *out, size_t size, const #ifdef NETPGPV_DEBUG writefile(mem, cc); #endif - digest_init(hash, hashalg); + digest_init(hash, (const unsigned)hashalg); if (strchr(tw, doarmor) != NULL !already_armored(mem, cc)) { /* this took me ages to find - something causes gpg to truncate its input */ don_armor(hash, mem, cc - 1, doarmor); @@ -166,7 +171,7 @@ pgpv_digest_file(uint8_t *data, size_t s warn(%s - can't mmap, name); goto done; } - ret = calcsum(data, size, name, mem, cc, hashed, hashsize, doarmor); + ret = calcsum(data, size, mem, cc, hashed, hashsize, doarmor); done: if (data) { munmap(mem, cc); @@ -183,5 +188,5 @@ pgpv_digest_memory(uint8_t *data, size_t fprintf(stderr, no hashed data provided\n); return 0; } - return calcsum(data, size, [memory], mem, cc, hashed, hashsize, doarmor); + return calcsum(data, size, mem, cc, hashed, hashsize, doarmor); }
CVS commit: src/crypto/external/bsd/netpgp/dist/src/libverify
Module Name:src Committed By: agc Date: Thu Nov 22 00:38:45 UTC 2012 Modified Files: src/crypto/external/bsd/netpgp/dist/src/libverify: pgpsum.c Log Message: Fix some lint To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/crypto/external/bsd/netpgp/dist/src/libverify/pgpsum.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/crypto/external/bsd/netpgp/dist/src/libverify
Module Name:src Committed By: agc Date: Tue Nov 20 18:45:37 UTC 2012 Modified Files: src/crypto/external/bsd/netpgp/dist/src/libverify: libverify.c Log Message: fix problem on 32-bit problems - with thanks to Alan Barrett and Jonathan Kollasch To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c diff -u src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c:1.2 src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c:1.3 --- src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c:1.2 Tue Nov 20 05:26:26 2012 +++ src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c Tue Nov 20 18:45:37 2012 @@ -940,7 +940,7 @@ read_compressed(pgpv_t *pgp, pgpv_compre break; case BZIP2_COMPRESSION: ok = (BZ2_bzDecompress(bz) == BZ_STREAM_END); - unzmem-size = ((size_t)bz.total_out_hi32 32) | bz.total_out_lo32; + unzmem-size = ((uint64_t)bz.total_out_hi32 32) | bz.total_out_lo32; break; } if (!ok) {
CVS commit: src/crypto/external/bsd/netpgp/dist/src/libverify
Module Name:src Committed By: agc Date: Tue Nov 20 18:45:37 UTC 2012 Modified Files: src/crypto/external/bsd/netpgp/dist/src/libverify: libverify.c Log Message: fix problem on 32-bit problems - with thanks to Alan Barrett and Jonathan Kollasch To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/crypto/external/bsd/netpgp/dist/src/libverify/libverify.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.