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/perl Turns out that...
details: https://anonhg.NetBSD.org/src/rev/5f617daa38c0
branches: trunk
changeset: 749505:5f617daa38c0
user: agc <agc%NetBSD.org@localhost>
date: Tue Dec 01 08:02:50 2009 +0000
description:
Turns out that swig and tainted don't play well together - perl has no way
of knowing whether the memory will be modified. For now, the gross hack is
to switch off tainting
diffstat:
crypto/external/bsd/netpgp/dist/bindings/perl/netpgp.pl | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diffs (36 lines):
diff -r feb5aba33084 -r 5f617daa38c0 crypto/external/bsd/netpgp/dist/bindings/perl/netpgp.pl
--- a/crypto/external/bsd/netpgp/dist/bindings/perl/netpgp.pl Tue Dec 01 06:43:57 2009 +0000
+++ b/crypto/external/bsd/netpgp/dist/bindings/perl/netpgp.pl Tue Dec 01 08:02:50 2009 +0000
@@ -1,4 +1,4 @@
-#! /usr/pkg/bin/perl -wT
+#! /usr/pkg/bin/perl -w
# netpgp bindings for perl
@@ -8,7 +8,7 @@
# initializations
$n = netpgpperlc::new_netpgp_t();
-netpgpperlc::netpgp_setvar($n, "homedir", "/home/agc/.gnupg");
+netpgpperlc::netpgp_setvar($n, "homedir", $ENV{'HOME'}."/.gnupg");
netpgpperlc::netpgp_setvar($n, "hash", "SHA256");
netpgpperlc::netpgp_init($n);
@@ -17,13 +17,12 @@
foreach $i (0 .. $#ARGV) {
# set up file names
- #my $in = $ARGV[$i];
- #my $out = $in . ".gpg";
+ my $in = $ARGV[$i];
+ my $out = $in . ".gpg";
# sign the file, output is in $out
- #netpgpperlc::netpgp_sign_file($n, $userid, $in, $out, 0, 0, 0);
- netpgpperlc::netpgp_sign_file($n, $userid, "a", "a.gpg", 0, 0, 0);
+ netpgpperlc::netpgp_sign_file($n, $userid, $in, $out, 0, 0, 0);
# verify the signed file $out
- netpgpperlc::netpgp_verify_file($n, "a.gpg", "/dev/null", 0);
+ netpgpperlc::netpgp_verify_file($n, $out, "/dev/null", 0);
}
Home |
Main Index |
Thread Index |
Old Index