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 Update netpgp to version 1.9...
details: https://anonhg.NetBSD.org/src/rev/f6b6181146ba
branches: trunk
changeset: 751913:f6b6181146ba
user: agc <agc%NetBSD.org@localhost>
date: Mon Feb 08 17:19:11 2010 +0000
description:
Update netpgp to version 1.99.17/20100208
Changes to 1.99.17/20100208
+ get rid of last 2 static variables - use the __ops_printstate_t struct
passed down, and add the indent variable here too
+ get rid of 3 occurrences in reader.c where an automatic buffer was
addressed (as part of a subsequent callback) by a struct field from
a calling scope, and only valid within the callback. Found by
Flexelint and phk - many thanks.
+ print filename/"memory" when time problems occur when validating signatures
diffstat:
crypto/external/bsd/netpgp/dist/TODO | 10 +-
crypto/external/bsd/netpgp/dist/configure | 22 +-
crypto/external/bsd/netpgp/dist/configure.ac | 6 +-
crypto/external/bsd/netpgp/dist/src/lib/crypto.c | 13 +-
crypto/external/bsd/netpgp/dist/src/lib/crypto.h | 1 +
crypto/external/bsd/netpgp/dist/src/lib/packet-print.c | 341 ++++++-------
crypto/external/bsd/netpgp/dist/src/lib/packet.h | 9 +-
crypto/external/bsd/netpgp/dist/src/lib/reader.c | 14 +-
crypto/external/bsd/netpgp/dist/src/lib/validate.c | 25 +-
crypto/external/bsd/netpgp/dist/src/lib/version.h | 2 +-
crypto/external/bsd/netpgp/dist/src/netpgp/Makefile | 6 +-
crypto/external/bsd/netpgp/dist/src/netpgpverify/Makefile | 6 +-
12 files changed, 234 insertions(+), 221 deletions(-)
diffs (truncated from 1144 to 300 lines):
diff -r 4e101496b303 -r f6b6181146ba crypto/external/bsd/netpgp/dist/TODO
--- a/crypto/external/bsd/netpgp/dist/TODO Mon Feb 08 09:54:27 2010 +0000
+++ b/crypto/external/bsd/netpgp/dist/TODO Mon Feb 08 17:19:11 2010 +0000
@@ -1,9 +1,8 @@
To Do
=====
-calc v4_hashlen
-unarmoured static in packet-print.c and skipping in crypto.c
-display expiry properly
-netpgpagent
+agent
+agentctl
+trust subpackets
convert to and from ascii armored sigs
gpgme compat lib
--list-sigs - these come out in __ops_check_subkey_sig()
@@ -85,3 +84,6 @@
multisign
settable from time
unarmoured static in packet-print.c and skipping in crypto.c
+display expiry properly
+unarmoured static in packet-print.c and skipping in crypto.c
+duration -> expiry
diff -r 4e101496b303 -r f6b6181146ba crypto/external/bsd/netpgp/dist/configure
--- a/crypto/external/bsd/netpgp/dist/configure Mon Feb 08 09:54:27 2010 +0000
+++ b/crypto/external/bsd/netpgp/dist/configure Mon Feb 08 17:19:11 2010 +0000
@@ -1,7 +1,7 @@
#! /bin/sh
-# From configure.ac Revision: 1.20 .
+# From configure.ac Revision: 1.21 .
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for netpgp 20100205.
+# Generated by GNU Autoconf 2.63 for netpgp 20100208.
#
# Report bugs to <Alistair Crooks <agc%netbsd.org@localhost> c0596823>.
#
@@ -751,8 +751,8 @@
# Identity of this package.
PACKAGE_NAME='netpgp'
PACKAGE_TARNAME='netpgp'
-PACKAGE_VERSION='20100205'
-PACKAGE_STRING='netpgp 20100205'
+PACKAGE_VERSION='20100208'
+PACKAGE_STRING='netpgp 20100208'
PACKAGE_BUGREPORT='Alistair Crooks <agc%netbsd.org@localhost> c0596823'
ac_unique_file="src/netpgp/netpgp.c"
@@ -1483,7 +1483,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures netpgp 20100205 to adapt to many kinds of systems.
+\`configure' configures netpgp 20100208 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1553,7 +1553,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of netpgp 20100205:";;
+ short | recursive ) echo "Configuration of netpgp 20100208:";;
esac
cat <<\_ACEOF
@@ -1660,7 +1660,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-netpgp configure 20100205
+netpgp configure 20100208
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1674,7 +1674,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by netpgp $as_me 20100205, which was
+It was created by netpgp $as_me 20100208, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
@@ -2561,7 +2561,7 @@
# Define the identity of the package.
PACKAGE='netpgp'
- VERSION='20100205'
+ VERSION='20100208'
cat >>confdefs.h <<_ACEOF
@@ -22306,7 +22306,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by netpgp $as_me 20100205, which was
+This file was extended by netpgp $as_me 20100208, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -22369,7 +22369,7 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-netpgp config.status 20100205
+netpgp config.status 20100208
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff -r 4e101496b303 -r f6b6181146ba crypto/external/bsd/netpgp/dist/configure.ac
--- a/crypto/external/bsd/netpgp/dist/configure.ac Mon Feb 08 09:54:27 2010 +0000
+++ b/crypto/external/bsd/netpgp/dist/configure.ac Mon Feb 08 17:19:11 2010 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: configure.ac,v 1.21 2010/02/06 02:24:33 agc Exp $
+# $NetBSD: configure.ac,v 1.22 2010/02/08 17:19:12 agc Exp $
#
# Process this file with autoconf to produce a configure script.
-AC_INIT([netpgp],[20100205],[Alistair Crooks <agc%netbsd.org@localhost> c0596823])
+AC_INIT([netpgp],[20100208],[Alistair Crooks <agc%netbsd.org@localhost> c0596823])
AC_PREREQ(2.63)
-AC_REVISION([$Revision: 1.21 $])
+AC_REVISION([$Revision: 1.22 $])
AS_SHELL_SANITIZE
diff -r 4e101496b303 -r f6b6181146ba crypto/external/bsd/netpgp/dist/src/lib/crypto.c
--- a/crypto/external/bsd/netpgp/dist/src/lib/crypto.c Mon Feb 08 09:54:27 2010 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/lib/crypto.c Mon Feb 08 17:19:11 2010 +0000
@@ -54,7 +54,7 @@
#if defined(__NetBSD__)
__COPYRIGHT("@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: crypto.c,v 1.18 2009/12/22 06:03:24 agc Exp $");
+__RCSID("$NetBSD: crypto.c,v 1.19 2010/02/08 17:19:12 agc Exp $");
#endif
#include <sys/types.h>
@@ -219,22 +219,21 @@
write_parsed_cb(const __ops_packet_t *pkt, __ops_cbdata_t *cbinfo)
{
const __ops_contents_t *content = &pkt->u;
- static unsigned skipping; /* XXX - put skipping into pkt? */
if (__ops_get_debug_level(__FILE__)) {
printf("write_parsed_cb: ");
- __ops_print_packet(pkt);
+ __ops_print_packet(&cbinfo->printstate, pkt);
}
- if (pkt->tag != OPS_PTAG_CT_UNARMOURED_TEXT && skipping) {
+ if (pkt->tag != OPS_PTAG_CT_UNARMOURED_TEXT && cbinfo->printstate.skipping) {
puts("...end of skip");
- skipping = 0;
+ cbinfo->printstate.skipping = 0;
}
switch (pkt->tag) {
case OPS_PTAG_CT_UNARMOURED_TEXT:
printf("OPS_PTAG_CT_UNARMOURED_TEXT\n");
- if (!skipping) {
+ if (!cbinfo->printstate.skipping) {
puts("Skipping...");
- skipping = 1;
+ cbinfo->printstate.skipping = 1;
}
fwrite(content->unarmoured_text.data, 1,
content->unarmoured_text.length, stdout);
diff -r 4e101496b303 -r f6b6181146ba crypto/external/bsd/netpgp/dist/src/lib/crypto.h
--- a/crypto/external/bsd/netpgp/dist/src/lib/crypto.h Mon Feb 08 09:54:27 2010 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/lib/crypto.h Mon Feb 08 17:19:11 2010 +0000
@@ -253,6 +253,7 @@
__ops_io_t *io; /* error/output messages */
void *passfp; /* fp for passphrase input */
__ops_cryptinfo_t cryptinfo; /* used when decrypting */
+ __ops_printstate_t printstate; /* used to keep state when printing */
};
/** __ops_hashtype_t */
diff -r 4e101496b303 -r f6b6181146ba crypto/external/bsd/netpgp/dist/src/lib/packet-print.c
--- a/crypto/external/bsd/netpgp/dist/src/lib/packet-print.c Mon Feb 08 09:54:27 2010 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/lib/packet-print.c Mon Feb 08 17:19:11 2010 +0000
@@ -58,7 +58,7 @@
#if defined(__NetBSD__)
__COPYRIGHT("@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: packet-print.c,v 1.24 2010/02/06 02:24:33 agc Exp $");
+__RCSID("$NetBSD: packet-print.c,v 1.25 2010/02/08 17:19:12 agc Exp $");
#endif
#include <string.h>
@@ -658,17 +658,14 @@
\param contents
*/
int
-__ops_print_packet(const __ops_packet_t *pkt)
+__ops_print_packet(__ops_printstate_t *print, const __ops_packet_t *pkt)
{
const __ops_contents_t *content = &pkt->u;
- static unsigned unarmoured;
__ops_text_t *text;
const char *str;
- int indent;
- indent = 0;
- if (unarmoured && pkt->tag != OPS_PTAG_CT_UNARMOURED_TEXT) {
- unarmoured = 0;
+ if (print->unarmoured && pkt->tag != OPS_PTAG_CT_UNARMOURED_TEXT) {
+ print->unarmoured = 0;
puts("UNARMOURED TEXT ends");
}
if (pkt->tag == OPS_PARSER_PTAG) {
@@ -694,32 +691,32 @@
case OPS_PARSER_PTAG:
if (content->ptag.type == OPS_PTAG_CT_PUBLIC_KEY) {
- indent = 0;
+ print->indent = 0;
printf("\n*** NEXT KEY ***\n");
}
printf("\n");
- print_indent(indent);
+ print_indent(print->indent);
printf("==== ptag new_format=%u type=%u length_type=%d"
" length=0x%x (%u) position=0x%x (%u)\n",
content->ptag.new_format,
content->ptag.type, content->ptag.length_type,
content->ptag.length, content->ptag.length,
content->ptag.position, content->ptag.position);
- print_tagname(indent, __ops_show_packet_tag((__ops_packet_tag_t)content->ptag.type));
+ print_tagname(print->indent, __ops_show_packet_tag((__ops_packet_tag_t)content->ptag.type));
break;
case OPS_PTAG_CT_SE_DATA_HEADER:
- print_tagname(indent, "SYMMETRIC ENCRYPTED DATA");
+ print_tagname(print->indent, "SYMMETRIC ENCRYPTED DATA");
break;
case OPS_PTAG_CT_SE_IP_DATA_HEADER:
- print_tagname(indent,
+ print_tagname(print->indent,
"SYMMETRIC ENCRYPTED INTEGRITY PROTECTED DATA HEADER");
printf("Version: %d\n", content->se_ip_data_header.version);
break;
case OPS_PTAG_CT_SE_IP_DATA_BODY:
- print_tagname(indent,
+ print_tagname(print->indent,
"SYMMETRIC ENCRYPTED INTEGRITY PROTECTED DATA BODY");
printf(" data body length=%u\n",
content->se_data_body.length);
@@ -731,71 +728,71 @@
case OPS_PTAG_CT_PUBLIC_KEY:
case OPS_PTAG_CT_PUBLIC_SUBKEY:
- print_tagname(indent, (pkt->tag == OPS_PTAG_CT_PUBLIC_KEY) ?
+ print_tagname(print->indent, (pkt->tag == OPS_PTAG_CT_PUBLIC_KEY) ?
"PUBLIC KEY" :
"PUBLIC SUBKEY");
__ops_print_pubkey(&content->pubkey);
break;
case OPS_PTAG_CT_TRUST:
- print_tagname(indent, "TRUST");
- print_data(indent, "Trust", &content->trust.data);
+ print_tagname(print->indent, "TRUST");
+ print_data(print->indent, "Trust", &content->trust.data);
break;
case OPS_PTAG_CT_USER_ID:
- print_tagname(indent, "USER ID");
- print_utf8_string(indent, "userid", content->userid.userid);
+ print_tagname(print->indent, "USER ID");
+ print_utf8_string(print->indent, "userid", content->userid.userid);
break;
case OPS_PTAG_CT_SIGNATURE:
- print_tagname(indent, "SIGNATURE");
- print_indent(indent);
- print_uint(indent, "Signature Version",
+ print_tagname(print->indent, "SIGNATURE");
+ print_indent(print->indent);
+ print_uint(print->indent, "Signature Version",
(unsigned)content->sig.info.version);
if (content->sig.info.birthtime_set) {
- print_time(indent, "Signature Creation Time",
+ print_time(print->indent, "Signature Creation Time",
content->sig.info.birthtime);
}
if (content->sig.info.duration_set) {
- print_uint(indent, "Signature Duration",
+ print_uint(print->indent, "Signature Duration",
(unsigned)content->sig.info.duration);
}
- print_string_and_value(indent, "Signature Type",
+ print_string_and_value(print->indent, "Signature Type",
__ops_show_sig_type(content->sig.info.type),
content->sig.info.type);
if (content->sig.info.signer_id_set) {
Home |
Main Index |
Thread Index |
Old Index