WIP: Fix the Proxy-State issue.
[libradsec.git] / tlscommon.h
1 /* Copyright (c) 2007-2009, UNINETT AS */
2 /* See LICENSE for licensing information. */
3
4 #include <openssl/ssl.h>
5
6 struct tls {
7     char *name;
8     char *cacertfile;
9     char *cacertpath;
10     char *certfile;
11     char *certkeyfile;
12     char *certkeypwd;
13     uint8_t crlcheck;
14     char **policyoids;
15     uint32_t cacheexpiry;
16     uint32_t tlsexpiry;
17     uint32_t dtlsexpiry;
18     X509_VERIFY_PARAM *vpm;
19     SSL_CTX *tlsctx;
20     SSL_CTX *dtlsctx;
21 };
22
23 #if defined(RADPROT_TLS) || defined(RADPROT_DTLS)
24 struct tls *tlsgettls(char *alt1, char *alt2);
25 SSL_CTX *tlsgetctx(uint8_t type, struct tls *t);
26 X509 *verifytlscert(SSL *ssl);
27 int verifyconfcert(X509 *cert, struct clsrvconf *conf);
28 int conftls_cb(struct gconffile **cf, void *arg, char *block, char *opt, char *val);
29 int addmatchcertattr(struct clsrvconf *conf);
30 #endif
31
32 /* Local Variables: */
33 /* c-file-style: "stroustrup" */
34 /* End: */