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 Add tests for memory encrypt...



details:   https://anonhg.NetBSD.org/src/rev/ec603a6ba53d
branches:  trunk
changeset: 750247:ec603a6ba53d
user:      agc <agc%NetBSD.org@localhost>
date:      Tue Dec 22 07:09:39 2009 +0000

description:
Add tests for memory encryption and decryption, and signing and verification
(by pipes).

diffstat:

 crypto/external/bsd/netpgp/dist/tst |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (25 lines):

diff -r f6d08547369f -r ec603a6ba53d crypto/external/bsd/netpgp/dist/tst
--- a/crypto/external/bsd/netpgp/dist/tst       Tue Dec 22 06:55:03 2009 +0000
+++ b/crypto/external/bsd/netpgp/dist/tst       Tue Dec 22 07:09:39 2009 +0000
@@ -31,7 +31,7 @@
        su root -c "make install"'
 
 passed=0
-total=21
+total=23
 echo "======> sign/verify 180938 file"
 cp configure a
 /usr/bin/netpgp --sign a
@@ -103,5 +103,11 @@
 sudo /usr/bin/netpgp --ssh-keys --sshkeyfile=/etc/ssh/ssh_host_rsa_key.pub --sign a
 sudo chmod 644 a.gpg
 /usr/bin/netpgp --verify --ssh-keys --sshkeyfile=/etc/ssh/ssh_host_rsa_key.pub a.gpg && passed=$(expr $passed + 1)
-rm -f a a.gpg b b.gpg c c.gpg d d.gpg e f f.sig g g.asc a2 a3
+echo "======> pipeline and memory encrypt/decrypt"
+/usr/bin/netpgp --encrypt < a | /usr/bin/netpgp --decrypt > a4
+diff a a4 && passed=$(expr $passed + 1)
+echo "======> pipeline and memory sign/verify"
+/usr/bin/netpgp --sign < a | /usr/bin/netpgp --cat > a5
+diff a a5 && passed=$(expr $passed + 1)
+rm -f a a.gpg b b.gpg c c.gpg d d.gpg e f f.sig g g.asc a2 a3 a4 a5
 echo "Passed ${passed}/${total} tests"



Home | Main Index | Thread Index | Old Index