Module Name: src
Committed By: sevan
Date: Sun Apr 29 14:21:16 UTC 2018
Modified Files:
src/crypto/external/bsd/netpgp/dist/src/lib: libnetpgp.3
Log Message:
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
To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 \
src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3
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/lib/libnetpgp.3
diff -u src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3:1.22 src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3:1.23
--- src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3:1.22 Mon Apr 16 08:17:18 2018
+++ src/crypto/external/bsd/netpgp/dist/src/lib/libnetpgp.3 Sun Apr 29 14:21:16 2018
@@ -1,4 +1,4 @@
-.\" $NetBSD: libnetpgp.3,v 1.22 2018/04/16 08:17:18 wiz Exp $
+.\" $NetBSD: libnetpgp.3,v 1.23 2018/04/29 14:21:16 sevan 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 April 15, 2018
+.Dd April 29, 2018
.Dt LIBNETPGP 3
.Os
.Sh NAME
@@ -79,6 +79,10 @@ The following functions are for variable
.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 @@ The following functions are used for key
.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 @@ The following functions are used for key
.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 @@ The following functions are used for key
.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
@@ -206,13 +230,6 @@ To list all the keys in a keyring, the
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