diff --git a/talk/session/media/externalhmac.cc b/talk/session/media/externalhmac.cc index 9c204b7f7..d63520e19 100644 --- a/talk/session/media/externalhmac.cc +++ b/talk/session/media/externalhmac.cc @@ -31,11 +31,15 @@ #include // For malloc/free. +extern "C" { #ifdef SRTP_RELATIVE_PATH #include "srtp.h" // NOLINT +#include "crypto_kernel.h" // NOLINT #else -#include "third_party/libsrtp/include/srtp.h" +#include "third_party/libsrtp/srtp/include/srtp.h" +#include "third_party/libsrtp/srtp/crypto/include/crypto_kernel.h" #endif // SRTP_RELATIVE_PATH +} #include "webrtc/base/logging.h" diff --git a/talk/session/media/externalhmac.h b/talk/session/media/externalhmac.h index 740570bdc..22fb36a99 100644 --- a/talk/session/media/externalhmac.h +++ b/talk/session/media/externalhmac.h @@ -47,11 +47,13 @@ #if defined(HAVE_SRTP) && defined(ENABLE_EXTERNAL_AUTH) #include "webrtc/base/basictypes.h" +extern "C" { #ifdef SRTP_RELATIVE_PATH #include "auth.h" // NOLINT #else -#include "third_party/libsrtp/crypto/include/auth.h" +#include "third_party/libsrtp/srtp/crypto/include/auth.h" #endif // SRTP_RELATIVE_PATH +} #define EXTERNAL_HMAC_SHA1 HMAC_SHA1 + 1 #define HMAC_KEY_LENGTH 20 diff --git a/talk/session/media/srtpfilter.cc b/talk/session/media/srtpfilter.cc index b3c6dc2b0..8beec1045 100644 --- a/talk/session/media/srtpfilter.cc +++ b/talk/session/media/srtpfilter.cc @@ -43,15 +43,15 @@ // #define SRTP_DEBUG #ifdef HAVE_SRTP +extern "C" { #ifdef SRTP_RELATIVE_PATH #include "srtp.h" // NOLINT -extern "C" srtp_stream_t srtp_get_stream(srtp_t srtp, uint32_t ssrc); #include "srtp_priv.h" // NOLINT #else -#include "third_party/libsrtp/include/srtp.h" -extern "C" srtp_stream_t srtp_get_stream(srtp_t srtp, uint32_t ssrc); -#include "third_party/libsrtp/include/srtp_priv.h" +#include "third_party/libsrtp/srtp/include/srtp.h" +#include "third_party/libsrtp/srtp/include/srtp_priv.h" #endif // SRTP_RELATIVE_PATH +} #ifdef ENABLE_EXTERNAL_AUTH #include "talk/session/media/externalhmac.h" #endif // ENABLE_EXTERNAL_AUTH diff --git a/talk/session/media/srtpfilter_unittest.cc b/talk/session/media/srtpfilter_unittest.cc index 51d701d21..f3b7625c2 100644 --- a/talk/session/media/srtpfilter_unittest.cc +++ b/talk/session/media/srtpfilter_unittest.cc @@ -32,11 +32,15 @@ #include "webrtc/base/byteorder.h" #include "webrtc/base/gunit.h" #include "webrtc/base/thread.h" +extern "C" { #ifdef SRTP_RELATIVE_PATH #include "crypto/include/err.h" +#include "crypto/include/datatypes.h" #else -#include "third_party/libsrtp/crypto/include/err.h" +#include "third_party/libsrtp/srtp/crypto/include/err.h" +#include "third_party/libsrtp/srtp/crypto/include/datatypes.h" #endif +} using cricket::CS_AES_CM_128_HMAC_SHA1_80; using cricket::CS_AES_CM_128_HMAC_SHA1_32;