ucspi-ssl 0.13.03
ucspi-ssl
Loading...
Searching...
No Matches
ssl_cca.c
Go to the documentation of this file.
1#include "ucspissl.h"
2
3int ssl_cca(SSL_CTX *ctx,const char *certfile)
4{
5 STACK_OF(X509_NAME) *x;
6
7 if (!certfile) return 1;
8
9 x = SSL_load_client_CA_file(certfile);
10 if (!x) return 0;
11
12 SSL_CTX_set_client_CA_list(ctx,x);
13
14 SSL_CTX_set_verify(ctx,SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE | SSL_VERIFY_FAIL_IF_NO_PEER_CERT,0);
15
16 return 1;
17}
18
int ssl_cca(SSL_CTX *ctx, const char *certfile)
Definition: ssl_cca.c:3
const char * certfile
Definition: sslclient.c:106
SSL_CTX * ctx
Definition: sslclient.c:105
Header file to be used with sqmail; previously called ssl.h. (name clash)