aboutsummaryrefslogtreecommitdiff
path: root/plugins/common.h
diff options
context:
space:
mode:
authorGravatar M. Sean Finney <seanius@users.sourceforge.net> 2005-10-19 12:59:55 +0000
committerGravatar M. Sean Finney <seanius@users.sourceforge.net> 2005-10-19 12:59:55 +0000
commit65282c7685ca01c57d94d3df93c2f95d5b945e57 (patch)
treeeb1d0c95752126bd526d939332d14bf40cf7d1f7 /plugins/common.h
parent8611341fb989382545c0c934c700e027d9bbab15 (diff)
downloadmonitoring-plugins-65282c7685ca01c57d94d3df93c2f95d5b945e57.tar.gz
- 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
Diffstat (limited to 'plugins/common.h')
-rw-r--r--plugins/common.h28
1 files changed, 28 insertions, 0 deletions
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 <gnutls/openssl.h>
+#else
+# ifdef HAVE_SSL_H
+# include <rsa.h>
+# include <crypto.h>
+# include <x509.h>
+# include <pem.h>
+# include <ssl.h>
+# include <err.h>
+# else
+# ifdef HAVE_OPENSSL_SSL_H
+# include <openssl/rsa.h>
+# include <openssl/crypto.h>
+# include <openssl/x509.h>
+# include <openssl/pem.h>
+# include <openssl/ssl.h>
+# include <openssl/err.h>
+# endif
+# endif
+#endif
+
/*
*
* Standard Values
@@ -191,3 +217,5 @@ enum {
#ifndef __GNUC__
# define __attribute__(x) /* do nothing */
#endif
+
+#endif /* _COMMON_H_ */