Ignore:
Timestamp:
Jan 17, 2018 11:15:34 AM (6 years ago)
Author:
riza
Message:

Close #2083: Fix build error when building using LibreSSL.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/third_party/srtp/crypto/hash/hmac_ossl.c

    r5614 r5726  
    5252#include <openssl/evp.h> 
    5353#include <openssl/hmac.h> 
     54#include <openssl/opensslv.h> 
    5455 
    5556#define SHA1_DIGEST_SIZE                20 
     57#define USING_LIBRESSL (defined(LIBRESSL_VERSION_NUMBER)) 
    5658 
    5759/* the debug module for authentiation */ 
     
    7779/* OpenSSL 1.1.0 made HMAC_CTX an opaque structure, which must be allocated 
    7880   using HMAC_CTX_new.  But this function doesn't exist in OpenSSL 1.0.x. */ 
    79 #if OPENSSL_VERSION_NUMBER < 0x10100000L 
     81#if USING_LIBRESSL || OPENSSL_VERSION_NUMBER < 0x10100000L 
    8082    { 
    8183        /* allocate memory for auth and HMAC_CTX structures */ 
     
    122124    hmac_ctx = (HMAC_CTX*)a->state; 
    123125 
    124 #if OPENSSL_VERSION_NUMBER < 0x10100000L 
     126#if USING_LIBRESSL || OPENSSL_VERSION_NUMBER < 0x10100000L 
    125127    HMAC_CTX_cleanup(hmac_ctx); 
    126128 
Note: See TracChangeset for help on using the changeset viewer.