diff options
-rwxr-xr-x | scripts/gen_local_rsa_key.pl | 10 | ||||
-rwxr-xr-x | scripts/vyatta-show-vpn.pl | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/scripts/gen_local_rsa_key.pl b/scripts/gen_local_rsa_key.pl index 83dacde..917f582 100755 --- a/scripts/gen_local_rsa_key.pl +++ b/scripts/gen_local_rsa_key.pl @@ -27,7 +27,7 @@ use strict; #use warnings; use lib "/opt/vyatta/share/perl5/"; -use VyattaVPNUtil; +use Vyatta::VPNUtil; # 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 = Vyatta::VPNUtil::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; +Vyatta::VPNUtil::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 = Vyatta::VPNUtil::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; + Vyatta::VPNUtil::vpn_debug $cmd; system $cmd; exit 0; } diff --git a/scripts/vyatta-show-vpn.pl b/scripts/vyatta-show-vpn.pl index df8477b..503af6e 100755 --- a/scripts/vyatta-show-vpn.pl +++ b/scripts/vyatta-show-vpn.pl @@ -55,19 +55,19 @@ if ($arg0 eq 'secrets') { if ($arg0 eq 'rsa-keys') { - use VyattaVPNUtil; - my $key_file = VyattaVPNUtil::rsa_get_local_key_file(); + use Vyatta::VPNUtil; + my $key_file = Vyatta::VPNUtil::rsa_get_local_key_file(); unless ( -r $key_file) { die "No key file $key_file found.\n"; } - my $pubkey = VyattaVPNUtil::rsa_get_local_pubkey($key_file); + my $pubkey = Vyatta::VPNUtil::rsa_get_local_pubkey($key_file); if ($pubkey eq 0) { die "No local pubkey found.\n"; } print "\nLocal public key ($key_file):\n\n$pubkey\n\n"; - use VyattaConfig; - my $vc = new VyattaConfig(); + use Vyatta::Config; + my $vc = new Vyatta::Config(); $vc->setLevel('vpn'); my @peers = $vc->listOrigNodes('ipsec site-to-site peer'); |