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