1 /* Copyright (c) 2007-2009, UNINETT AS 2 * Copyright (c) 2016, NORDUnet A/S */ 3 /* See LICENSE for licensing information. */ 4 5 #include <openssl/ssl.h> 6 7 #if OPENSSL_VERSION_NUMBER < 0x10100000L 8 #define ASN1_STRING_get0_data(o) ((o)->data) 9 #define ASN1_STRING_length(o) ((o)->length) 10 #endif 11 12 struct tls { 13 char *name; 14 char *cacertfile; 15 char *cacertpath; 16 char *certfile; 17 char *certkeyfile; 18 char *certkeypwd; 19 uint8_t crlcheck; 20 char **policyoids; 21 uint32_t cacheexpiry; 22 uint32_t tlsexpiry; 23 uint32_t dtlsexpiry; 24 X509_VERIFY_PARAM *vpm; 25 SSL_CTX *tlsctx; 26 SSL_CTX *dtlsctx; 27 SSL *dtlssslprep; 28 pthread_mutex_t lock; 29 }; 30 31 #if defined(RADPROT_TLS) || defined(RADPROT_DTLS) 32 void sslinit(); 33 struct tls *tlsgettls(char *alt1, char *alt2); 34 SSL_CTX *tlsgetctx(uint8_t type, struct tls *t); 35 X509 *verifytlscert(SSL *ssl); 36 int verifyconfcert(X509 *cert, struct clsrvconf *conf); 37 int conftls_cb(struct gconffile **cf, void *arg, char *block, char *opt, char *val); 38 int addmatchcertattr(struct clsrvconf *conf); 39 void tlsreloadcrls(); 40 int sslconnecttimeout(SSL *ssl, int timeout); 41 int sslaccepttimeout (SSL *ssl, int timeout); 42 #endif 43 44 /* Local Variables: */ 45 /* c-file-style: "stroustrup" */ 46 /* End: */ 47