mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-10-14 02:22:03 +08:00
Added plain password format
This commit is contained in:
@@ -127,6 +127,16 @@ unsigned j;
|
||||
fprintf(stderr, "PAM support is disabled\n");
|
||||
exit(1);
|
||||
#endif
|
||||
} else if (strncasecmp(auth[j], "plain[", 6) == 0) {
|
||||
char* p;
|
||||
config->plain_passwd = strdup(auth[j]+6);
|
||||
p = strchr(config->plain_passwd, ']');
|
||||
if (p == NULL) {
|
||||
fprintf(stderr, "Format error in %s\n", auth[j]);
|
||||
exit(1);
|
||||
}
|
||||
*p = 0;
|
||||
config->auth_types |= AUTH_TYPE_PLAIN;
|
||||
} else if (strcasecmp(auth[j], "certificate") == 0) {
|
||||
config->auth_types |= AUTH_TYPE_CERTIFICATE;
|
||||
} else {
|
||||
@@ -336,6 +346,7 @@ unsigned i;
|
||||
DEL(config->xml_config_hash);
|
||||
DEL(config->cert_hash);
|
||||
#endif
|
||||
DEL(config->plain_passwd);
|
||||
DEL(config->ocsp_response);
|
||||
DEL(config->banner);
|
||||
DEL(config->dh_params_file);
|
||||
|
||||
Reference in New Issue
Block a user