Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-8]: src/crypto/external/bsd/netpgp/dist/src Pull up ...
details: https://anonhg.NetBSD.org/src/rev/27bfbcfb727c
branches: netbsd-8
changeset: 318821:27bfbcfb727c
user: martin <martin%NetBSD.org@localhost>
date: Sun May 06 09:47:47 2018 +0000
description:
Pull up following revision(s) (requested by sevan in ticket #810):
crypto/external/bsd/netpgp/dist/src/libbn/libnetpgpbn.3: revision 1.5
crypto/external/bsd/netpgp/dist/src/libbn/libnetpgpbn.3: revision 1.6
crypto/external/bsd/netpgp/dist/src/libmj/libmj.3: revision 1.8
crypto/external/bsd/netpgp/dist/src/libmj/libmj.3: revision 1.9
crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3: revision 1.20
crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3: revision 1.21
crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3: revision 1.22
crypto/external/bsd/netpgp/dist/src/netpgpverify/netpgpverify.1: revision 1.12
crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3: revision 1.23
crypto/external/bsd/netpgp/dist/src/netpgpverify/netpgpverify.1: revision 1.13
crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3: revision 1.19
Some further changes from PR bin/48395.
Drop superfluous zero prefix for single digit number days.
heads up by wiz
Break down explanation of netpgp_init to make it easier to extend.
Document how the userid is obtained.
Remove trailing whitespace.
Add the following functions to the list (TODO - add descriptions)
netpgp_unsetvar
netpgp_list_keys_json
netpgp_match_keys
netpgp_match_keys_json
netpgp_match_pubkeys
netpgp_validate_sigs
netpgp_format_json
Remove netpgp_match_list_keys() as function does not exist
Add missing output file to netpgp_verify_file() argument list
Sprinkle const to arguments
diffstat:
crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3 | 71 ++++++---
crypto/external/bsd/netpgp/dist/src/libbn/libnetpgpbn.3 | 6 +-
crypto/external/bsd/netpgp/dist/src/libmj/libmj.3 | 8 +-
crypto/external/bsd/netpgp/dist/src/netpgpverify/netpgpverify.1 | 17 +-
4 files changed, 67 insertions(+), 35 deletions(-)
diffs (264 lines):
diff -r 55de3eca5c2b -r 27bfbcfb727c crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3
--- a/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3 Sun May 06 09:42:38 2018 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3 Sun May 06 09:47:47 2018 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: libnetpgp.3,v 1.16 2014/02/17 07:23:18 agc Exp $
+.\" $NetBSD: libnetpgp.3,v 1.16.18.1 2018/05/06 09:47:47 martin Exp $
.\"
.\" Copyright (c) 2009,2010 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 February 16, 2014
+.Dd April 29, 2018
.Dt LIBNETPGP 3
.Os
.Sh NAME
@@ -79,6 +79,10 @@
.Fo netpgp_incvar
.Fa "netpgp_t *netpgp" "const char *name" "const int delta"
.Fc
+.Ft int
+.Fo netpgp_unsetvar
+.Fa "netpgp_t *netpgp" "const char *name"
+.Fc
.Pp
The following function sets the home directory:
.Ft int
@@ -92,8 +96,20 @@
.Fa "netpgp_t *netpgp" "const int printsigs"
.Fc
.Ft int
-.Fo netpgp_match_list_keys
-.Fa "netpgp_t *netpgp" "char *pattern"
+.Fo netpgp_list_keys_json
+.Fa "netpgp_t *netpgp" "char **json" "const int psigs"
+.Fc
+.Ft int
+.Fo netpgp_match_keys
+.Fa "netpgp_t *netpgp" "char *name" "const char *fmt" "void *vp" "const int psigs"
+.Fc
+.Ft int
+.Fo netpgp_match_keys_json
+.Fa "netpgp_t *netpgp" "char **json" "char *name" "const char *fmt" "const int psigs"
+.Fc
+.Ft int
+.Fo netpgp_match_pubkeys
+.Fa "netpgp_t *netpgp" "char *name" "void *vp"
.Fc
.Ft int
.Fo netpgp_find_key
@@ -101,7 +117,7 @@
.Fc
.Ft char *
.Fo netpgp_get_key
-.Fa "netpgp_t *netpgp" "const char *id"
+.Fa "netpgp_t *netpgp" "const char *name" "const char *fmt"
.Fc
.Ft int
.Fo netpgp_export_key
@@ -115,31 +131,39 @@
.Fo netpgp_generate_key
.Fa "netpgp_t *netpgp" "char *userid" "int numbits"
.Fc
+.Ft int
+.Fo netpgp_validate_sigs
+.Fa "netpgp_t *netpgp"
+.Fc
+.Ft int
+.Fo netpgp_format_json
+.Fa "void *vp" "const char *json" "const int psigs"
+.Fc
.Pp
The following functions are used for file management:
.Ft int
.Fo netpgp_encrypt_file
-.Fa "netpgp_t *netpgp" "char *userid" "char *filename" "char *out"
+.Fa "netpgp_t *netpgp" "const char *userid" "const char *filename" "char *out"
.Fa "int armored"
.Fc
.Ft int
.Fo netpgp_decrypt_file
-.Fa "netpgp_t *netpgp" "char *filename" "char *out" "int armored"
+.Fa "netpgp_t *netpgp" "const char *filename" "char *out" "int armored"
.Fc
.Ft int
.Fo netpgp_sign_file
-.Fa "netpgp_t *netpgp" "char *userid" "char *filename" "char *out"
+.Fa "netpgp_t *netpgp" "const char *userid" "const char *filename" "char *out"
.Fa "int armored" "int cleartext" "int detached"
.Fc
.Ft int
.Fo netpgp_verify_file
-.Fa "netpgp_t *netpgp" "char *f" "int armored"
+.Fa "netpgp_t *netpgp" "const char *in" "const char *out" "int armored"
.Fc
.Pp
The following functions are used for memory signing and encryption:
.Ft int
.Fo netpgp_encrypt_memory
-.Fa "netpgp_t *netpgp" "char *userid" "void *in" "const size_t insize"
+.Fa "netpgp_t *netpgp" "const char *userid" "void *in" "const size_t insize"
.Fa "char *out" "size_t outsize" "int armored"
.Fc
.Ft int
@@ -172,12 +196,13 @@
.Nm
process be initialised using the
.Fn netpgp_init
-function, which will set up the public and private keyrings, and set the
-user identity to the
+function, which will set up the public and private keyrings, as well as set the
+user identity in the
.Ar userid
-argument passed stored in the
+member of the
.Dv netpgp_t
-structure, and set using the
+structure.
+These are set using the
.Fn netpgp_setvar
function.
If no public key ring file is set, initial values will be taken from those
@@ -189,6 +214,13 @@
in the
.Pa .gnupg/secring.gpg
file in the user's home directory.
+The user identity is obtained from the
+.Ev userid
+environment variable, or failing that, the value of the
+.Dq default-key
+setting from
+.Pa .gnupg/gpg.conf
+file in the user's home directory is used.
The
.Fn netpgp_init
function returns 1 on success, 0 on failure.
@@ -198,13 +230,6 @@
function is used.
The signature subkey fields can also be displayed
using this function.
-The
-.Fn netpgp_match_list_keys
-function is used to match (via regular expression)
-a subset of the keys in the keyring.
-If the expression to match is NULL,
-the search will degenerate into a
-listing of all keys in the keyring.
.Pp
The home directory is specified as an internal variable,
and its existence is checked using the
@@ -223,13 +248,13 @@
.Pp
To import a key onto the public keyring, the
.Fn netpgp_import_key
-is used.
+function is used.
The name of the file containing the key to be imported is provided
as the filename argument.
.Pp
To generate a key, the
.Fn netpgp_generate_key
-is used.
+function is used.
It takes an argument of the number of bits to use in the key.
At the time that this manual page was created (April 2009),
the recommendations are that the bare minimum key size
diff -r 55de3eca5c2b -r 27bfbcfb727c crypto/external/bsd/netpgp/dist/src/libbn/libnetpgpbn.3
--- a/crypto/external/bsd/netpgp/dist/src/libbn/libnetpgpbn.3 Sun May 06 09:42:38 2018 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/libbn/libnetpgpbn.3 Sun May 06 09:47:47 2018 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: libnetpgpbn.3,v 1.4 2014/02/17 07:23:18 agc Exp $
+.\" $NetBSD: libnetpgpbn.3,v 1.4.18.1 2018/05/06 09:47:47 martin Exp $
.\"
.\" Copyright (c) 2010 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 February 16, 2014
+.Dd April 3, 2018
.Dt LIBNETPGPBN 3
.Os
.Sh NAME
@@ -257,7 +257,7 @@
buffer called
.Va buf
where
-.Dq USERNAME
+.Dq USER
is the name of the user taken from the runtime environment.
The encoded text will be in an allocated buffer called
.Va s .
diff -r 55de3eca5c2b -r 27bfbcfb727c crypto/external/bsd/netpgp/dist/src/libmj/libmj.3
--- a/crypto/external/bsd/netpgp/dist/src/libmj/libmj.3 Sun May 06 09:42:38 2018 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/libmj/libmj.3 Sun May 06 09:47:47 2018 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: libmj.3,v 1.7 2014/02/17 07:23:18 agc Exp $
+.\" $NetBSD: libmj.3,v 1.7.18.1 2018/05/06 09:47:47 martin Exp $
.\"
.\" Copyright (c) 2010 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 February 16, 2014
+.Dd April 3, 2018
.Dt LIBMJ 3
.Os
.Sh NAME
@@ -227,10 +227,10 @@
buffer called
.Va buf
where
-.Dq USERNAME
+.Dq USER
is the name of the user taken from the runtime environment.
The encoded text will be in an allocated buffer called
-.Va s
+.Va s .
.Bd -literal -offset indent
mj_t atom;
char buf[BUFSIZ];
diff -r 55de3eca5c2b -r 27bfbcfb727c crypto/external/bsd/netpgp/dist/src/netpgpverify/netpgpverify.1
--- a/crypto/external/bsd/netpgp/dist/src/netpgpverify/netpgpverify.1 Sun May 06 09:42:38 2018 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/netpgpverify/netpgpverify.1 Sun May 06 09:47:47 2018 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: netpgpverify.1,v 1.11 2017/04/17 19:50:28 agc Exp $
+.\" $NetBSD: netpgpverify.1,v 1.11.4.1 2018/05/06 09:47:47 martin Exp $
.\"
.\" Copyright (c) 2013,2014,2015 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 January 15, 2015
+.Dd April 3, 2018
.Dt NETPGPVERIFY 1
.Os
.Sh NAME
@@ -143,9 +143,16 @@
.\" .Xr libbz2 3 ,
.Xr zlib 3
.Sh STANDARDS
-The
-.Nm
-utility is designed to conform to IETF RFC 4880.
+.Rs
+.%A J. Callas
+.%A L. Donnerhacke
+.%A H. Finney
+.%A D. Shaw
+.%A R. Thayer
+.%D November 2007
+.%R RFC 4880
+.%T OpenPGP Message Format
+.Re
.Sh HISTORY
The
.Nm
Home |
Main Index |
Thread Index |
Old Index