Module Name: src Committed By: agc Date: Tue Dec 1 08:02:50 UTC 2009
Modified Files: src/crypto/external/bsd/netpgp/dist/bindings/perl: netpgp.pl Log Message: 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 To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 \ src/crypto/external/bsd/netpgp/dist/bindings/perl/netpgp.pl 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/bindings/perl/netpgp.pl diff -u src/crypto/external/bsd/netpgp/dist/bindings/perl/netpgp.pl:1.1 src/crypto/external/bsd/netpgp/dist/bindings/perl/netpgp.pl:1.2 --- src/crypto/external/bsd/netpgp/dist/bindings/perl/netpgp.pl:1.1 Tue Dec 1 06:43:57 2009 +++ src/crypto/external/bsd/netpgp/dist/bindings/perl/netpgp.pl Tue Dec 1 08:02:50 2009 @@ -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); }