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/netpgp allow user-specif...



details:   https://anonhg.NetBSD.org/src/rev/ddb4ac740c51
branches:  trunk
changeset: 758426:ddb4ac740c51
user:      agc <agc%NetBSD.org@localhost>
date:      Thu Nov 04 15:39:08 2010 +0000

description:
allow user-specification of cipher to be used when encrypting packets.

at the user level, this is specified using the --cipher=<ciphername>
option.

diffstat:

 crypto/external/bsd/netpgp/dist/src/netpgp/Makefile.in |  17 +++-----------
 crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1    |  20 ++++++++++++++---
 crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.c    |   8 ++++++-
 3 files changed, 27 insertions(+), 18 deletions(-)

diffs (154 lines):

diff -r 08fbb59652a3 -r ddb4ac740c51 crypto/external/bsd/netpgp/dist/src/netpgp/Makefile.in
--- a/crypto/external/bsd/netpgp/dist/src/netpgp/Makefile.in    Thu Nov 04 15:38:45 2010 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/netpgp/Makefile.in    Thu Nov 04 15:39:08 2010 +0000
@@ -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@
diff -r 08fbb59652a3 -r ddb4ac740c51 crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1
--- a/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1       Thu Nov 04 15:38:45 2010 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.1       Thu Nov 04 15:39:08 2010 +0000
@@ -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
diff -r 08fbb59652a3 -r ddb4ac740c51 crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.c
--- a/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.c       Thu Nov 04 15:38:45 2010 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/netpgp/netpgp.c       Thu Nov 04 15:39:08 2010 +0000
@@ -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;



Home | Main Index | Thread Index | Old Index