summaryrefslogtreecommitdiffstats
path: root/plugins/common.h
diff options
context:
space:
mode:
authorM. Sean Finney <seanius@users.sourceforge.net>2005-10-19 12:59:55 +0000
committerM. 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 @@
32 * 32 *
33 *****************************************************************************/ 33 *****************************************************************************/
34 34
35#ifndef _COMMON_H_
36#define _COMMON_H_
37
35#include "config.h" 38#include "config.h"
36 39
37#ifdef HAVE_FEATURES_H 40#ifdef HAVE_FEATURES_H
@@ -146,6 +149,29 @@ int snprintf(char *str, size_t size, const char *format, ...);
146int vsnprintf(char *str, size_t size, const char *format, va_list ap); 149int vsnprintf(char *str, size_t size, const char *format, va_list ap);
147#endif 150#endif
148 151
152/* SSL implementations */
153#ifdef HAVE_GNUTLS_OPENSSL_H
154# include <gnutls/openssl.h>
155#else
156# ifdef HAVE_SSL_H
157# include <rsa.h>
158# include <crypto.h>
159# include <x509.h>
160# include <pem.h>
161# include <ssl.h>
162# include <err.h>
163# else
164# ifdef HAVE_OPENSSL_SSL_H
165# include <openssl/rsa.h>
166# include <openssl/crypto.h>
167# include <openssl/x509.h>
168# include <openssl/pem.h>
169# include <openssl/ssl.h>
170# include <openssl/err.h>
171# endif
172# endif
173#endif
174
149/* 175/*
150 * 176 *
151 * Standard Values 177 * Standard Values
@@ -191,3 +217,5 @@ enum {
191#ifndef __GNUC__ 217#ifndef __GNUC__
192# define __attribute__(x) /* do nothing */ 218# define __attribute__(x) /* do nothing */
193#endif 219#endif
220
221#endif /* _COMMON_H_ */