radsecproxy-1.6.5.
[radsecproxy.git] / tlscommon.h
1 /*
2  * Copyright (C) 2006-2008 Stig Venaas <venaas@uninett.no>
3  *
4  * Permission to use, copy, modify, and distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  */
8
9 #include <openssl/ssl.h>
10
11 struct tls {
12     char *name;
13     char *cacertfile;
14     char *cacertpath;
15     char *certfile;
16     char *certkeyfile;
17     char *certkeypwd;
18     uint8_t crlcheck;
19     char **policyoids;
20     uint32_t cacheexpiry;
21     uint32_t tlsexpiry;
22     uint32_t dtlsexpiry;
23     X509_VERIFY_PARAM *vpm;
24     SSL_CTX *tlsctx;
25     SSL_CTX *dtlsctx;
26 };
27
28 #if defined(RADPROT_TLS) || defined(RADPROT_DTLS)
29 struct tls *tlsgettls(char *alt1, char *alt2);
30 SSL_CTX *tlsgetctx(uint8_t type, struct tls *t);
31 X509 *verifytlscert(SSL *ssl);
32 int verifyconfcert(X509 *cert, struct clsrvconf *conf);
33 int conftls_cb(struct gconffile **cf, void *arg, char *block, char *opt, char *val);
34 int addmatchcertattr(struct clsrvconf *conf);
35 #endif
36
37 /* Local Variables: */
38 /* c-file-style: "stroustrup" */
39 /* End: */