summaryrefslogtreecommitdiff
path: root/src/conf_mode/vpn_rsa-keys.py
diff options
context:
space:
mode:
authorSimon <965089+sarthurdev@users.noreply.github.com>2021-05-30 12:07:18 +0200
committerGitHub <noreply@github.com>2021-05-30 12:07:18 +0200
commitd79cbf74142d4ab9fb00ff583c147a95a134ed92 (patch)
treedb1eb1027983d6a63e2d18ee34fd9fbb6bb50b4c /src/conf_mode/vpn_rsa-keys.py
parent3e6e4a1738dc2bcf173c6e450ad4d43dda54f283 (diff)
downloadvyos-1x-d79cbf74142d4ab9fb00ff583c147a95a134ed92.tar.gz
vyos-1x-d79cbf74142d4ab9fb00ff583c147a95a134ed92.zip
ipsec: T2816: Refactor to remove global variable and tidy up
Diffstat (limited to 'src/conf_mode/vpn_rsa-keys.py')
-rwxr-xr-xsrc/conf_mode/vpn_rsa-keys.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/conf_mode/vpn_rsa-keys.py b/src/conf_mode/vpn_rsa-keys.py
index a0e2e2690..6cf7eba6e 100755
--- a/src/conf_mode/vpn_rsa-keys.py
+++ b/src/conf_mode/vpn_rsa-keys.py
@@ -56,8 +56,9 @@ def verify(conf):
def get_local_key(local_key):
for path in LOCAL_KEY_PATHS:
- if os.path.exists(path + local_key):
- return path + local_key
+ full_path = os.path.join(path, local_key)
+ if os.path.exists(full_path):
+ return full_path
return False
def generate(conf):