Files
bitchx/include/ssl.h
Kevin Easton 3f87eb31b1 Standardise header include guards
Tokens that begin with two underscores __* or an underscore and an uppercase letter _X* are reserved,
so we should avoid those for our own include guards.  The standard I'm settling on for foo.h is FOO_H_.
2017-05-10 23:30:11 +10:00

33 lines
888 B
C

#ifndef SSL_H_
#define SSL_H_
#if defined(HAVE_LIBSSL) && !defined(IN_MODULE)
#include <openssl/crypto.h>
#include <openssl/x509.h>
#include <openssl/pem.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include <openssl/rand.h>
#ifndef TRUE
#define TRUE 0
#endif
#ifndef FALSE
#define FALSE 1
#endif
#define CHK_NULL(x) if ((x)==NULL) { say("SSL error - NULL data form server"); close_server(refnum, empty_string); return(-1); }
#define CHK_ERR(err,s) if ((err)==-1) { say("SSL prime error - %s",s); close_server(refnum, empty_string); return(-1); }
#define CHK_SSL(err) if ((err)==-1) { say("SSL CHK error - %d %d",err,SSL_get_error(server_list[refnum].ssl_fd, err)); close_server(refnum, empty_string); return(-2); }
void SSL_show_errors(void);
/* Make these what you want for cert & key files */
/*extern SSL_CTX* ctx;*/
/*extern SSL_METHOD *meth;*/
#endif
#endif