summaryrefslogtreecommitdiff
path: root/src/conf_mode/interfaces-openvpn.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-03-20 08:02:55 +0100
committerGitHub <noreply@github.com>2020-03-20 08:02:55 +0100
commit86e504525f961c461389f48f808a51df73eb337f (patch)
tree9fb544463ba4bc5a896220b632c6c4546a05cde2 /src/conf_mode/interfaces-openvpn.py
parentd1b74e3ed68ae608a11ba22f15466f5a3c323e31 (diff)
parente6832e4ffdf3b8a75546af7fea5c0d5646126a5b (diff)
downloadvyos-1x-86e504525f961c461389f48f808a51df73eb337f.tar.gz
vyos-1x-86e504525f961c461389f48f808a51df73eb337f.zip
Merge pull request #249 from jjakob/fix-checkcertheader-func
T2140: openvpn: fix checkCertHeader function return value
Diffstat (limited to 'src/conf_mode/interfaces-openvpn.py')
-rwxr-xr-xsrc/conf_mode/interfaces-openvpn.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/conf_mode/interfaces-openvpn.py b/src/conf_mode/interfaces-openvpn.py
index 6b2e3e52e..5a25264d6 100755
--- a/src/conf_mode/interfaces-openvpn.py
+++ b/src/conf_mode/interfaces-openvpn.py
@@ -365,7 +365,7 @@ def fixup_permission(filename, permission=S_IRUSR):
def checkCertHeader(header, filename):
"""
Verify if filename contains specified header.
- Returns True on success or on file not found to not trigger the exceptions
+ Returns True if match is found, False if no match or file is not found
"""
if not os.path.isfile(filename):
return False
@@ -375,7 +375,7 @@ def checkCertHeader(header, filename):
if re.match(header, line):
return True
- return True
+ return False
def get_config():
openvpn = deepcopy(default_config_data)