Skip to content

Commit

Permalink
[core] Fixed ENABLE_HAICRYPT_LOGGING (#2315).
Browse files Browse the repository at this point in the history
Added missing  DummyProxy& vform(..)
  • Loading branch information
maxsharabayko authored Apr 29, 2022
1 parent 477530f commit 9b3e3c1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions haicrypt/cryspr-config.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,18 @@
#if defined(USE_OPENSSL)
#include "cryspr-openssl.h"
#define cryspr4SRT() crysprOpenSSL()
#define CRYSPR_IMPL_DESC "OpenSSL-AES"
#elif defined(USE_GNUTLS)
#include "cryspr-gnutls.h"
#define cryspr4SRT() crysprGnuTLS()
#define CRYSPR_IMPL_DESC "GnuTLS"
#elif defined(USE_MBEDTLS)
#include "cryspr-mbedtls.h"
#define cryspr4SRT() crysprMbedtls()
#define CRYSPR_IMPL_DESC "MbedTLS"
#else
#error Cryspr implementation not selected. Please define USE_* + OPENSSL/GNUTLS/MBEDTLS.
#define CRYSPR_IMPL_DESC "No Cipher"
#endif


Expand Down
7 changes: 1 addition & 6 deletions haicrypt/haicrypt_log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,7 @@ void HaiCrypt_DumpConfig(const HaiCrypt_Cfg* cfg)
LOGC(hclog.Debug, log << "CFG DUMP: flags=" << cfg_flags.str()
<< " xport=" << (cfg->xport == HAICRYPT_XPT_SRT ? "SRT" : "INVALID")
<< " cipher="
<< (cfg->cipher == HaiCryptCipher_OpenSSL_EVP_CTR() ? "OSSL-EVP-CTR":
cfg->cipher == HaiCryptCipher_OpenSSL_AES() ? "OSSL-AES":
// This below is used as the only one when Nettle is used. When OpenSSL
// is used, one of the above will trigger, and the one below will then never trigger.
cfg->cipher == HaiCryptCipher_Get_Instance() ? "Nettle-AES":
"UNKNOWN")
<< CRYSPR_IMPL_DESC
<< " key_len=" << cfg->key_len << " data_max_len=" << cfg->data_max_len);


Expand Down
5 changes: 5 additions & 0 deletions srtcore/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,11 @@ struct SRT_API LogDispatcher
return *this;
}

DummyProxy& vform(const char*, va_list)
{
return *this;
}

DummyProxy& setloc(const char* , int , std::string)
{
return *this;
Expand Down

0 comments on commit 9b3e3c1

Please sign in to comment.