File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -30,14 +30,14 @@ auth = "plain[otp=/run/ocserv/users.oath]"
3030{% else %}
3131auth = "plain[/run/ocserv/ocpasswd]"
3232{% endif %}
33- {% elif "cert " in authentication .mode %}
33+ {% elif "certificate " in authentication .mode %}
3434auth = "certificate"
35- {% if authentication .mode .cert == "cn" %}
35+ {% if authentication .mode .certificate == "cn" %}
3636cert-user-oid = 2.5.4.3
37- {% elif authentication .mode .cert == "uid" %}
37+ {% elif authentication .mode .certificate == "uid" %}
3838cert-user-oid = 0.9.2342.19200300.100.1.1
3939{% else %}
40- cert-user-oid = {{ authentication.mode.cert }}
40+ cert-user-oid = {{ authentication.mode.certificate }}
4141{% endif %}
4242{% else %}
4343auth = "plain[/run/ocserv/ocpasswd]"
Original file line number Diff line number Diff line change 6969 <valueless />
7070 </properties >
7171 </leafNode >
72- <leafNode name =" cert " >
72+ <leafNode name =" certificate " >
7373 <properties >
7474 <help >Use certificate based authentication</help >
7575 <valueHelp >
Original file line number Diff line number Diff line change @@ -108,13 +108,13 @@ def verify(ocserv):
108108 and 'radius' in ocserv ['authentication' ]['mode' ])
109109 or
110110 ('local' in ocserv ['authentication' ]['mode' ]
111- and 'cert ' in ocserv ['authentication' ]['mode' ])
111+ and 'certificate ' in ocserv ['authentication' ]['mode' ])
112112 or
113113 ('radius' in ocserv ['authentication' ]['mode' ]
114- and 'cert ' in ocserv ['authentication' ]['mode' ])
114+ and 'certificate ' in ocserv ['authentication' ]['mode' ])
115115 ):
116116 raise ConfigError (
117- 'OpenConnect authentication modes are mutually-exclusive. Only one of local, radius, or cert .'
117+ 'OpenConnect authentication modes are mutually-exclusive. Only one of local, radius, or certificate .'
118118 )
119119 if 'radius' in ocserv ['authentication' ]['mode' ]:
120120 if 'server' not in ocserv ['authentication' ]['radius' ]:
@@ -208,7 +208,7 @@ def verify(ocserv):
208208 raise ConfigError ('SSL certificate missing on OpenConnect config!' )
209209 verify_pki_certificate (ocserv , ocserv ['ssl' ]['certificate' ])
210210
211- if 'ca_certificate' not in ocserv ['ssl' ] and 'cert ' in ocserv ['authentication' ]['mode' ]:
211+ if 'ca_certificate' not in ocserv ['ssl' ] and 'certificiate ' in ocserv ['authentication' ]['mode' ]:
212212 raise ConfigError ('CA certificate must be provided in certificate authentication mode!' )
213213
214214 if 'ca_certificate' in ocserv ['ssl' ]:
You can’t perform that action at this time.
0 commit comments