Module Name: src Committed By: agc Date: Thu Nov 4 15:39:09 UTC 2010
Modified Files: src/crypto/external/bsd/netpgp/dist/src/netpgp: Makefile.in netpgp.1 netpgp.c Log Message: allow user-specification of cipher to be used when encrypting packets. at the user level, this is specified using the --cipher=<ciphername> option. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 \ src/crypto/external/bsd/netpgp/dist/src/netpgp/Makefile.in cvs rdiff -u -r1.15 -r1.16 \ src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1 \ src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.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/netpgp/Makefile.in diff -u src/crypto/external/bsd/netpgp/dist/src/netpgp/Makefile.in:1.4 src/crypto/external/bsd/netpgp/dist/src/netpgp/Makefile.in:1.5 --- src/crypto/external/bsd/netpgp/dist/src/netpgp/Makefile.in:1.4 Sat Aug 7 04:23:56 2010 +++ src/crypto/external/bsd/netpgp/dist/src/netpgp/Makefile.in Thu Nov 4 15:39:08 2010 @@ -81,26 +81,19 @@ CANONICAL_HOST = @CANONICAL_HOST@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ @OPENSSL_INCLUDES@ +CFLAGS = @CFLAGS@ CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ @OPENSSL_INCLUDES@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ +CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ -ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ @@ -109,9 +102,9 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ -LDFLAGS = @LDFLAGS@ @OPENSSL_LDFLAGS@ +LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ @OPENSSL_LIBS@ +LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ @@ -148,9 +141,7 @@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_F77 = @ac_ct_F77@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ Index: src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1 diff -u src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1:1.15 src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1:1.16 --- src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1:1.15 Wed Nov 3 02:36:12 2010 +++ src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1 Thu Nov 4 15:39:08 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: netpgp.1,v 1.15 2010/11/03 02:36:12 agc Exp $ +.\" $NetBSD: netpgp.1,v 1.16 2010/11/04 15:39:08 agc Exp $ .\" .\" Copyright (c) 2009 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd August 9, 2010 +.Dd November 4, 2010 .Dt NETPGP 1 .Os .Sh NAME @@ -85,9 +85,11 @@ .Pp where the long options for all commands are: .Pp +.Op Fl Fl cipher Ns = Ns Ar ciphername +.br .Op Fl Fl coredumps .br -.Op Fl Fl homedir Ns = Ns Ar home-directory +.Op Fl Fl homedir Ns = Ns Ar home\-directory .br .Op Fl Fl keyring Ns = Ns Ar keyring .br @@ -202,6 +204,16 @@ .It Fl Fl armour , Fl armor This option, however it is spelled, wraps the signature as an ASCII-encoded piece of text, for ease of use. +.It Fl Fl cipher Ar ciphername +can be used to specify the symmetric encryption algorithm (or +cipher) which is used when encrypting data. +To decrypt this data, the same cipher will be needed, +so care should be taken at encryption time to make sure +that the person who decrypts the data has +access to the cipher used. +The default cipher algorithm is the +.Dq CAST5 +algorithm. .It Fl Fl detached When signing a file, place the resulting signature in a separate file from the one being signed. @@ -217,7 +229,7 @@ may also be used, although it is recommended that SHA256 be used, due to recent advances in generating collisions for the SHA1 hashing algorithm. -.It Fl Fl homedir Ar home-directory +.It Fl Fl homedir Ar home\-directory Keyrings are normally located, for historical reasons, within the user's home directory in a subdirectory called .Dq Pa .gnupg Index: src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.c diff -u src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.c:1.15 src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.c:1.16 --- src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.c:1.15 Wed Sep 8 03:21:22 2010 +++ src/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.c Thu Nov 4 15:39:08 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: netpgp.c,v 1.15 2010/09/08 03:21:22 agc Exp $ */ +/* $NetBSD: netpgp.c,v 1.16 2010/11/04 15:39:08 agc Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -61,6 +61,7 @@ "\t--list-packets [options] OR\n" "\t--version\n" "where options are:\n" + "\t[--cipher=<ciphername>] AND/OR\n" "\t[--coredumps] AND/OR\n" "\t[--homedir=<homedir>] AND/OR\n" "\t[--keyring=<keyring>] AND/OR\n" @@ -98,6 +99,7 @@ MAX_MEM_ALLOC, DURATION, BIRTHTIME, + CIPHER, /* debug */ OPS_DEBUG @@ -155,6 +157,7 @@ {"creation", required_argument, NULL, BIRTHTIME}, {"duration", required_argument, NULL, DURATION}, {"expiry", required_argument, NULL, DURATION}, + {"cipher", required_argument, NULL, CIPHER}, { NULL, 0, NULL, 0}, }; @@ -458,6 +461,9 @@ case BIRTHTIME: netpgp_setvar(netpgp, "birthtime", arg); break; + case CIPHER: + netpgp_setvar(netpgp, "cipher", arg); + break; case OPS_DEBUG: netpgp_set_debug(arg); break;