summaryrefslogtreecommitdiff
path: root/python/vyos/configverify.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/vyos/configverify.py')
-rw-r--r--python/vyos/configverify.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/python/vyos/configverify.py b/python/vyos/configverify.py
index 760255d0e..8aca76568 100644
--- a/python/vyos/configverify.py
+++ b/python/vyos/configverify.py
@@ -152,11 +152,10 @@ def verify_eapol(config):
if 'certificate' not in config['eapol']:
raise ConfigError('Certificate must be specified when using EAPoL!')
- if 'certificate' not in config['pki']:
+ if 'pki' not in config or 'certificate' not in config['pki']:
raise ConfigError('Invalid certificate specified for EAPoL')
cert_name = config['eapol']['certificate']
-
if cert_name not in config['pki']['certificate']:
raise ConfigError('Invalid certificate specified for EAPoL')