src/ssl_sock.c
static int
smp_fetch_ssl_c_ca_err_depth(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
                             const struct arg *args, struct sample *smp)
{
	if (!l4 || l4->si[0].conn->xprt != &ssl_sock)
		return 0;

	if (!(l4->si[0].conn->flags & CO_FL_CONNECTED)) {
		smp->flags = SMP_F_MAY_CHANGE;
		return 0;
	}

	smp->type = SMP_T_UINT;
	smp->data.uint = (unsigned int)SSL_SOCK_ST_TO_CAEDEPTH(l4->si[0].conn->xprt_st);
	smp->flags = 0;

	return 1;
}
/* integer, returns the depth of the first verify error in CA chain of client certificate chain. */
integer, returns the depth of the first verify error in CA chain of client certificate chain.
integer returns the depth of the first verify error in CA chain of client certificate chain .
static int
smp_fetch_ssl_c_ca_err_depth(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
                             const struct arg *args, struct sample *smp)
{
	if (!l4 || l4->si[0].conn->xprt != &ssl_sock)
		return 0;
	if (!(l4->si[0].conn->flags & CO_FL_CONNECTED)) {
		smp->flags = SMP_F_MAY_CHANGE;
		return 0;
	}
	smp->type = SMP_T_UINT;
	smp->data.uint = (unsigned int)SSL_SOCK_ST_TO_CAEDEPTH(l4->si[0].conn->xprt_st);
	smp->flags = 0;
	return 1;
}
static int smp_fetch_ssl_c_ca_err_depth ( struct proxy * px , struct session * l4 , void * l7 , unsigned int opt , const struct arg * args , struct sample * smp ) { if ( ! l4 || l4 -> si [ 0 ] . conn -> xprt != & ssl_sock ) return 0 ; if ( ! ( l4 -> si [ 0 ] . conn -> flags & CO_FL_CONNECTED ) ) { smp -> flags = SMP_F_MAY_CHANGE ; return 0 ; } smp -> type = SMP_T_UINT ; smp -> data . uint = ( unsigned int ) SSL_SOCK_ST_TO_CAEDEPTH ( l4 -> si [ 0 ] . conn -> xprt_st ) ; smp -> flags = 0 ; return 1 ; }
integer, returns the depth of the first verify error in CA chain of client certificate chain.
integer returns the depth of the first verify error in CA chain of client certificate chain .