From 95c4d4a42f2b4457c64a87c45c7c170dfba6a7c4 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Tue, 22 Jan 2013 11:01:59 +0100 Subject: Revive radsecproxy.h and hostport_types.h and move rsp_* into radsecproxy/. --- lib/radsecproxy/tlscommon.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 lib/radsecproxy/tlscommon.h (limited to 'lib/radsecproxy/tlscommon.h') diff --git a/lib/radsecproxy/tlscommon.h b/lib/radsecproxy/tlscommon.h new file mode 100644 index 0000000..da2092e --- /dev/null +++ b/lib/radsecproxy/tlscommon.h @@ -0,0 +1,45 @@ +/* Copyright (c) 2007-2009, UNINETT AS */ +/* See LICENSE for licensing information. */ + +#include +#include + +#if defined (__cplusplus) +extern "C" { +#endif + +struct tls { + char *name; + char *cacertfile; + char *cacertpath; + char *certfile; + char *certkeyfile; + char *certkeypwd; + uint8_t crlcheck; + char **policyoids; + uint32_t cacheexpiry; + uint32_t tlsexpiry; + uint32_t dtlsexpiry; + X509_VERIFY_PARAM *vpm; + SSL_CTX *tlsctx; + SSL_CTX *dtlsctx; +}; + +#if defined(RADPROT_TLS) || defined(RADPROT_DTLS) +void ssl_init(); +struct tls *tlsgettls(char *alt1, char *alt2); +SSL_CTX *tlsgetctx(uint8_t type, struct tls *t); +X509 *verifytlscert(SSL *ssl); +int subjectaltnameaddr(X509 *cert, int family, const struct in6_addr *addr); +int subjectaltnameregexp(X509 *cert, int type, const char *exact, const regex_t *regex); +int cnregexp(X509 *cert, const char *exact, const regex_t *regex); +int verifyconfcert(X509 *cert, struct clsrvconf *conf); +#endif + +#if defined (__cplusplus) +} +#endif + +/* Local Variables: */ +/* c-file-style: "stroustrup" */ +/* End: */ -- cgit v1.1