diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-12-02 14:51:29 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-12-02 14:51:29 -0800 |
commit | ed5dd4c71775a2f1a15b25a29b7272a95a639cf1 (patch) | |
tree | 138cc0fb25faa779f2ef1598772e3df7f7506614 /scripts/gen_local_rsa_key.pl | |
parent | 59ec69fd129940f43acf144e974bdd8711b7dacb (diff) | |
parent | 88ea4b3146c102a9396a7ea52a63778dbb4cc688 (diff) | |
download | vyatta-op-vpn-ed5dd4c71775a2f1a15b25a29b7272a95a639cf1.tar.gz vyatta-op-vpn-ed5dd4c71775a2f1a15b25a29b7272a95a639cf1.zip |
Merge branch 'jenner' of suva.vyatta.com:/git/vyatta-op-vpn into jenner
Conflicts:
scripts/gen_local_rsa_key.pl
Diffstat (limited to 'scripts/gen_local_rsa_key.pl')
-rwxr-xr-x | scripts/gen_local_rsa_key.pl | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/scripts/gen_local_rsa_key.pl b/scripts/gen_local_rsa_key.pl index 917f582..54d1e68 100755 --- a/scripts/gen_local_rsa_key.pl +++ b/scripts/gen_local_rsa_key.pl @@ -24,10 +24,9 @@ # use strict; -#use warnings; +use warnings; use lib "/opt/vyatta/share/perl5/"; - -use Vyatta::VPNUtil; +use Vyatta::VPN::Util; # Defaults @@ -62,7 +61,7 @@ unless (-r $device) { die "invalid random number device $device\n"; } -my $local_key_file = Vyatta::VPNUtil::rsa_get_local_key_file(); +my $local_key_file = rsa_get_local_key_file(); my ($cmd, $rc); @@ -95,18 +94,18 @@ $cmd = "/usr/sbin/ipsec newhostkey --output $local_key_file --bits $bits"; $cmd .= " --random $device"; print "Generating rsa-key to $local_key_file\n"; -Vyatta::VPNUtil::vpn_debug $cmd; +vpn_debug $cmd; $rc = system($cmd); if ($rc != 0) { die "Can not generate RSA key: $!\n"; } -my $file_pubkey = Vyatta::VPNUtil::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"; - Vyatta::VPNUtil::vpn_debug $cmd; + vpn_debug $cmd; system $cmd; exit 0; } |