6819cd0c71a6d0bd57efb302b7fb74b083a3b89a
[radsecproxy.git] / lib / rsp_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 #if defined (__cplusplus)
12 extern "C" {
13 #endif
14
15 struct tls {
16     char *name;
17     char *cacertfile;
18     char *cacertpath;
19     char *certfile;
20     char *certkeyfile;
21     char *certkeypwd;
22     uint8_t crlcheck;
23     char **policyoids;
24     uint32_t cacheexpiry;
25     uint32_t tlsexpiry;
26     uint32_t dtlsexpiry;
27     X509_VERIFY_PARAM *vpm;
28     SSL_CTX *tlsctx;
29     SSL_CTX *dtlsctx;
30 };
31
32 #if defined(RADPROT_TLS) || defined(RADPROT_DTLS)
33 void ssl_init();
34 struct tls *tlsgettls(char *alt1, char *alt2);
35 SSL_CTX *tlsgetctx(uint8_t type, struct tls *t);
36 X509 *verifytlscert(SSL *ssl);
37 int verifyconfcert(X509 *cert, struct clsrvconf *conf);
38 int conftls_cb(struct gconffile **cf, void *arg, char *block, char *opt, char *val);
39 int addmatchcertattr(struct clsrvconf *conf);
40 #endif
41
42 #if defined (__cplusplus)
43 }
44 #endif
45
46 /* Local Variables: */
47 /* c-file-style: "stroustrup" */
48 /* End: */