mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 16:57:00 +08:00
Added X-CSTP-Default-Domain option.
This commit is contained in:
@@ -169,6 +169,7 @@ unsigned j;
|
||||
#endif
|
||||
|
||||
READ_STRING("ca-cert", config->ca, 0);
|
||||
READ_STRING("default-domain", config->default_domain, 0);
|
||||
READ_STRING("crl", config->crl, 0);
|
||||
READ_STRING("cert-user-oid", config->cert_user_oid, 0);
|
||||
READ_STRING("cert-group-oid", config->cert_group_oid, 0);
|
||||
@@ -359,6 +360,7 @@ unsigned i;
|
||||
DEL(config->cert_hash);
|
||||
#endif
|
||||
DEL(config->socket_file_prefix);
|
||||
DEL(config->default_domain);
|
||||
DEL(config->plain_passwd);
|
||||
DEL(config->ocsp_response);
|
||||
DEL(config->banner);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
*
|
||||
* DO NOT EDIT THIS FILE (ocserv-args.c)
|
||||
*
|
||||
* It has been AutoGen-ed April 29, 2013 at 02:14:53 PM by AutoGen 5.17.3
|
||||
* It has been AutoGen-ed May 6, 2013 at 10:55:54 AM by AutoGen 5.17.3
|
||||
* From the definitions ocserv-args.def
|
||||
* and the template file options
|
||||
*
|
||||
|
||||
@@ -219,6 +219,9 @@ run-as-group = nogroup
|
||||
# The name of the tun device
|
||||
device = vpns
|
||||
|
||||
# The default domain to be advertised
|
||||
default-domain = example.com
|
||||
|
||||
# The pool of addresses that leases will be given from.
|
||||
ipv4-network = 192.168.1.0
|
||||
ipv4-netmask = 255.255.255.0
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
*
|
||||
* DO NOT EDIT THIS FILE (ocserv-args.h)
|
||||
*
|
||||
* It has been AutoGen-ed April 29, 2013 at 02:14:53 PM by AutoGen 5.17.3
|
||||
* It has been AutoGen-ed May 6, 2013 at 10:55:54 AM by AutoGen 5.17.3
|
||||
* From the definitions ocserv-args.def
|
||||
* and the template file options
|
||||
*
|
||||
|
||||
@@ -88,6 +88,7 @@ struct cfg_st {
|
||||
char *chroot_dir; /* where the xml files are served from */
|
||||
char *banner;
|
||||
char *ocsp_response; /* file with the OCSP response */
|
||||
char *default_domain; /* domain to be advertised */
|
||||
|
||||
char* socket_file_prefix;
|
||||
time_t cookie_validity; /* in seconds */
|
||||
|
||||
@@ -811,6 +811,11 @@ socklen_t sl;
|
||||
ret = tls_printf(ws->session, "X-CSTP-DPD: %u\r\n", ws->config->dpd);
|
||||
SEND_ERR(ret);
|
||||
|
||||
if (ws->config->default_domain) {
|
||||
ret = tls_printf(ws->session, "X-CSTP-Default-Domain: %s\r\n", ws->config->default_domain);
|
||||
SEND_ERR(ret);
|
||||
}
|
||||
|
||||
ws->udp_state = UP_DISABLED;
|
||||
if (req->master_secret_set != 0) {
|
||||
memcpy(ws->master_secret, req->master_secret, TLS_MASTER_SIZE);
|
||||
|
||||
Reference in New Issue
Block a user