summaryrefslogtreecommitdiff
path: root/python/vyos/configverify.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-09-06 21:23:44 +0200
committerChristian Poessinger <christian@poessinger.com>2021-09-06 21:23:44 +0200
commit3cd59879451504b4da865cc066112b1da882e5af (patch)
treee8242cd0c7f99a5fb5c113c944cdbb65649cfa3e /python/vyos/configverify.py
parentb45cef9185cc78de7bc4170403e47b8ee1d14e3b (diff)
downloadvyos-1x-3cd59879451504b4da865cc066112b1da882e5af.tar.gz
vyos-1x-3cd59879451504b4da865cc066112b1da882e5af.zip
pki: eapol: T3642: only add "pki" key to interface dict if pki is configured
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')