Module Name: src
Committed By: sevan
Date: Mon Apr 30 01:10:14 UTC 2018
Modified Files:
src/distrib/sets/lists/man: mi
src/share/man/man3lua: Makefile intro.3lua
Added Files:
src/share/man/man3lua: netpgp.3lua
Log Message:
Add a manual for netpgp(3lua)
To generate a diff of this commit:
cvs rdiff -u -r1.1577 -r1.1578 src/distrib/sets/lists/man/mi
cvs rdiff -u -r1.4 -r1.5 src/share/man/man3lua/Makefile
cvs rdiff -u -r1.7 -r1.8 src/share/man/man3lua/intro.3lua
cvs rdiff -u -r0 -r1.1 src/share/man/man3lua/netpgp.3lua
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/distrib/sets/lists/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1577 src/distrib/sets/lists/man/mi:1.1578
--- src/distrib/sets/lists/man/mi:1.1577 Sun Feb 25 12:53:22 2018
+++ src/distrib/sets/lists/man/mi Mon Apr 30 01:10:13 2018
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1577 2018/02/25 12:53:22 kamil Exp $
+# $NetBSD: mi,v 1.1578 2018/04/30 01:10:13 sevan Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -6715,6 +6715,7 @@
./usr/share/man/man3lua/gpio.unset.3lua man-sys-man .man
./usr/share/man/man3lua/gpio.write.3lua man-sys-man .man
./usr/share/man/man3lua/intro.3lua man-sys-man .man
+./usr/share/man/man3lua/netpgp.3lua man-sys-man .man
./usr/share/man/man3lua/sqlite.3lua man-sys-man .man
./usr/share/man/man3lua/syslog.3lua man-sys-man .man
./usr/share/man/man4/aac.4 man-sys-man .man
Index: src/share/man/man3lua/Makefile
diff -u src/share/man/man3lua/Makefile:1.4 src/share/man/man3lua/Makefile:1.5
--- src/share/man/man3lua/Makefile:1.4 Wed Nov 13 20:55:08 2013
+++ src/share/man/man3lua/Makefile Mon Apr 30 01:10:13 2018
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.4 2013/11/13 20:55:08 mbalmer Exp $
+# $NetBSD: Makefile,v 1.5 2018/04/30 01:10:13 sevan Exp $
-MAN= gpio.3lua intro.3lua sqlite.3lua syslog.3lua
+MAN= gpio.3lua intro.3lua netpgp3.lua sqlite.3lua syslog.3lua
MLINKS+=gpio.3lua gpio.open.3lua \
gpio.3lua gpio.info.3lua \
Index: src/share/man/man3lua/intro.3lua
diff -u src/share/man/man3lua/intro.3lua:1.7 src/share/man/man3lua/intro.3lua:1.8
--- src/share/man/man3lua/intro.3lua:1.7 Sat Apr 15 23:33:52 2017
+++ src/share/man/man3lua/intro.3lua Mon Apr 30 01:10:13 2018
@@ -1,4 +1,4 @@
-.\" $NetBSD: intro.3lua,v 1.7 2017/04/15 23:33:52 sevan Exp $
+.\" $NetBSD: intro.3lua,v 1.8 2018/04/30 01:10:13 sevan Exp $
.\"
.\" Copyright (c) 2013, 2016 Marc Balmer <[email protected]>.
.\" All rights reserved.
@@ -28,7 +28,7 @@
.\" SUCH DAMAGE.
.\"
.\"
-.Dd April 16, 2017
+.Dd April 30, 2018
.Dt INTRO 3lua
.Os
.Sh NAME
@@ -47,6 +47,10 @@ are:
Access
.Xr gpio 4
pins.
+.It Em netpgp
+Access
+.Xr libnetpgp 3
+functionality.
.It Em sqlite
Access
.Xr sqlite3 1
@@ -60,6 +64,7 @@ functionality.
.Xr lua 1 ,
.Xr luac 1 ,
.Xr gpio 3lua ,
+.Xr netpgp 3lua ,
.Xr sqlite 3lua ,
.Xr syslog 3lua ,
.Xr intro 9lua
Added files:
Index: src/share/man/man3lua/netpgp.3lua
diff -u /dev/null src/share/man/man3lua/netpgp.3lua:1.1
--- /dev/null Mon Apr 30 01:10:14 2018
+++ src/share/man/man3lua/netpgp.3lua Mon Apr 30 01:10:13 2018
@@ -0,0 +1,95 @@
+.\" $NetBSD: netpgp.3lua,v 1.1 2018/04/30 01:10:13 sevan Exp $
+.\"
+.\" Copyright (c) 2008 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" This code is derived from software contributed to The NetBSD Foundation
+.\" by Sevan Janiyan <[email protected]>.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (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 April 30, 2018
+.Dt NETPGP 3lua
+.Os
+.Sh NAME
+.Nm netpgp
+.Nd provides access to
+.Xr libnetpgp 3
+functionality from Lua
+.Sh SYNOPSIS
+.Cd "local netpgp = require 'netpgp'"
+.Pp
+.Bl -tag -width XXXX -compact
+.It Dv instance = netpgp.new()
+.It Dv netpgp.homedir(instance, homedir)
+.It Dv netpgp.init(instance)
+.It Dv netpgp.encrypt_file(instance, file, output, armour)
+.It Dv netpgp.decrypt_file(instance, file, output, armour)
+.It Dv netpgp.sign_file(instance, file, output, armour, detached)
+.It Dv netpgp.clearsign_file(instance, file, output, armour, detached)
+.It Dv netpgp.verify_file(instance, file, armour)
+.It Dv netpgp.verify_cat_file(instance, file, output, armour)
+.It Dv netpgp.list_packets(instance, file, armour)
+.It Dv netpgp.setvar(instance, name, value)
+.It Dv netpgp.getvar(instance, name, value)
+.El
+.Sh DESCRIPTION
+The
+.Nm
+Lua binding provides access to functionality availabile in
+.Xr libnetpgp 3 .
+.Sh EXAMPLES
+The following example code demonstrates the process of encrypting, decrypting,
+signing, and verifying a file, in a single script.
+.Bd -literal
+local netpgp = require 'netpgp'
+btc = netpgp.new()
+netpgp.setvar(btc, "need seckey", 1)
+netpgp.init(btc)
+
+netpgp.encrypt_file(btc, "scratch", "scratch.gpg", "armoured")
+netpgp.decrypt_file(btc, "scratch.gpg", "itch", "armoured")
+netpgp.sign_file(btc, "scratch", "scratch.asc", "armoured", "detached")
+netpgp.verify_file(btc, "scratch.asc", "armoured")
+.Ed
+.Sh SEE ALSO
+.Xr lua 1 ,
+.Xr luac 1 ,
+.Xr libnetpgp 3 ,
+.Xr intro 3lua
+.Sh HISTORY
+.Nm
+Lua binding first appeared in
+.Nx 9.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+Lua binding was written by
+.An Alistair Crooks .
+This manual was written by
+.An Sevan Janiyan Aq Mt [email protected] .
+.Sh BUGS
+This binding currently only provides a subset of the functionality available in
+.Xr libnetpgp 3 .
+This manual needs more description of the functionality available .