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