From 65282c7685ca01c57d94d3df93c2f95d5b945e57 Mon Sep 17 00:00:00 2001 From: "M. Sean Finney" Date: Wed, 19 Oct 2005 12:59:55 +0000 Subject: - initial attempt at consolidating ssl-related code into netutils.{c,h} - added some #ifdefs to common.h and netutils.h to prevent multiple inclusions (as netlibs now includes common.h) - all ssl plugins (tcp/http/smtp) compile cleanly against gnutls, though certificate checking still needs to be done. - modified configure script so you can also explicitly say "without-gnutls" too (otherwise if you disable openssl you have no way of disabling gnutls too) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1255 f882894a-f735-0410-b71e-b25c423dba1c --- plugins/common.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'plugins/common.h') diff --git a/plugins/common.h b/plugins/common.h index e10586bc..5eac63e4 100644 --- a/plugins/common.h +++ b/plugins/common.h @@ -32,6 +32,9 @@ * *****************************************************************************/ +#ifndef _COMMON_H_ +#define _COMMON_H_ + #include "config.h" #ifdef HAVE_FEATURES_H @@ -146,6 +149,29 @@ int snprintf(char *str, size_t size, const char *format, ...); int vsnprintf(char *str, size_t size, const char *format, va_list ap); #endif +/* SSL implementations */ +#ifdef HAVE_GNUTLS_OPENSSL_H +# include +#else +# ifdef HAVE_SSL_H +# include +# include +# include +# include +# include +# include +# else +# ifdef HAVE_OPENSSL_SSL_H +# include +# include +# include +# include +# include +# include +# endif +# endif +#endif + /* * * Standard Values @@ -191,3 +217,5 @@ enum { #ifndef __GNUC__ # define __attribute__(x) /* do nothing */ #endif + +#endif /* _COMMON_H_ */ -- cgit v1.2.3