mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 16:57:00 +08:00
when multiple auth methods are set, do not 'require' a certificate
This commit is contained in:
@@ -989,14 +989,14 @@ static void check_cfg(struct perm_cfg_st *perm_config)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (perm_config->auth[0].type & AUTH_TYPE_CERTIFICATE) {
|
||||
if (perm_config->auth[0].type & AUTH_TYPE_CERTIFICATE && perm_config->auth_methods == 1) {
|
||||
if (perm_config->config->cisco_client_compat == 0)
|
||||
perm_config->config->cert_req = GNUTLS_CERT_REQUIRE;
|
||||
else
|
||||
perm_config->config->cert_req = GNUTLS_CERT_REQUEST;
|
||||
} else {
|
||||
unsigned i;
|
||||
for (i=1;i<perm_config->auth_methods;i++) {
|
||||
for (i=0;i<perm_config->auth_methods;i++) {
|
||||
if (perm_config->auth[i].type & AUTH_TYPE_CERTIFICATE) {
|
||||
perm_config->config->cert_req = GNUTLS_CERT_REQUEST;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user