summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@io.vyatta.com>2008-12-01 21:10:18 -0800
committerStig Thormodsrud <stig@io.vyatta.com>2008-12-01 21:10:18 -0800
commit88ea4b3146c102a9396a7ea52a63778dbb4cc688 (patch)
tree3680c3737e2fbb2e6fc4c24c2f1c37cd44b3ffd7
parent4d5998811729ff98bf8dd64be5a9b8de644ca394 (diff)
downloadvyatta-op-vpn-88ea4b3146c102a9396a7ea52a63778dbb4cc688.tar.gz
vyatta-op-vpn-88ea4b3146c102a9396a7ea52a63778dbb4cc688.zip
"vpn rsa-key generate" command broken - use new perl hierarchy.
-rwxr-xr-xscripts/gen_local_rsa_key.pl12
1 files changed, 6 insertions, 6 deletions
diff --git a/scripts/gen_local_rsa_key.pl b/scripts/gen_local_rsa_key.pl
index 83dacde..59df436 100755
--- a/scripts/gen_local_rsa_key.pl
+++ b/scripts/gen_local_rsa_key.pl
@@ -24,10 +24,10 @@
#
use strict;
-#use warnings;
+use warnings;
use lib "/opt/vyatta/share/perl5/";
-use VyattaVPNUtil;
+use Vyatta::VPN::Util;
# Defaults
@@ -62,7 +62,7 @@ unless (-r $device) {
die "invalid random number device $device\n";
}
-my $local_key_file = VyattaVPNUtil::rsa_get_local_key_file();
+my $local_key_file = rsa_get_local_key_file();
my ($cmd, $rc);
@@ -95,18 +95,18 @@ $cmd = "/usr/sbin/ipsec newhostkey --output $local_key_file --bits $bits";
$cmd .= " --random $device";
print "Generating rsa-key to $local_key_file\n";
-VyattaVPNUtil::vpn_debug $cmd;
+vpn_debug $cmd;
$rc = system($cmd);
if ($rc != 0) {
die "Can not generate RSA key: $!\n";
}
-my $file_pubkey = VyattaVPNUtil::rsa_get_local_pubkey($local_key_file);
+my $file_pubkey = rsa_get_local_pubkey($local_key_file);
if ($file_pubkey ne 0) {
print "\nYour new local RSA key has been generated\n";
print "The public portion of the key is:\n\n$file_pubkey\n\n";
$cmd = "ipsec auto --rereadall 2> /dev/null";
- VyattaVPNUtil::vpn_debug $cmd;
+ vpn_debug $cmd;
system $cmd;
exit 0;
}