Removing OpenSSL dependency for plugins.

Compiling a plugin required having access to OpenSSL headers because
they were pulled in by Bro headers that the plugin had to include.
Removinng then OpenSSL dependency from those Bro headers.

I'm also reverting a4e5591e. This is a different fix for the same
problem, and reverting that commit gives us a test case. :-)
This commit is contained in:
Robin Sommer 2016-08-01 08:27:08 -07:00
parent c3a43274e4
commit d7c10ca7c3
7 changed files with 21 additions and 9 deletions

View file

@ -5,7 +5,9 @@
#include <sys/time.h>
#include <netinet/in.h>
#include <assert.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
#include <algorithm>

View file

@ -14,9 +14,6 @@
# include <krb5.h>
#endif
#include <openssl/ssl.h>
#include <openssl/err.h>
class CompressedChunkedIO;
// #define DEBUG_COMMUNICATION 10
@ -244,6 +241,11 @@ private:
bro::Flare read_flare;
};
// From OpenSSL. We forward-declare these here to avoid introducing a
// dependency on OpenSSL headers just for this header file.
typedef struct ssl_ctx_st SSL_CTX;
typedef struct ssl_st SSL;
// Chunked I/O using an SSL connection.
class ChunkedIOSSL : public ChunkedIO {
public:

View file

@ -18,6 +18,10 @@
#include <errno.h>
#include <unistd.h>
#include <openssl/evp.h>
#include <openssl/pem.h>
#include <openssl/err.h>
#include <algorithm>
#include "File.h"

View file

@ -11,11 +11,11 @@
# ifdef NEED_KRB5_H
# include <krb5.h>
# endif // NEED_KRB5_H
extern "C" {
# include "openssl/evp.h"
# include "openssl/pem.h"
# include "openssl/err.h"
}
// From OpenSSL. We forward-declare these here to avoid introducing a
// dependency on OpenSSL headers just for this header file.
typedef struct evp_pkey_st EVP_PKEY;
typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
class BroType;
class RotateTimer;

View file

@ -14,6 +14,7 @@
#include <openssl/x509v3.h>
#include <openssl/asn1.h>
#include <openssl/opensslconf.h>
#include <openssl/err.h>
using namespace file_analysis;

View file

@ -6,6 +6,8 @@
#include <openssl/asn1.h>
#include <openssl/x509_vfy.h>
#include <openssl/ocsp.h>
#include <openssl/pem.h>
#include <openssl/err.h>
// This is the indexed map of X509 certificate stores.
static map<Val*, X509_STORE*> x509_stores;

View file

@ -18,7 +18,8 @@ extern "C" {
}
#endif
#include <openssl/md5.h>
#include <openssl/ssl.h>
#include <openssl/err.h>
extern "C" void OPENSSL_add_all_algorithms_conf(void);