Remove deprecated attributes.

To be more exact: &encrypt, &mergeable, &rotate_interval, &rotate_size

Also removes no longer used redef-able constants:
log_rotate_interval, log_max_size, log_encryption_key

GH-243
This commit is contained in:
Johanna Amann 2019-05-20 14:04:04 -07:00
parent 0080c5ea09
commit 1ff2894af2
17 changed files with 17 additions and 561 deletions

View file

@ -12,13 +12,7 @@
# include <krb5.h>
# endif // NEED_KRB5_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;
class BroFile : public BroObj {
public:
@ -51,21 +45,14 @@ public:
void Describe(ODesc* d) const override;
void SetRotateInterval(double secs);
// Rotates the logfile. Returns rotate_info.
RecordVal* Rotate();
// Set &rotate_interval, &rotate_size,
// and &raw_output attributes.
// Set &raw_output attribute.
void SetAttrs(Attributes* attrs);
// Returns the current size of the file, after fresh stat'ing.
double Size() { fflush(f); UpdateFileSize(); return current_size; }
// Set rotate/postprocessor for all files that don't define them
// by their own. (interval/max_size=0 for no rotation; size in bytes).
static void SetDefaultRotation(double interval, double max_size);
double Size();
// Close all files which are managed by us.
static void CloseCachedFiles();
@ -83,8 +70,6 @@ public:
static BroFile* Unserialize(UnserialInfo* info);
protected:
friend class RotateTimer;
BroFile() { Init(); }
void Init();
@ -105,7 +90,6 @@ protected:
void Unlink();
void InsertAtBeginning();
void MoveToBeginning();
void InstallRotateTimer();
// Returns nil if the file is not active, was in error, etc.
// (Protected because we do not want anyone to write directly
@ -113,17 +97,9 @@ protected:
FILE* File();
FILE* BringIntoCache();
// Stats the file to get its current size.
void UpdateFileSize();
// Raises a file_opened event.
void RaiseOpenEvent();
// Initialize encryption with the given public key.
void InitEncrypt(const char* keyfile);
// Finalize encryption.
void FinishEncrypt();
DECLARE_SERIAL(BroFile);
FILE* f;
@ -137,28 +113,12 @@ protected:
BroFile* next; // doubly-linked list of cached files
BroFile* prev;
Attributes* attrs;
double rotate_interval;
bool buffered;
// Sizes are double's so that it's easy to specify large
// ones with scientific notation, and so they can exceed 4GB.
double rotate_size;
double current_size;
Timer* rotate_timer;
double open_time;
bool print_hook;
bool raw_output;
static double default_rotation_interval;
static double default_rotation_size;
EVP_PKEY* pub_key;
EVP_CIPHER_CTX* cipher_ctx;
static const int MIN_BUFFER_SIZE = 1024;
unsigned char* cipher_buffer;
};
#endif