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/bindings/lua Use a lua for l...
details: https://anonhg.NetBSD.org/src/rev/3521899cc6aa
branches: trunk
changeset: 748246:3521899cc6aa
user: agc <agc%NetBSD.org@localhost>
date: Sun Oct 18 07:23:37 2009 +0000
description:
Use a lua for loop in preference to a while and increment in the lua
example code - suggested by Marc Balmer.
% make USETOOLS=no t
cp Makefile a
./netpgp.lua --sign --detached a
netpgp: default key set to "C0596823"
pub 2048/RSA (Encrypt or Sign) 1b68dcfcc0596823 2004-01-12
Key fingerprint: d415 9deb 336d e4cc cdfa 00cd 1b68 dcfc c059 6823
uid Alistair Crooks <agc%netbsd.org@localhost>
uid Alistair Crooks <agc%pkgsrc.org@localhost>
uid Alistair Crooks <agc%alistaircrooks.com@localhost>
uid Alistair Crooks <alistair%hockley-crooks.com@localhost>
netpgp passphrase:
-rw-r--r-- 1 agc agc 287 Oct 17 15:58 a.sig
./netpgp.lua --verify a.sig
netpgp: default key set to "C0596823"
netpgp: assuming signed data in "a"
Good signature for a.sig made Sat Oct 17 15:58:09 2009
using RSA (Encrypt or Sign) key 1b68dcfcc0596823
pub 2048/RSA (Encrypt or Sign) 1b68dcfcc0596823 2004-01-12
Key fingerprint: d415 9deb 336d e4cc cdfa 00cd 1b68 dcfc c059 6823
uid Alistair Crooks <alistair%hockley-crooks.com@localhost>
uid Alistair Crooks <agc%pkgsrc.org@localhost>
uid Alistair Crooks <agc%netbsd.org@localhost>
uid Alistair Crooks <agc%alistaircrooks.com@localhost>
%
diffstat:
crypto/external/bsd/netpgp/dist/bindings/lua/netpgp.lua | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diffs (20 lines):
diff -r 1b0ce0426901 -r 3521899cc6aa crypto/external/bsd/netpgp/dist/bindings/lua/netpgp.lua
--- a/crypto/external/bsd/netpgp/dist/bindings/lua/netpgp.lua Sun Oct 18 07:17:28 2009 +0000
+++ b/crypto/external/bsd/netpgp/dist/bindings/lua/netpgp.lua Sun Oct 18 07:23:37 2009 +0000
@@ -77,8 +77,8 @@
-- initialise everything
netpgp.init(pgp)
-local i = 1
-while i <= #args do
+local i
+for i = 1, #args do
if options.encrypt then
-- encrypt a file
netpgp.encrypt_file(pgp, args[1], output, armour)
@@ -97,5 +97,4 @@
-- verification of detached signature
netpgp.verify_file(pgp, args[1], armour)
end
- i = i + 1
end
Home |
Main Index |
Thread Index |
Old Index