Changeset cb075c5


Ignore:
Timestamp:
03/02/17 13:46:56 (4 years ago)
Author:
Shane Alcock <salcock@…>
Branches:
4.0.1-hotfixes, cachetimestamps, develop, dpdk-ndag, etsilive, master, ndag_format, rc-4.0.2, rc-4.0.3, rc-4.0.4, ringdecrementfix, ringperformance
Children:
684a21c
Parents:
4db5b98
Message:

Fix bug where traceanon would not build with newer versions
of libssl (>= 1.1.0).

Location:
tools/traceanon
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tools/traceanon/Anon.cc

    ree6e802 rcb075c5  
    107107
    108108    this->cipher = EVP_aes_128_ecb();
    109     EVP_CIPHER_CTX_init(&this->ctx);
    110 
    111     EVP_EncryptInit_ex(&this->ctx, this->cipher, NULL, this->key, NULL);
     109    this->ctx = EVP_CIPHER_CTX_new();
     110    EVP_CIPHER_CTX_init(this->ctx);
     111
     112    EVP_EncryptInit_ex(this->ctx, this->cipher, NULL, this->key, NULL);
    112113
    113114    this->cachebits = cachebits;
     
    125126CryptoAnon::~CryptoAnon() {
    126127    delete(this->ipv4_cache);
    127     EVP_CIPHER_CTX_cleanup(&this->ctx);
     128    EVP_CIPHER_CTX_cleanup(this->ctx);
     129    EVP_CIPHER_CTX_free(this->ctx);
    128130}
    129131
     
    255257         * bit in the original address, we use the first bit of the resulting
    256258         * encrypted output as part of an XOR mask */
    257         EVP_EncryptUpdate(&this->ctx, (unsigned char *)rin_output, &outl,
     259        EVP_EncryptUpdate(this->ctx, (unsigned char *)rin_output, &outl,
    258260                (unsigned char *)rin_input, 16);
    259261
     
    290292        memcpy(rin_input, &input, 8);
    291293
    292         EVP_EncryptUpdate(&this->ctx, (unsigned char *)rin_output, &outl,
     294        EVP_EncryptUpdate(this->ctx, (unsigned char *)rin_output, &outl,
    293295                (unsigned char *)rin_input, 16);
    294296
  • tools/traceanon/Anon.h

    ree6e802 rcb075c5  
    8686    uint32_t recent_ipv4_cache[2][2];
    8787    const EVP_CIPHER *cipher;
    88     EVP_CIPHER_CTX ctx;
     88    EVP_CIPHER_CTX *ctx;
    8989
    9090    uint32_t encrypt32Bits(uint32_t orig, uint8_t start, uint8_t stop,
Note: See TracChangeset for help on using the changeset viewer.