diff options
author | Ryan Riske <ryanriske@gmail.com> | 2015-03-01 21:28:00 -0600 |
---|---|---|
committer | Ryan Riske <ryanriske@gmail.com> | 2015-03-01 21:28:00 -0600 |
commit | 57d284aded5003468dee946f906bf88f09a79d5a (patch) | |
tree | 6b1c72cba4986e315a52c9670e6f8aa4694c3de6 /lib | |
parent | 7c6c1e2073207612a2d819471bc680564c945cc7 (diff) | |
download | vyatta-cfg-vpn-57d284aded5003468dee946f906bf88f09a79d5a.tar.gz vyatta-cfg-vpn-57d284aded5003468dee946f906bf88f09a79d5a.zip |
Exclude '0s' from public key string input in rsa_convert_pubkey_pem
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/Vyatta/VPN/Util.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Vyatta/VPN/Util.pm b/lib/Vyatta/VPN/Util.pm index 65877b0..606178a 100755 --- a/lib/Vyatta/VPN/Util.pm +++ b/lib/Vyatta/VPN/Util.pm @@ -157,7 +157,7 @@ sub rsa_get_local_pubkey { sub rsa_convert_pubkey_pem { my $key = shift; - my $decoded = decode_base64($key); + my $decoded = decode_base64(substr($key, 2)); my $len = unpack("C", substr($decoded, 0, 1)); my $e = Crypt::OpenSSL::Bignum->new_from_bin(substr($decoded, 1, $len)); my $n = Crypt::OpenSSL::Bignum->new_from_bin(substr($decoded, 1 + $len)); |