src/ssl_sock.c
static int srv_parse_verify(char **args, int *cur_arg, struct proxy *px, struct server *newsrv, char **err)
{
	if (!*args[*cur_arg + 1]) {
		if (err)
			memprintf(err, "'%s' : missing verify method", args[*cur_arg]);
		return ERR_ALERT | ERR_FATAL;
	}

	if (strcmp(args[*cur_arg + 1], "none") == 0)
		newsrv->ssl_ctx.verify = SSL_VERIFY_NONE;
	else if (strcmp(args[*cur_arg + 1], "required") == 0)
		newsrv->ssl_ctx.verify = SSL_VERIFY_PEER;
	else {
		if (err)
			memprintf(err, "'%s' : unknown verify method '%s', only 'none' and 'required' are supported\n",
			          args[*cur_arg], args[*cur_arg + 1]);
		return ERR_ALERT | ERR_FATAL;
	}

	return 0;
}
/* parse the "verify" server keyword */
parse the "verify" server keyword
parse the " verify " server keyword
static int srv_parse_verify(char **args, int *cur_arg, struct proxy *px, struct server *newsrv, char **err)
{
	if (!*args[*cur_arg + 1]) {
		if (err)
			memprintf(err, "'%s' : missing verify method", args[*cur_arg]);
		return ERR_ALERT | ERR_FATAL;
	}
	if (strcmp(args[*cur_arg + 1], "none") == 0)
		newsrv->ssl_ctx.verify = SSL_VERIFY_NONE;
	else if (strcmp(args[*cur_arg + 1], "required") == 0)
		newsrv->ssl_ctx.verify = SSL_VERIFY_PEER;
	else {
		if (err)
			memprintf(err, "'%s' : unknown verify method '%s', only 'none' and 'required' are supported\n",
			          args[*cur_arg], args[*cur_arg + 1]);
		return ERR_ALERT | ERR_FATAL;
	}
	return 0;
}
static int srv_parse_verify ( char * * args , int * cur_arg , struct proxy * px , struct server * newsrv , char * * err ) { if ( ! * args [ * cur_arg + 1 ] ) { if ( err ) memprintf ( err , " " , args [ * cur_arg ] ) ; return ERR_ALERT | ERR_FATAL ; } if ( strcmp ( args [ * cur_arg + 1 ] , " " ) == 0 ) newsrv -> ssl_ctx . verify = SSL_VERIFY_NONE ; else if ( strcmp ( args [ * cur_arg + 1 ] , " " ) == 0 ) newsrv -> ssl_ctx . verify = SSL_VERIFY_PEER ; else { if ( err ) memprintf ( err , " \n " , args [ * cur_arg ] , args [ * cur_arg + 1 ] ) ; return ERR_ALERT | ERR_FATAL ; } return 0 ; }
parse the "verify" server keyword
parse the " verify " server keyword