summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsolenberg@webrtc.org <solenberg@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-02-18 11:27:22 +0000
committersolenberg@webrtc.org <solenberg@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-02-18 11:27:22 +0000
commita56c5b4327c6a89238ee5b1ffd3ace78b20afaef (patch)
tree415052fb015da98f1722fb0d03fa6764640eb301
parent3e4cdeca70f8a9499fb746fa4e9a094a449dda86 (diff)
downloadwebrtc-a56c5b4327c6a89238ee5b1ffd3ace78b20afaef.tar.gz
Remove external encryption API for VoE.
BUG= R=henrika@webrtc.org, henrikg@webrtc.org, phoglund@webrtc.org Review URL: https://webrtc-codereview.appspot.com/8459004 git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@5564 4adac7df-926f-26a2-2b94-8c16560cd09d
-rw-r--r--common_types.h65
-rw-r--r--engine_configurations.h1
-rwxr-xr-xtest/buildbot_tests.py4
-rw-r--r--test/libtest/helpers/bit_flip_encryption.cc73
-rw-r--r--test/libtest/helpers/random_encryption.cc47
-rw-r--r--test/libtest/include/bit_flip_encryption.h63
-rw-r--r--test/libtest/include/random_encryption.h65
-rw-r--r--test/libtest/libtest.gyp26
-rw-r--r--video_engine/test/auto_test/android/res/values/strings.xml1
-rw-r--r--video_engine/test/auto_test/vie_auto_test.gypi1
-rw-r--r--voice_engine/Android.mk5
-rw-r--r--voice_engine/channel.cc127
-rw-r--r--voice_engine/channel.h12
-rw-r--r--voice_engine/include/voe_encryption.h63
-rw-r--r--voice_engine/include/voe_errors.h6
-rw-r--r--voice_engine/test/android/android_test/jni/android_test.cc129
-rw-r--r--voice_engine/test/auto_test/fixtures/before_initialization_fixture.cc2
-rw-r--r--voice_engine/test/auto_test/fixtures/before_initialization_fixture.h2
-rw-r--r--voice_engine/test/auto_test/fuzz/rtp_fuzz_test.cc48
-rw-r--r--voice_engine/test/auto_test/standard/encryption_test.cc80
-rw-r--r--voice_engine/test/auto_test/voe_standard_test.cc10
-rw-r--r--voice_engine/test/auto_test/voe_standard_test.h14
-rw-r--r--voice_engine/test/auto_test/voe_test_defines.h4
-rw-r--r--voice_engine/test/auto_test/voe_unit_test.cc127
-rw-r--r--voice_engine/test/auto_test/voe_unit_test.h13
-rw-r--r--voice_engine/test/cmd_test/voe_cmd_test.cc6
-rw-r--r--voice_engine/test/win_test/WinTestDlg.cc214
-rw-r--r--voice_engine/test/win_test/WinTestDlg.h6
-rw-r--r--voice_engine/voe_encryption_impl.cc96
-rw-r--r--voice_engine/voe_encryption_impl.h40
-rw-r--r--voice_engine/voice_engine.gyp6
-rw-r--r--voice_engine/voice_engine_impl.h9
32 files changed, 16 insertions, 1349 deletions
diff --git a/common_types.h b/common_types.h
index 5ae64563..83201cfb 100644
--- a/common_types.h
+++ b/common_types.h
@@ -157,71 +157,6 @@ enum FrameType
kVideoFrameDelta = 4, // depends on the previus frame
};
-// Interface for encrypting and decrypting regular data and rtp/rtcp packets.
-// Implement this interface if you wish to provide an encryption scheme to
-// the voice or video engines.
-class Encryption
-{
-public:
- // Encrypt the given data.
- //
- // Args:
- // channel: The channel to encrypt data for.
- // in_data: The data to encrypt. This data is bytes_in bytes long.
- // out_data: The buffer to write the encrypted data to. You may write more
- // bytes of encrypted data than what you got as input, up to a maximum
- // of webrtc::kViEMaxMtu if you are encrypting in the video engine, or
- // webrtc::kVoiceEngineMaxIpPacketSizeBytes for the voice engine.
- // bytes_in: The number of bytes in the input buffer.
- // bytes_out: The number of bytes written in out_data.
- virtual void encrypt(
- int channel,
- unsigned char* in_data,
- unsigned char* out_data,
- int bytes_in,
- int* bytes_out) = 0;
-
- // Decrypts the given data. This should reverse the effects of encrypt().
- //
- // Args:
- // channel_no: The channel to decrypt data for.
- // in_data: The data to decrypt. This data is bytes_in bytes long.
- // out_data: The buffer to write the decrypted data to. You may write more
- // bytes of decrypted data than what you got as input, up to a maximum
- // of webrtc::kViEMaxMtu if you are encrypting in the video engine, or
- // webrtc::kVoiceEngineMaxIpPacketSizeBytes for the voice engine.
- // bytes_in: The number of bytes in the input buffer.
- // bytes_out: The number of bytes written in out_data.
- virtual void decrypt(
- int channel,
- unsigned char* in_data,
- unsigned char* out_data,
- int bytes_in,
- int* bytes_out) = 0;
-
- // Encrypts a RTCP packet. Otherwise, this method has the same contract as
- // encrypt().
- virtual void encrypt_rtcp(
- int channel,
- unsigned char* in_data,
- unsigned char* out_data,
- int bytes_in,
- int* bytes_out) = 0;
-
- // Decrypts a RTCP packet. Otherwise, this method has the same contract as
- // decrypt().
- virtual void decrypt_rtcp(
- int channel,
- unsigned char* in_data,
- unsigned char* out_data,
- int bytes_in,
- int* bytes_out) = 0;
-
-protected:
- virtual ~Encryption() {}
- Encryption() {}
-};
-
// External transport callback interface
class Transport
{
diff --git a/engine_configurations.h b/engine_configurations.h
index 2102cd70..0fb09496 100644
--- a/engine_configurations.h
+++ b/engine_configurations.h
@@ -86,7 +86,6 @@
#ifndef WEBRTC_CHROMIUM_BUILD
#define WEBRTC_VOICE_ENGINE_CALL_REPORT_API
-#define WEBRTC_VOICE_ENGINE_ENCRYPTION_API
#endif
// ============================================================================
diff --git a/test/buildbot_tests.py b/test/buildbot_tests.py
index ce3648c2..da038d7f 100755
--- a/test/buildbot_tests.py
+++ b/test/buildbot_tests.py
@@ -30,7 +30,6 @@ _HOME = os.environ.get('HOME', '')
_VIE_AUTO_TEST_CMD_LIST = [
'vie_auto_test',
'--automated',
- '--gtest_filter=-ViERtpFuzzTest*',
'--capture_test_ensure_resolution_alignment_in_capture_device=false']
_WIN_TESTS = {
'vie_auto_test': _VIE_AUTO_TEST_CMD_LIST,
@@ -51,8 +50,7 @@ _MAC_TESTS = {
_LINUX_TESTS = {
'vie_auto_test': _VIE_AUTO_TEST_CMD_LIST,
'voe_auto_test': ['voe_auto_test',
- '--automated',
- '--gtest_filter=-RtpFuzzTest.*'],
+ '--automated'],
'audio_e2e_test': ['python',
'run_audio_test.py',
'--input=../../resources/e2e_audio_in.pcm',
diff --git a/test/libtest/helpers/bit_flip_encryption.cc b/test/libtest/helpers/bit_flip_encryption.cc
deleted file mode 100644
index 6548502e..00000000
--- a/test/libtest/helpers/bit_flip_encryption.cc
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include "webrtc/test/libtest/include/bit_flip_encryption.h"
-
-#include <stdlib.h>
-
-float NormalizedRand() {
- return static_cast<float>(rand()) /
- static_cast<float>(RAND_MAX);
-}
-
-BitFlipEncryption::BitFlipEncryption(unsigned int rand_seed,
- float flip_probability)
- : flip_probability_(flip_probability),
- flip_count_(0) {
- srand(rand_seed);
-}
-
-void BitFlipEncryption::FlipSomeBitsInData(const unsigned char* in_data,
- unsigned char* out_data,
- int bytes_in, int* bytes_out) {
- for (int i = 0; i < bytes_in; i++) {
- out_data[i] = in_data[i];
-
- if (NormalizedRand() < flip_probability_) {
- int bit_to_flip = rand() % 8;
- out_data[i] ^= 1 << bit_to_flip;
- flip_count_++;
- }
- }
- *bytes_out = bytes_in;
-}
-
-void BitFlipEncryption::encrypt(int channel_no,
- unsigned char* in_data,
- unsigned char* out_data,
- int bytes_in,
- int* bytes_out) {
- FlipSomeBitsInData(in_data, out_data, bytes_in, bytes_out);
-}
-
-void BitFlipEncryption::decrypt(int channel_no,
- unsigned char* in_data,
- unsigned char* out_data,
- int bytes_in,
- int* bytes_out) {
- FlipSomeBitsInData(in_data, out_data, bytes_in, bytes_out);
-}
-
-void BitFlipEncryption::encrypt_rtcp(int channel_no,
- unsigned char* in_data,
- unsigned char* out_data,
- int bytes_in,
- int* bytes_out) {
- FlipSomeBitsInData(in_data, out_data, bytes_in, bytes_out);
-}
-
-void BitFlipEncryption::decrypt_rtcp(int channel_no,
- unsigned char* in_data,
- unsigned char* out_data,
- int bytes_in,
- int* bytes_out) {
- FlipSomeBitsInData(in_data, out_data, bytes_in, bytes_out);
-}
-
diff --git a/test/libtest/helpers/random_encryption.cc b/test/libtest/helpers/random_encryption.cc
deleted file mode 100644
index c07c4b03..00000000
--- a/test/libtest/helpers/random_encryption.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include "webrtc/test/libtest/include/random_encryption.h"
-
-#include <math.h>
-#include <stdlib.h>
-
-#include <algorithm>
-
-#include "webrtc/video_engine/vie_defines.h"
-
-static int Saturate(int value, int min, int max) {
- return std::min(std::max(value, min), max);
-}
-
-RandomEncryption::RandomEncryption(unsigned int rand_seed) {
- srand(rand_seed);
-}
-
-// Generates some completely random data with roughly the right length.
-void RandomEncryption::GenerateRandomData(unsigned char* out_data, int bytes_in,
- int* bytes_out) {
- int out_length = MakeUpSimilarLength(bytes_in);
- for (int i = 0; i < out_length; i++) {
- // The modulo will skew the random distribution a bit, but I think it
- // will be random enough.
- out_data[i] = static_cast<unsigned char>(rand() % 256);
- }
- *bytes_out = out_length;
-}
-
-// Makes up a length within +- 50 of the original length, without
-// overstepping the contract for encrypt / decrypt.
-int RandomEncryption::MakeUpSimilarLength(int original_length) {
- int sign = rand() - RAND_MAX / 2;
- int length = original_length + sign * rand() % 50;
-
- return Saturate(length, 0, static_cast<int>(webrtc::kViEMaxMtu));
-}
diff --git a/test/libtest/include/bit_flip_encryption.h b/test/libtest/include/bit_flip_encryption.h
deleted file mode 100644
index 12b02c72..00000000
--- a/test/libtest/include/bit_flip_encryption.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#ifndef SRC_VIDEO_ENGINE_TEST_AUTO_TEST_HELPERS_BIT_FLIP_ENCRYPTION_H_
-#define SRC_VIDEO_ENGINE_TEST_AUTO_TEST_HELPERS_BIT_FLIP_ENCRYPTION_H_
-
-#include "webrtc/common_types.h"
-
-// This encryption scheme will randomly flip bits every now and then in the
-// input data.
-class BitFlipEncryption : public webrtc::Encryption {
- public:
- // Args:
- // rand_seed: the seed to initialize the test's random generator with.
- // flip_probability: A number [0, 1] which is the percentage chance a bit
- // gets flipped in a particular byte.
- BitFlipEncryption(unsigned int rand_seed, float flip_probability);
-
- virtual void encrypt(int channel_no,
- unsigned char* in_data,
- unsigned char* out_data,
- int bytes_in,
- int* bytes_out) OVERRIDE;
-
- virtual void decrypt(int channel_no,
- unsigned char* in_data,
- unsigned char* out_data,
- int bytes_in,
- int* bytes_out) OVERRIDE;
-
- virtual void encrypt_rtcp(int channel_no,
- unsigned char* in_data,
- unsigned char* out_data,
- int bytes_in,
- int* bytes_out) OVERRIDE;
-
- virtual void decrypt_rtcp(int channel_no,
- unsigned char* in_data,
- unsigned char* out_data,
- int bytes_in,
- int* bytes_out) OVERRIDE;
-
- int64_t flip_count() const { return flip_count_; }
-
- private:
- // The flip probability ([0, 1]).
- float flip_probability_;
- // The number of bits we've flipped so far.
- int64_t flip_count_;
-
- // Flips some bits in the data at random.
- void FlipSomeBitsInData(const unsigned char *in_data, unsigned char* out_data,
- int bytes_in, int* bytes_out);
-};
-
-#endif // SRC_VIDEO_ENGINE_TEST_AUTO_TEST_HELPERS_BIT_FLIP_ENCRYPTION_H_
diff --git a/test/libtest/include/random_encryption.h b/test/libtest/include/random_encryption.h
deleted file mode 100644
index 303e8d27..00000000
--- a/test/libtest/include/random_encryption.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#ifndef SRC_VIDEO_ENGINE_TEST_AUTO_TEST_HELPERS_RANDOM_ENCRYPTION_H_
-#define SRC_VIDEO_ENGINE_TEST_AUTO_TEST_HELPERS_RANDOM_ENCRYPTION_H_
-
-#include "webrtc/common_types.h"
-
-// These algorithms attempt to create an uncrackable encryption
-// scheme by completely disregarding the input data.
-class RandomEncryption : public webrtc::Encryption {
- public:
- explicit RandomEncryption(unsigned int rand_seed);
-
- virtual void encrypt(int channel_no,
- unsigned char* in_data,
- unsigned char* out_data,
- int bytes_in,
- int* bytes_out) OVERRIDE {
- GenerateRandomData(out_data, bytes_in, bytes_out);
- }
-
- virtual void decrypt(int channel_no,
- unsigned char* in_data,
- unsigned char* out_data,
- int bytes_in,
- int* bytes_out) OVERRIDE {
- GenerateRandomData(out_data, bytes_in, bytes_out);
- }
-
- virtual void encrypt_rtcp(int channel_no,
- unsigned char* in_data,
- unsigned char* out_data,
- int bytes_in,
- int* bytes_out) OVERRIDE {
- GenerateRandomData(out_data, bytes_in, bytes_out);
- }
-
- virtual void decrypt_rtcp(int channel_no,
- unsigned char* in_data,
- unsigned char* out_data,
- int bytes_in,
- int* bytes_out) OVERRIDE {
- GenerateRandomData(out_data, bytes_in, bytes_out);
- }
-
- private:
- // Generates some completely random data with roughly the right length.
- void GenerateRandomData(unsigned char* out_data,
- int bytes_in,
- int* bytes_out);
-
- // Makes up a length within +- 50 of the original length, without
- // overstepping the contract for encrypt / decrypt.
- int MakeUpSimilarLength(int original_length);
-};
-
-#endif // SRC_VIDEO_ENGINE_TEST_AUTO_TEST_HELPERS_RANDOM_ENCRYPTION_H_
diff --git a/test/libtest/libtest.gyp b/test/libtest/libtest.gyp
deleted file mode 100644
index 17b6f03c..00000000
--- a/test/libtest/libtest.gyp
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
-#
-# Use of this source code is governed by a BSD-style license
-# that can be found in the LICENSE file in the root of the source
-# tree. An additional intellectual property rights grant can be found
-# in the file PATENTS. All contributing project authors may
-# be found in the AUTHORS file in the root of the source tree.
-{
- 'includes': [
- '../../build/common.gypi'
- ],
- 'targets': [
- {
- 'target_name': 'libtest',
- 'type': 'static_library',
- 'sources': [
- # Helper classes
- 'include/bit_flip_encryption.h',
- 'include/random_encryption.h',
-
- 'helpers/bit_flip_encryption.cc',
- 'helpers/random_encryption.cc',
- ],
- },
- ],
-}
diff --git a/video_engine/test/auto_test/android/res/values/strings.xml b/video_engine/test/auto_test/android/res/values/strings.xml
index 9bff2437..48cfe926 100644
--- a/video_engine/test/auto_test/android/res/values/strings.xml
+++ b/video_engine/test/auto_test/android/res/values/strings.xml
@@ -19,7 +19,6 @@
<item>Capture</item>
<item>Codec</item>
<item>Mix</item>
- <item>Encryption</item>
<item>External Codec</item>
<item>File</item>
<item>Image Process</item>
diff --git a/video_engine/test/auto_test/vie_auto_test.gypi b/video_engine/test/auto_test/vie_auto_test.gypi
index c131285d..fddb5a51 100644
--- a/video_engine/test/auto_test/vie_auto_test.gypi
+++ b/video_engine/test/auto_test/vie_auto_test.gypi
@@ -21,7 +21,6 @@
'<(webrtc_root)/test/metrics.gyp:metrics',
'<(webrtc_root)/test/test.gyp:channel_transport',
'<(webrtc_root)/test/test.gyp:test_support',
- '<(webrtc_root)/test/libtest/libtest.gyp:libtest',
'video_engine_core',
'libvietest',
],
diff --git a/voice_engine/Android.mk b/voice_engine/Android.mk
index 4c5fa592..3dc3c36b 100644
--- a/voice_engine/Android.mk
+++ b/voice_engine/Android.mk
@@ -35,7 +35,6 @@ LOCAL_SRC_FILES := \
voe_call_report_impl.cc \
voe_codec_impl.cc \
voe_dtmf_impl.cc \
- voe_encryption_impl.cc \
voe_external_media_impl.cc \
voe_file_impl.cc \
voe_hardware_impl.cc \
@@ -66,12 +65,12 @@ LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/../../../modules/rtp_rtcp/interface \
$(LOCAL_PATH)/../../../modules/udp_transport/interface \
$(LOCAL_PATH)/../../../modules/utility/interface \
- $(LOCAL_PATH)/../../../system_wrappers/interface
+ $(LOCAL_PATH)/../../../system_wrappers/interface
LOCAL_SHARED_LIBRARIES := \
libcutils \
libdl \
- libstlport
+ libstlport
ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true)
LOCAL_LDLIBS += -ldl -lpthread
diff --git a/voice_engine/channel.cc b/voice_engine/channel.cc
index 3f45feab..261a72f6 100644
--- a/voice_engine/channel.cc
+++ b/voice_engine/channel.cc
@@ -205,41 +205,6 @@ Channel::SendPacket(int channel, const void *data, int len)
"Channel::SendPacket() RTP dump to output file failed");
}
- // SRTP or External encryption
- if (_encrypting)
- {
- if (_encryptionPtr)
- {
- if (!_encryptionRTPBufferPtr)
- {
- // Allocate memory for encryption buffer one time only
- _encryptionRTPBufferPtr =
- new uint8_t[kVoiceEngineMaxIpPacketSizeBytes];
- memset(_encryptionRTPBufferPtr, 0,
- kVoiceEngineMaxIpPacketSizeBytes);
- }
-
- // Perform encryption (SRTP or external)
- int32_t encryptedBufferLength = 0;
- _encryptionPtr->encrypt(_channelId,
- bufferToSendPtr,
- _encryptionRTPBufferPtr,
- bufferLength,
- (int*)&encryptedBufferLength);
- if (encryptedBufferLength <= 0)
- {
- _engineStatisticsPtr->SetLastError(
- VE_ENCRYPTION_FAILED,
- kTraceError, "Channel::SendPacket() encryption failed");
- return -1;
- }
-
- // Replace default data buffer with encrypted buffer
- bufferToSendPtr = _encryptionRTPBufferPtr;
- bufferLength = encryptedBufferLength;
- }
- }
-
int n = _transportPtr->SendPacket(channel, bufferToSendPtr,
bufferLength);
if (n < 0) {
@@ -284,39 +249,6 @@ Channel::SendRTCPPacket(int channel, const void *data, int len)
"Channel::SendPacket() RTCP dump to output file failed");
}
- // SRTP or External encryption
- if (_encrypting)
- {
- if (_encryptionPtr)
- {
- if (!_encryptionRTCPBufferPtr)
- {
- // Allocate memory for encryption buffer one time only
- _encryptionRTCPBufferPtr =
- new uint8_t[kVoiceEngineMaxIpPacketSizeBytes];
- }
-
- // Perform encryption (SRTP or external).
- int32_t encryptedBufferLength = 0;
- _encryptionPtr->encrypt_rtcp(_channelId,
- bufferToSendPtr,
- _encryptionRTCPBufferPtr,
- bufferLength,
- (int*)&encryptedBufferLength);
- if (encryptedBufferLength <= 0)
- {
- _engineStatisticsPtr->SetLastError(
- VE_ENCRYPTION_FAILED, kTraceError,
- "Channel::SendRTCPPacket() encryption failed");
- return -1;
- }
-
- // Replace default data buffer with encrypted buffer
- bufferToSendPtr = _encryptionRTCPBufferPtr;
- bufferLength = encryptedBufferLength;
- }
- }
-
int n = _transportPtr->SendRTCPPacket(channel,
bufferToSendPtr,
bufferLength);
@@ -952,10 +884,6 @@ Channel::Channel(int32_t channelId,
_outputExternalMedia(false),
_inputExternalMediaCallbackPtr(NULL),
_outputExternalMediaCallbackPtr(NULL),
- _encryptionRTPBufferPtr(NULL),
- _decryptionRTPBufferPtr(NULL),
- _encryptionRTCPBufferPtr(NULL),
- _decryptionRTCPBufferPtr(NULL),
_timeStamp(0), // This is just an offset, RTP module will add it's own random offset
_sendTelephoneEventPayloadType(106),
jitter_buffer_playout_timestamp_(0),
@@ -972,7 +900,6 @@ Channel::Channel(int32_t channelId,
_voiceEngineObserverPtr(NULL),
_callbackCritSectPtr(NULL),
_transportPtr(NULL),
- _encryptionPtr(NULL),
rx_audioproc_(AudioProcessing::Create(VoEModuleId(instanceId, channelId))),
_rxVadObserverPtr(NULL),
_oldVadDecision(-1),
@@ -993,8 +920,6 @@ Channel::Channel(int32_t channelId,
_panLeft(1.0f),
_panRight(1.0f),
_outputGain(1.0f),
- _encrypting(false),
- _decrypting(false),
_playOutbandDtmfEvent(false),
_playInbandDtmfEvent(false),
_extraPayloadType(0),
@@ -1115,10 +1040,6 @@ Channel::~Channel()
// Delete other objects
RtpDump::DestroyRtpDump(&_rtpDumpIn);
RtpDump::DestroyRtpDump(&_rtpDumpOut);
- delete [] _encryptionRTPBufferPtr;
- delete [] _decryptionRTPBufferPtr;
- delete [] _encryptionRTCPBufferPtr;
- delete [] _decryptionRTCPBufferPtr;
delete &_callbackCritSect;
delete &_fileCritSect;
delete &volume_settings_critsect_;
@@ -3035,54 +2956,6 @@ Channel::GetChannelOutputVolumeScaling(float& scaling) const
return 0;
}
-int
-Channel::RegisterExternalEncryption(Encryption& encryption)
-{
- WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
- "Channel::RegisterExternalEncryption()");
-
- CriticalSectionScoped cs(&_callbackCritSect);
-
- if (_encryptionPtr)
- {
- _engineStatisticsPtr->SetLastError(
- VE_INVALID_OPERATION, kTraceError,
- "RegisterExternalEncryption() encryption already enabled");
- return -1;
- }
-
- _encryptionPtr = &encryption;
-
- _decrypting = true;
- _encrypting = true;
-
- return 0;
-}
-
-int
-Channel::DeRegisterExternalEncryption()
-{
- WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId,_channelId),
- "Channel::DeRegisterExternalEncryption()");
-
- CriticalSectionScoped cs(&_callbackCritSect);
-
- if (!_encryptionPtr)
- {
- _engineStatisticsPtr->SetLastError(
- VE_INVALID_OPERATION, kTraceWarning,
- "DeRegisterExternalEncryption() encryption already disabled");
- return 0;
- }
-
- _decrypting = false;
- _encrypting = false;
-
- _encryptionPtr = NULL;
-
- return 0;
-}
-
int Channel::SendTelephoneEventOutband(unsigned char eventCode,
int lengthMs, int attenuationDb,
bool playDtmfEvent)
diff --git a/voice_engine/channel.h b/voice_engine/channel.h
index 3dfeedc4..3fadf929 100644
--- a/voice_engine/channel.h
+++ b/voice_engine/channel.h
@@ -218,10 +218,6 @@ public:
// VoEVideoSyncExtended
int GetRtpRtcp(RtpRtcp** rtpRtcpModule, RtpReceiver** rtp_receiver) const;
- // VoEEncryption
- int RegisterExternalEncryption(Encryption& encryption);
- int DeRegisterExternalEncryption();
-
// VoEDtmf
int SendTelephoneEventOutband(unsigned char eventCode, int lengthMs,
int attenuationDb, bool playDtmfEvent);
@@ -484,10 +480,6 @@ private:
bool _outputExternalMedia;
VoEMediaProcess* _inputExternalMediaCallbackPtr;
VoEMediaProcess* _outputExternalMediaCallbackPtr;
- uint8_t* _encryptionRTPBufferPtr;
- uint8_t* _decryptionRTPBufferPtr;
- uint8_t* _encryptionRTCPBufferPtr;
- uint8_t* _decryptionRTCPBufferPtr;
uint32_t _timeStamp;
uint8_t _sendTelephoneEventPayloadType;
@@ -509,7 +501,6 @@ private:
VoiceEngineObserver* _voiceEngineObserverPtr; // owned by base
CriticalSectionWrapper* _callbackCritSectPtr; // owned by base
Transport* _transportPtr; // WebRtc socket or external transport
- Encryption* _encryptionPtr; // WebRtc SRTP or external encryption
scoped_ptr<AudioProcessing> rtp_audioproc_;
scoped_ptr<AudioProcessing> rx_audioproc_; // far end AudioProcessing
VoERxVadCallback* _rxVadObserverPtr;
@@ -533,9 +524,6 @@ private:
float _panLeft;
float _panRight;
float _outputGain;
- // VoEEncryption
- bool _encrypting;
- bool _decrypting;
// VoEDtmf
bool _playOutbandDtmfEvent;
bool _playInbandDtmfEvent;
diff --git a/voice_engine/include/voe_encryption.h b/voice_engine/include/voe_encryption.h
deleted file mode 100644
index e4b0dd0b..00000000
--- a/voice_engine/include/voe_encryption.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-// This sub-API supports the following functionalities:
-//
-// - External encryption and decryption.
-//
-// Usage example, omitting error checking:
-//
-// using namespace webrtc;
-// VoiceEngine* voe = VoiceEngine::Create();
-// VoEEncryption* encrypt = VoEEncryption::GetInterface(voe);
-// ...
-// encrypt->Release();
-// VoiceEngine::Delete(voe);
-//
-#ifndef WEBRTC_VOICE_ENGINE_VOE_ENCRYPTION_H
-#define WEBRTC_VOICE_ENGINE_VOE_ENCRYPTION_H
-
-#include "webrtc/common_types.h"
-
-namespace webrtc {
-
-class VoiceEngine;
-
-class WEBRTC_DLLEXPORT VoEEncryption
-{
-public:
- // Factory for the VoEEncryption sub-API. Increases an internal
- // reference counter if successful. Returns NULL if the API is not
- // supported or if construction fails.
- static VoEEncryption* GetInterface(VoiceEngine* voiceEngine);
-
- // Releases the VoEEncryption sub-API and decreases an internal
- // reference counter. Returns the new reference count. This value should
- // be zero for all sub-API:s before the VoiceEngine object can be safely
- // deleted.
- virtual int Release() = 0;
-
- // Installs an Encryption instance and enables external encryption
- // for the selected |channel|.
- virtual int RegisterExternalEncryption(
- int channel, Encryption& encryption) = 0;
-
- // Removes an Encryption instance and disables external encryption
- // for the selected |channel|.
- virtual int DeRegisterExternalEncryption(int channel) = 0;
-
-protected:
- VoEEncryption() {}
- virtual ~VoEEncryption() {}
-};
-
-} // namespace webrtc
-
-#endif // WEBRTC_VOICE_ENGINE_VOE_ENCRYPTION_H
diff --git a/voice_engine/include/voe_errors.h b/voice_engine/include/voe_errors.h
index 4ce0e5c7..87546e27 100644
--- a/voice_engine/include/voe_errors.h
+++ b/voice_engine/include/voe_errors.h
@@ -36,7 +36,7 @@
#define VE_DTMF_OUTOF_RANGE 8022
#define VE_INVALID_CHANNELS 8023
#define VE_SET_PLTYPE_FAILED 8024
-#define VE_ENCRYPT_NOT_INITED 8025
+// 8025 is not used
#define VE_NOT_INITED 8026
#define VE_NOT_SENDING 8027
#define VE_EXT_TRANSPORT_NOT_SUPPORTED 8028
@@ -114,8 +114,8 @@
#define VE_RTP_KEEPALIVE_FAILED 9023
#define VE_SEND_DTMF_FAILED 9024
#define VE_CANNOT_RETRIEVE_CNAME 9025
-#define VE_DECRYPTION_FAILED 9026
-#define VE_ENCRYPTION_FAILED 9027
+// 9026 is not used
+// 9027 is not used
#define VE_CANNOT_RETRIEVE_RTP_STAT 9028
#define VE_GQOS_ERROR 9029
#define VE_BINDING_SOCKET_TO_LOCAL_ADDRESS_FAILED 9030
diff --git a/voice_engine/test/android/android_test/jni/android_test.cc b/voice_engine/test/android/android_test/jni/android_test.cc
index be682ad4..9addbe50 100644
--- a/voice_engine/test/android/android_test/jni/android_test.cc
+++ b/voice_engine/test/android/android_test/jni/android_test.cc
@@ -20,7 +20,6 @@
#include "webrtc/voice_engine/include/voe_audio_processing.h"
#include "webrtc/voice_engine/include/voe_base.h"
#include "webrtc/voice_engine/include/voe_codec.h"
-#include "webrtc/voice_engine/include/voe_encryption.h"
#include "webrtc/voice_engine/include/voe_file.h"
#include "webrtc/voice_engine/include/voe_hardware.h"
#include "webrtc/voice_engine/include/voe_network.h"
@@ -89,13 +88,6 @@
"RTP / RTCP pointer doesn't exist"); \
return -1; \
}
-#define VALIDATE_ENCRYPT_POINTER \
- if (!veData1.encrypt) \
- { \
- __android_log_write(ANDROID_LOG_ERROR, WEBRTC_LOG_TAG, \
- "Encrypt pointer doesn't exist"); \
- return -1; \
- }
// Register functions in JNI_OnLoad()
// How do we ensure that VoE is deleted? JNI_OnUnload?
@@ -116,32 +108,6 @@ enum TestType
CPU = 4
};
-// ExtendedSelection enumerator
-enum ExtendedSelection
-{
- XSEL_Invalid = -1,
- XSEL_None = 0,
- XSEL_All,
- XSEL_Base,
- XSEL_CallReport,
- XSEL_Codec,
- XSEL_DTMF,
- XSEL_Encryption,
- XSEL_ExternalMedia,
- XSEL_File,
- XSEL_Hardware,
- XSEL_NetEqStats,
- XSEL_Network,
- XSEL_PTT,
- XSEL_RTP_RTCP,
- XSEL_VideoSync,
- XSEL_VideoSyncExtended,
- XSEL_VolumeControl,
- XSEL_VQE,
- XSEL_APM,
- XSEL_VQMon
-};
-
using namespace webrtc;
class my_transportation;
@@ -160,7 +126,6 @@ typedef struct
VoEVolumeControl* volume;
VoEHardware* hardware;
VoERTP_RTCP* rtp_rtcp;
- VoEEncryption* encrypt;
// Other
my_transportation* extTrans;
JavaVM* jvm;
@@ -447,80 +412,12 @@ JNIEXPORT jint JNICALL Java_org_webrtc_voiceengine_test_AndroidTest_RunAutoTest(
return -1;
}
- ExtendedSelection xsel(XSEL_Invalid);
-
- switch (extendedSel)
- {
- case 0:
- xsel = XSEL_None;
- break;
- case 1:
- xsel = XSEL_All;
- break;
- case 2:
- xsel = XSEL_Base;
- break;
- case 3:
- xsel = XSEL_CallReport;
- break;
- case 4:
- xsel = XSEL_Codec;
- break;
- case 5:
- xsel = XSEL_DTMF;
- break;
- case 6:
- xsel = XSEL_Encryption;
- break;
- case 7:
- xsel = XSEL_ExternalMedia;
- break;
- case 8:
- xsel = XSEL_File;
- break;
- case 9:
- xsel = XSEL_Hardware;
- break;
- case 10:
- xsel = XSEL_NetEqStats;
- break;
- case 11:
- xsel = XSEL_Network;
- break;
- case 12:
- xsel = XSEL_PTT;
- break;
- case 13:
- xsel = XSEL_RTP_RTCP;
- break;
- case 14:
- xsel = XSEL_VideoSync;
- break;
- case 15:
- xsel = XSEL_VideoSyncExtended;
- break;
- case 16:
- xsel = XSEL_VolumeControl;
- break;
- case 17:
- xsel = XSEL_APM;
- break;
- case 18:
- xsel = XSEL_VQMon;
- break;
- default:
- xsel = XSEL_Invalid;
- __android_log_write(ANDROID_LOG_ERROR, WEBRTC_LOG_TAG,
- "RunAutoTest - Invalid extendedType");
- return -1;
- }
-
// Set instance independent Java objects
VoiceEngine::SetAndroidObjects(veData1.jvm, env, context);
// Call voe test interface function
// TODO(leozwang) add autotest setAndroidObjects(veData1.jvm, context);
- // jint retVal = runAutoTest(tType, xsel);
+ // jint retVal = runAutoTest(tType);
// Clear instance independent Java objects
VoiceEngine::SetAndroidObjects(NULL, NULL, NULL);
@@ -1348,15 +1245,6 @@ bool GetSubApis(VoiceEngineData &veData)
getOK = false;
}
- // Encrypt
- veData.encrypt = VoEEncryption::GetInterface(veData.ve);
- if (!veData.encrypt)
- {
- __android_log_write(ANDROID_LOG_ERROR, WEBRTC_LOG_TAG,
- "Get encrypt sub-API failed");
- getOK = false;
- }
-
return getOK;
}
@@ -1487,20 +1375,5 @@ bool ReleaseSubApis(VoiceEngineData &veData)
}
}
- // Encrypt
- if (veData.encrypt)
- {
- if (0 != veData.encrypt->Release())
- {
- __android_log_write(ANDROID_LOG_ERROR, WEBRTC_LOG_TAG,
- "Release encrypt sub-API failed");
- releaseOK = false;
- }
- else
- {
- veData.encrypt = NULL;
- }
- }
-
return releaseOK;
}
diff --git a/voice_engine/test/auto_test/fixtures/before_initialization_fixture.cc b/voice_engine/test/auto_test/fixtures/before_initialization_fixture.cc
index 9dd0b0f7..fcace2a0 100644
--- a/voice_engine/test/auto_test/fixtures/before_initialization_fixture.cc
+++ b/voice_engine/test/auto_test/fixtures/before_initialization_fixture.cc
@@ -34,7 +34,6 @@ BeforeInitializationFixture::BeforeInitializationFixture() {
voe_network_ = webrtc::VoENetwork::GetInterface(voice_engine_);
voe_file_ = webrtc::VoEFile::GetInterface(voice_engine_);
voe_vsync_ = webrtc::VoEVideoSync::GetInterface(voice_engine_);
- voe_encrypt_ = webrtc::VoEEncryption::GetInterface(voice_engine_);
voe_hardware_ = webrtc::VoEHardware::GetInterface(voice_engine_);
voe_xmedia_ = webrtc::VoEExternalMedia::GetInterface(voice_engine_);
voe_call_report_ = webrtc::VoECallReport::GetInterface(voice_engine_);
@@ -51,7 +50,6 @@ BeforeInitializationFixture::~BeforeInitializationFixture() {
voe_network_->Release();
voe_file_->Release();
voe_vsync_->Release();
- voe_encrypt_->Release();
voe_hardware_->Release();
voe_xmedia_->Release();
voe_call_report_->Release();
diff --git a/voice_engine/test/auto_test/fixtures/before_initialization_fixture.h b/voice_engine/test/auto_test/fixtures/before_initialization_fixture.h
index 5b85c3e2..e58a10b2 100644
--- a/voice_engine/test/auto_test/fixtures/before_initialization_fixture.h
+++ b/voice_engine/test/auto_test/fixtures/before_initialization_fixture.h
@@ -22,7 +22,6 @@
#include "webrtc/voice_engine/include/voe_call_report.h"
#include "webrtc/voice_engine/include/voe_codec.h"
#include "webrtc/voice_engine/include/voe_dtmf.h"
-#include "webrtc/voice_engine/include/voe_encryption.h"
#include "webrtc/voice_engine/include/voe_errors.h"
#include "webrtc/voice_engine/include/voe_external_media.h"
#include "webrtc/voice_engine/include/voe_file.h"
@@ -67,7 +66,6 @@ class BeforeInitializationFixture : public testing::Test {
webrtc::VoENetwork* voe_network_;
webrtc::VoEFile* voe_file_;
webrtc::VoEVideoSync* voe_vsync_;
- webrtc::VoEEncryption* voe_encrypt_;
webrtc::VoEHardware* voe_hardware_;
webrtc::VoEExternalMedia* voe_xmedia_;
webrtc::VoECallReport* voe_call_report_;
diff --git a/voice_engine/test/auto_test/fuzz/rtp_fuzz_test.cc b/voice_engine/test/auto_test/fuzz/rtp_fuzz_test.cc
deleted file mode 100644
index bf68da1d..00000000
--- a/voice_engine/test/auto_test/fuzz/rtp_fuzz_test.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include <time.h>
-
-#include "webrtc/test/libtest/include/bit_flip_encryption.h"
-#include "webrtc/voice_engine/test/auto_test/fixtures/after_streaming_fixture.h"
-
-class RtpFuzzTest : public AfterStreamingFixture {
- protected:
- void BitFlipFuzzTest(float flip_probability) {
- BitFlipEncryption bit_flip_encryption(time(NULL), flip_probability);
-
- TEST_LOG("Starting to flip bits in RTP/RTCP packets.\n");
- voe_encrypt_->RegisterExternalEncryption(channel_, bit_flip_encryption);
-
- Sleep(5000);
-
- voe_encrypt_->DeRegisterExternalEncryption(channel_);
-
- TEST_LOG("Flipped %d bits. Back to normal.\n",
- static_cast<int>(bit_flip_encryption.flip_count()));
- Sleep(2000);
- }
-};
-
-TEST_F(RtpFuzzTest, VoiceEngineDealsWithASmallNumberOfTamperedRtpPackets) {
- BitFlipFuzzTest(0.00005f);
-}
-
-TEST_F(RtpFuzzTest, VoiceEngineDealsWithAMediumNumberOfTamperedRtpPackets) {
- BitFlipFuzzTest(0.0005f);
-}
-
-TEST_F(RtpFuzzTest, VoiceEngineDealsWithALargeNumberOfTamperedRtpPackets) {
- BitFlipFuzzTest(0.05f);
-}
-
-TEST_F(RtpFuzzTest, VoiceEngineDealsWithAHugeNumberOfTamperedRtpPackets) {
- BitFlipFuzzTest(0.5f);
-}
diff --git a/voice_engine/test/auto_test/standard/encryption_test.cc b/voice_engine/test/auto_test/standard/encryption_test.cc
deleted file mode 100644
index bf54deb2..00000000
--- a/voice_engine/test/auto_test/standard/encryption_test.cc
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include "webrtc/voice_engine/include/voe_encryption.h"
-#include "webrtc/voice_engine/test/auto_test/fixtures/after_streaming_fixture.h"
-
-class BasicBitInverseEncryption : public webrtc::Encryption {
- void encrypt(int channel_no, unsigned char* in_data,
- unsigned char* out_data, int bytes_in, int* bytes_out);
- void decrypt(int channel_no, unsigned char* in_data,
- unsigned char* out_data, int bytes_in, int* bytes_out);
- void encrypt_rtcp(int channel_no, unsigned char* in_data,
- unsigned char* out_data, int bytes_in, int* bytes_out);
- void decrypt_rtcp(int channel_no, unsigned char* in_data,
- unsigned char* out_data, int bytes_in, int* bytes_out);
-};
-
-void BasicBitInverseEncryption::encrypt(int, unsigned char* in_data,
- unsigned char* out_data,
- int bytes_in, int* bytes_out) {
- int i;
- for (i = 0; i < bytes_in; i++)
- out_data[i] = ~in_data[i];
- out_data[bytes_in] = 0;
- out_data[bytes_in + 1] = 0;
- *bytes_out = bytes_in + 2;
-}
-
-void BasicBitInverseEncryption::decrypt(int, unsigned char* in_data,
- unsigned char* out_data,
- int bytes_in, int* bytes_out) {
- int i;
- for (i = 0; i < bytes_in; i++)
- out_data[i] = ~in_data[i];
- *bytes_out = bytes_in - 2;
-}
-
-void BasicBitInverseEncryption::encrypt_rtcp(int, unsigned char* in_data,
- unsigned char* out_data,
- int bytes_in, int* bytes_out) {
- int i;
- for (i = 0; i < bytes_in; i++)
- out_data[i] = ~in_data[i];
- out_data[bytes_in] = 0;
- out_data[bytes_in + 1] = 0;
- *bytes_out = bytes_in + 2;
-}
-
-void BasicBitInverseEncryption::decrypt_rtcp(int, unsigned char* in_data,
- unsigned char* out_data,
- int bytes_in, int* bytes_out) {
- int i;
- for (i = 0; i < bytes_in; i++)
- out_data[i] = ~in_data[i];
- out_data[bytes_in] = 0;
- out_data[bytes_in + 1] = 0;
- *bytes_out = bytes_in + 2;
-}
-
-
-class EncryptionTest : public AfterStreamingFixture {
-};
-
-TEST_F(EncryptionTest, ManualBasicCorrectExternalEncryptionHasNoEffectOnVoice) {
- BasicBitInverseEncryption basic_encryption;
-
- voe_encrypt_->RegisterExternalEncryption(channel_, basic_encryption);
-
- TEST_LOG("Registered external encryption, should still hear good audio.\n");
- Sleep(3000);
-
- voe_encrypt_->DeRegisterExternalEncryption(channel_);
-}
diff --git a/voice_engine/test/auto_test/voe_standard_test.cc b/voice_engine/test/auto_test/voe_standard_test.cc
index 9d5c9368..32bfa3b3 100644
--- a/voice_engine/test/auto_test/voe_standard_test.cc
+++ b/voice_engine/test/auto_test/voe_standard_test.cc
@@ -49,8 +49,6 @@ void SubAPIManager::DisplayStatus() const {
TEST_LOG(" Codec\n");
if (_dtmf)
TEST_LOG(" Dtmf\n");
- if (_encryption)
- TEST_LOG(" Encryption\n");
if (_externalMedia)
TEST_LOG(" ExternalMedia\n");
if (_file)
@@ -79,8 +77,6 @@ void SubAPIManager::DisplayStatus() const {
TEST_LOG(" Codec\n");
if (!_dtmf)
TEST_LOG(" Dtmf\n");
- if (!_encryption)
- TEST_LOG(" Encryption\n");
if (!_externalMedia)
TEST_LOG(" ExternamMedia\n");
if (!_file)
@@ -109,7 +105,6 @@ VoETestManager::VoETestManager()
voe_call_report_(0),
voe_codec_(0),
voe_dtmf_(0),
- voe_encrypt_(0),
voe_xmedia_(0),
voe_file_(0),
voe_hardware_(0),
@@ -165,7 +160,6 @@ void VoETestManager::GetInterfaces() {
#ifdef _TEST_VIDEO_SYNC_
voe_vsync_ = VoEVideoSync::GetInterface(voice_engine_);
#endif
- voe_encrypt_ = VoEEncryption::GetInterface(voice_engine_);
voe_hardware_ = VoEHardware::GetInterface(voice_engine_);
// Set the audio layer to use in all tests
if (voe_hardware_) {
@@ -231,10 +225,6 @@ int VoETestManager::ReleaseInterfaces() {
voe_vsync_ = NULL;
}
#endif
- if (voe_encrypt_) {
- voe_encrypt_->Release();
- voe_encrypt_ = NULL;
- }
if (voe_hardware_) {
voe_hardware_->Release();
voe_hardware_ = NULL;
diff --git a/voice_engine/test/auto_test/voe_standard_test.h b/voice_engine/test/auto_test/voe_standard_test.h
index 19dbc0e6..15dde0cd 100644
--- a/voice_engine/test/auto_test/voe_standard_test.h
+++ b/voice_engine/test/auto_test/voe_standard_test.h
@@ -31,9 +31,6 @@
#ifdef WEBRTC_VOICE_ENGINE_CODEC_API
#include "webrtc/voice_engine/include/voe_codec.h"
#endif
-#ifdef WEBRTC_VOICE_ENGINE_ENCRYPTION_API
-#include "webrtc/voice_engine/include/voe_encryption.h"
-#endif
#ifdef WEBRTC_VOICE_ENGINE_EXTERNAL_MEDIA_API
#include "webrtc/voice_engine/include/voe_external_media.h"
#endif
@@ -71,7 +68,6 @@ class SubAPIManager {
_callReport(false),
_codec(false),
_dtmf(false),
- _encryption(false),
_externalMedia(false),
_file(false),
_hardware(false),
@@ -90,9 +86,6 @@ class SubAPIManager {
#ifdef WEBRTC_VOICE_ENGINE_DTMF_API
_dtmf = true;
#endif
-#ifdef WEBRTC_VOICE_ENGINE_ENCRYPTION_API
- _encryption = true;
-#endif
#ifdef WEBRTC_VOICE_ENGINE_EXTERNAL_MEDIA_API
_externalMedia = true;
#endif
@@ -123,7 +116,7 @@ class SubAPIManager {
void DisplayStatus() const;
private:
- bool _base, _callReport, _codec, _dtmf, _encryption;
+ bool _base, _callReport, _codec, _dtmf;
bool _externalMedia, _file, _hardware;
bool _netEqStats, _network, _rtp_rtcp, _videoSync, _volumeControl, _apm;
};
@@ -185,10 +178,6 @@ class VoETestManager {
return voe_vsync_;
}
- VoEEncryption* EncryptionPtr() const {
- return voe_encrypt_;
- }
-
VoEExternalMedia* ExternalMediaPtr() const {
return voe_xmedia_;
}
@@ -211,7 +200,6 @@ class VoETestManager {
VoECallReport* voe_call_report_;
VoECodec* voe_codec_;
VoEDtmf* voe_dtmf_;
- VoEEncryption* voe_encrypt_;
VoEExternalMedia* voe_xmedia_;
VoEFile* voe_file_;
VoEHardware* voe_hardware_;
diff --git a/voice_engine/test/auto_test/voe_test_defines.h b/voice_engine/test/auto_test/voe_test_defines.h
index f53f3a98..c2fb38e9 100644
--- a/voice_engine/test/auto_test/voe_test_defines.h
+++ b/voice_engine/test/auto_test/voe_test_defines.h
@@ -30,7 +30,6 @@
#define _TEST_NETWORK_
#define _TEST_CALL_REPORT_
#define _TEST_VIDEO_SYNC_
-#define _TEST_ENCRYPT_
#define _TEST_NETEQ_STATS_
#define _TEST_XMEDIA_
@@ -69,9 +68,6 @@
#ifndef WEBRTC_VOICE_ENGINE_VIDEO_SYNC_API
#undef _TEST_VIDEO_SYNC_
#endif
-#ifndef WEBRTC_VOICE_ENGINE_ENCRYPTION_API
-#undef _TEST_ENCRYPT_
-#endif
#ifndef WEBRTC_VOICE_ENGINE_HARDWARE_API
#undef _TEST_HARDWARE_
#endif
diff --git a/voice_engine/test/auto_test/voe_unit_test.cc b/voice_engine/test/auto_test/voe_unit_test.cc
index c67de57a..d0826770 100644
--- a/voice_engine/test/auto_test/voe_unit_test.cc
+++ b/voice_engine/test/auto_test/voe_unit_test.cc
@@ -53,119 +53,8 @@ namespace voetest {
//
const int dTBetweenEachTest = 4000;
-// ----------------------------------------------------------------------------
-// Encrypt
-// ----------------------------------------------------------------------------
-
-void VoEUnitTest::encrypt(int channel_no, unsigned char * in_data,
- unsigned char * out_data, int bytes_in,
- int * bytes_out) {
- int i;
-
- if (!_extOnOff) {
- // no stereo emulation <=> pure bypass
- for (i = 0; i < bytes_in; i++)
- out_data[i] = in_data[i];
- *bytes_out = bytes_in;
- } else if (_extOnOff && (_extBitsPerSample == 16)) {
- // stereo emulation (sample based, 2 bytes per sample)
-
- const int nBytesPayload = bytes_in - 12;
-
- // RTP header (first 12 bytes)
- memcpy(out_data, in_data, 12);
-
- // skip RTP header
- short* ptrIn = (short*) &in_data[12];
- short* ptrOut = (short*) &out_data[12];
-
- // network byte order
- for (i = 0; i < nBytesPayload / 2; i++) {
- // produce two output samples for each input sample
- *ptrOut++ = *ptrIn; // left sample
- *ptrOut++ = *ptrIn; // right sample
- ptrIn++;
- }
-
- *bytes_out = 12 + 2 * nBytesPayload;
- } else if (_extOnOff && (_extBitsPerSample == 8)) {
- // stereo emulation (sample based, 1 bytes per sample)
-
- const int nBytesPayload = bytes_in - 12;
-
- // RTP header (first 12 bytes)
- memcpy(out_data, in_data, 12);
-
- // skip RTP header
- unsigned char* ptrIn = (unsigned char*) &in_data[12];
- unsigned char* ptrOut = (unsigned char*) &out_data[12];
-
- // network byte order
- for (i = 0; i < nBytesPayload; i++) {
- // produce two output samples for each input sample
- *ptrOut++ = *ptrIn; // left sample
- *ptrOut++ = *ptrIn; // right sample
- ptrIn++;
- }
-
- *bytes_out = 12 + 2 * nBytesPayload;
- } else if (_extOnOff && (_extBitsPerSample == -1)) {
- // stereo emulation (frame based)
-
- const int nBytesPayload = bytes_in - 12;
-
- // RTP header (first 12 bytes)
- memcpy(out_data, in_data, 12);
-
- // skip RTP header
- unsigned char* ptrIn = (unsigned char*) &in_data[12];
- unsigned char* ptrOut = (unsigned char*) &out_data[12];
-
- // left channel
- for (i = 0; i < nBytesPayload; i++) {
- *ptrOut++ = *ptrIn++;
- }
-
- ptrIn = (unsigned char*) &in_data[12];
-
- // right channel
- for (i = 0; i < nBytesPayload; i++) {
- *ptrOut++ = *ptrIn++;
- }
-
- *bytes_out = 12 + 2 * nBytesPayload;
- }
-}
-
-void VoEUnitTest::decrypt(int channel_no, unsigned char * in_data,
- unsigned char * out_data, int bytes_in,
- int * bytes_out) {
- int i;
- for (i = 0; i < bytes_in; i++)
- out_data[i] = in_data[i];
- *bytes_out = bytes_in;
-}
-
-void VoEUnitTest::encrypt_rtcp(int channel_no, unsigned char * in_data,
- unsigned char * out_data, int bytes_in,
- int * bytes_out) {
- int i;
- for (i = 0; i < bytes_in; i++)
- out_data[i] = in_data[i];
- *bytes_out = bytes_in;
-}
-
-void VoEUnitTest::decrypt_rtcp(int channel_no, unsigned char * in_data,
- unsigned char * out_data, int bytes_in,
- int * bytes_out) {
- int i;
- for (i = 0; i < bytes_in; i++)
- out_data[i] = in_data[i];
- *bytes_out = bytes_in;
-}
-
void VoEUnitTest::SetStereoExternalEncryption(int channel, bool onOff,
- int bitsPerSample) {
+ int bitsPerSample) {
_extOnOff = onOff;
_extChannel = channel;
_extBitsPerSample = bitsPerSample;
@@ -359,7 +248,6 @@ int VoEUnitTest::MixerTest() {
VoECodec* codec = _mgr.CodecPtr();
VoEFile* file = _mgr.FilePtr();
VoEVolumeControl* volume = _mgr.VolumeControlPtr();
- VoEEncryption* encrypt = _mgr.EncryptionPtr();
VoEDtmf* dtmf = _mgr.DtmfPtr();
VoEExternalMedia* xmedia = _mgr.ExternalMediaPtr();
@@ -554,10 +442,6 @@ int VoEUnitTest::MixerTest() {
Test(">> Verify correct mixing in stereo using emulated stereo input:\n");
- // enable external encryption
- CHECK(encrypt->RegisterExternalEncryption(0, *this));
- Test("(ch 0) External Encryption is now enabled:");
-
Test("(ch 0) Sending file at 8kHz <=> mixing in mono @ 8kHz...");
CHECK(StartMedia(0, 12345, true, true, true, true, false));
Sleep(testTime);
@@ -621,8 +505,6 @@ int VoEUnitTest::MixerTest() {
StopMedia(0);
l16_32.channels = 1;
- // disable external encryption
- CHECK(encrypt->DeRegisterExternalEncryption(0));
ANL();
base->DeleteChannel(0);
@@ -988,10 +870,6 @@ int VoEUnitTest::MixerTest() {
Test(">> Verify emulated stereo encoding for differenct codecs:\n");
- // enable external encryption
- CHECK(encrypt->RegisterExternalEncryption(0, *this));
- Test("(ch 0) External Encryption is now enabled:");
-
// register all codecs on the receiving side
strcpy(PCMU.plname, "PCMU");
PCMU.channels = 2;
@@ -1068,9 +946,6 @@ int VoEUnitTest::MixerTest() {
StopMedia(0);
- // disable external encryption
- CHECK(encrypt->DeRegisterExternalEncryption(0));
-
base->DeleteChannel(0);
// ------------------------------------------------------------------------
diff --git a/voice_engine/test/auto_test/voe_unit_test.h b/voice_engine/test/auto_test/voe_unit_test.h
index fb80b3dd..be60cd28 100644
--- a/voice_engine/test/auto_test/voe_unit_test.h
+++ b/voice_engine/test/auto_test/voe_unit_test.h
@@ -19,23 +19,12 @@ namespace voetest {
class VoETestManager;
-class VoEUnitTest : public Encryption {
+class VoEUnitTest {
public:
VoEUnitTest(VoETestManager& mgr);
~VoEUnitTest() {}
int DoTest();
- protected:
- // Encryption
- void encrypt(int channel_no, unsigned char * in_data,
- unsigned char * out_data, int bytes_in, int * bytes_out);
- void decrypt(int channel_no, unsigned char * in_data,
- unsigned char * out_data, int bytes_in, int * bytes_out);
- void encrypt_rtcp(int channel_no, unsigned char * in_data,
- unsigned char * out_data, int bytes_in, int * bytes_out);
- void decrypt_rtcp(int channel_no, unsigned char * in_data,
- unsigned char * out_data, int bytes_in, int * bytes_out);
-
private:
int MenuSelection();
int MixerTest();
diff --git a/voice_engine/test/cmd_test/voe_cmd_test.cc b/voice_engine/test/cmd_test/voe_cmd_test.cc
index 70cae4af..bf167815 100644
--- a/voice_engine/test/cmd_test/voe_cmd_test.cc
+++ b/voice_engine/test/cmd_test/voe_cmd_test.cc
@@ -32,7 +32,6 @@
#include "webrtc/voice_engine/include/voe_base.h"
#include "webrtc/voice_engine/include/voe_codec.h"
#include "webrtc/voice_engine/include/voe_dtmf.h"
-#include "webrtc/voice_engine/include/voe_encryption.h"
#include "webrtc/voice_engine/include/voe_errors.h"
#include "webrtc/voice_engine/include/voe_external_media.h"
#include "webrtc/voice_engine/include/voe_file.h"
@@ -67,7 +66,6 @@ VoEAudioProcessing* apm = NULL;
VoENetwork* netw = NULL;
VoEFile* file = NULL;
VoEVideoSync* vsync = NULL;
-VoEEncryption* encr = NULL;
VoEHardware* hardware = NULL;
VoEExternalMedia* xmedia = NULL;
VoENetEqStats* neteqst = NULL;
@@ -147,7 +145,6 @@ int main(int argc, char** argv) {
netw = VoENetwork::GetInterface(m_voe);
file = VoEFile::GetInterface(m_voe);
vsync = VoEVideoSync::GetInterface(m_voe);
- encr = VoEEncryption::GetInterface(m_voe);
hardware = VoEHardware::GetInterface(m_voe);
xmedia = VoEExternalMedia::GetInterface(m_voe);
neteqst = VoENetEqStats::GetInterface(m_voe);
@@ -220,9 +217,6 @@ int main(int argc, char** argv) {
if (vsync)
vsync->Release();
- if (encr)
- encr->Release();
-
if (hardware)
hardware->Release();
diff --git a/voice_engine/test/win_test/WinTestDlg.cc b/voice_engine/test/win_test/WinTestDlg.cc
index 506abfa2..a37cc444 100644
--- a/voice_engine/test/win_test/WinTestDlg.cc
+++ b/voice_engine/test/win_test/WinTestDlg.cc
@@ -275,72 +275,6 @@ void MediaProcessImpl::Process(int channel,
}
// ----------------------------------------------------------------------------
-// Encryptionen
-// ----------------------------------------------------------------------------
-
-class MyEncryption : public Encryption
-{
-public:
- void encrypt(int channel_no, unsigned char * in_data, unsigned char * out_data, int bytes_in, int* bytes_out);
- void decrypt(int channel_no, unsigned char * in_data, unsigned char * out_data, int bytes_in, int* bytes_out);
- void encrypt_rtcp(int channel_no, unsigned char * in_data, unsigned char * out_data, int bytes_in, int* bytes_out);
- void decrypt_rtcp(int channel_no, unsigned char * in_data, unsigned char * out_data, int bytes_in, int* bytes_out);
-};
-
-void MyEncryption::encrypt(int channel_no, unsigned char * in_data, unsigned char * out_data, int bytes_in, int* bytes_out)
-{
- // --- Stereo emulation (sample based, 2 bytes per sample)
-
- const int nBytesPayload = bytes_in-12;
-
- // RTP header (first 12 bytes)
- memcpy(out_data, in_data, 12);
-
- // skip RTP header
- short* ptrIn = (short*) &in_data[12];
- short* ptrOut = (short*) &out_data[12];
-
- // network byte order
- for (int i = 0; i < nBytesPayload/2; i++)
- {
- // produce two output samples for each input sample
- *ptrOut++ = *ptrIn; // left sample
- *ptrOut++ = *ptrIn; // right sample
- ptrIn++;
- }
-
- *bytes_out = 12 + 2*nBytesPayload;
-
- /*
- for(int i = 0; i < bytes_in; i++)
- out_data[i] =~ in_data[i];
- *bytes_out = bytes_in;
- */
-}
-
-void MyEncryption::decrypt(int channel_no, unsigned char * in_data, unsigned char * out_data, int bytes_in, int* bytes_out)
-{
- // Do nothing (<=> memcpy)
- for(int i = 0; i < bytes_in; i++)
- out_data[i] = in_data[i];
- *bytes_out = bytes_in;
-}
-
-void MyEncryption::encrypt_rtcp(int channel_no, unsigned char * in_data, unsigned char * out_data, int bytes_in, int* bytes_out)
-{
- for(int i = 0; i < bytes_in; i++)
- out_data[i] =~ in_data[i];
- *bytes_out = bytes_in;
-}
-
-void MyEncryption::decrypt_rtcp(int channel_no, unsigned char * in_data, unsigned char * out_data, int bytes_in, int* bytes_out)
-{
- for(int i = 0; i < bytes_in; i++)
- out_data[i] =~ in_data[i];
- *bytes_out = bytes_in;
-}
-
-// ----------------------------------------------------------------------------
// TelephoneEventObserver
// ----------------------------------------------------------------------------
@@ -1121,10 +1055,8 @@ CWinTestDlg::CWinTestDlg(CWnd* pParent /*=NULL*/)
_veHardwarePtr(NULL),
_veExternalMediaPtr(NULL),
_veApmPtr(NULL),
- _veEncryptionPtr(NULL),
_veRtpRtcpPtr(NULL),
_transportPtr(NULL),
- _encryptionPtr(NULL),
_externalMediaPtr(NULL),
_externalTransport(false),
_externalTransportBuild(false),
@@ -1172,7 +1104,6 @@ CWinTestDlg::CWinTestDlg(CWnd* pParent /*=NULL*/)
{
_veExternalMediaPtr = VoEExternalMedia::GetInterface(_vePtr);
_veVolumeControlPtr = VoEVolumeControl::GetInterface(_vePtr);
- _veEncryptionPtr = VoEEncryption::GetInterface(_vePtr);
_veVideoSyncPtr = VoEVideoSync::GetInterface(_vePtr);
_veNetworkPtr = VoENetwork::GetInterface(_vePtr);
_veFilePtr = VoEFile::GetInterface(_vePtr);
@@ -1183,7 +1114,6 @@ CWinTestDlg::CWinTestDlg(CWnd* pParent /*=NULL*/)
_veHardwarePtr = VoEHardware::GetInterface(_vePtr);
_veRtpRtcpPtr = VoERTP_RTCP::GetInterface(_vePtr);
_transportPtr = new MyTransport(_veNetworkPtr);
- _encryptionPtr = new MyEncryption();
_externalMediaPtr = new MediaProcessImpl();
_connectionObserverPtr = new ConnectionObserver();
_rxVadObserverPtr = new RxCallback();
@@ -1204,11 +1134,9 @@ CWinTestDlg::~CWinTestDlg()
if (_connectionObserverPtr) delete _connectionObserverPtr;
if (_externalMediaPtr) delete _externalMediaPtr;
if (_transportPtr) delete _transportPtr;
- if (_encryptionPtr) delete _encryptionPtr;
if (_rxVadObserverPtr) delete _rxVadObserverPtr;
if (_veExternalMediaPtr) _veExternalMediaPtr->Release();
- if (_veEncryptionPtr) _veEncryptionPtr->Release();
if (_veVideoSyncPtr) _veVideoSyncPtr->Release();
if (_veVolumeControlPtr) _veVolumeControlPtr->Release();
@@ -2675,162 +2603,32 @@ void CWinTestDlg::OnBnClickedCheckMuteIn2()
void CWinTestDlg::OnBnClickedCheckSrtpTx1()
{
- int ret(0);
- int channel = GetDlgItemInt(IDC_EDIT_1);
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_SRTP_TX_1);
- int check = button->GetCheck();
- const bool enable = (check == BST_CHECKED);
- bool useForRTCP = false;
- if (enable)
- {
- (_checkSrtpTx1++ %2 == 0) ? useForRTCP = false : useForRTCP = true;
- // TODO(solenberg): Install SRTP encryption policy.
- TEST(true, "Built-in SRTP support is deprecated. Enable it again by "
- "setting an external encryption policy, i.e.:\n\r"
- "_veEncryptionPtr->RegisterExternalEncryption(channel, myPolicy)");
- }
- else
- {
- // TODO(solenberg): Uninstall SRTP encryption policy, i.e.:
- // _veEncryptionPtr->DeRegisterExternalEncryption(channel);
- }
- if (ret == -1)
- {
- // restore inital state since API call failed
- button->SetCheck((check == BST_CHECKED) ? BST_UNCHECKED : BST_CHECKED);
- }
+ TEST(true, "Built-in SRTP support is deprecated.");
}
void CWinTestDlg::OnBnClickedCheckSrtpTx2()
{
- int ret(0);
- int channel = GetDlgItemInt(IDC_EDIT_2);
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_SRTP_TX_2);
- int check = button->GetCheck();
- const bool enable = (check == BST_CHECKED);
- bool useForRTCP = false;
- if (enable)
- {
- (_checkSrtpTx2++ %2 == 0) ? useForRTCP = false : useForRTCP = true;
- // TODO(solenberg): Install SRTP encryption policy.
- TEST(true, "Built-in SRTP support is deprecated. Enable it again by "
- "setting an external encryption policy, i.e.:\n\r"
- "_veEncryptionPtr->RegisterExternalEncryption(channel, myPolicy)");
- }
- else
- {
- // TODO(solenberg): Uninstall SRTP encryption policy, i.e.:
- // _veEncryptionPtr->DeRegisterExternalEncryption(channel);
- }
- if (ret == -1)
- {
- // restore inital state since API call failed
- button->SetCheck((check == BST_CHECKED) ? BST_UNCHECKED : BST_CHECKED);
- }
+ TEST(true, "Built-in SRTP support is deprecated.");
}
void CWinTestDlg::OnBnClickedCheckSrtpRx1()
{
- int ret(0);
- int channel = GetDlgItemInt(IDC_EDIT_1);
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_SRTP_RX_1);
- int check = button->GetCheck();
- const bool enable = (check == BST_CHECKED);
- bool useForRTCP(false);
- if (enable)
- {
- (_checkSrtpRx1++ %2 == 0) ? useForRTCP = false : useForRTCP = true;
- // TODO(solenberg): Install SRTP encryption policy.
- TEST(true, "Built-in SRTP support is deprecated. Enable it again by "
- "setting an external encryption policy, i.e.:\n\r"
- "_veEncryptionPtr->RegisterExternalEncryption(channel, myPolicy)");
- }
- else
- {
- // TODO(solenberg): Uninstall SRTP encryption policy, i.e.:
- // _veEncryptionPtr->DeRegisterExternalEncryption(channel);
- }
- if (ret == -1)
- {
- // restore inital state since API call failed
- button->SetCheck((check == BST_CHECKED) ? BST_UNCHECKED : BST_CHECKED);
- }
+ TEST(true, "Built-in SRTP support is deprecated.");
}
void CWinTestDlg::OnBnClickedCheckSrtpRx2()
{
- int ret(0);
- int channel = GetDlgItemInt(IDC_EDIT_2);
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_SRTP_RX_2);
- int check = button->GetCheck();
- const bool enable = (check == BST_CHECKED);
- bool useForRTCP(false);
- if (enable)
- {
- (_checkSrtpRx2++ %2 == 0) ? useForRTCP = false : useForRTCP = true;
- // TODO(solenberg): Install SRTP encryption policy.
- TEST(true, "Built-in SRTP support is deprecated. Enable it again by "
- "setting an external encryption policy, i.e.:\n\r"
- "_veEncryptionPtr->RegisterExternalEncryption(channel, myPolicy)");
- }
- else
- {
- // TODO(solenberg): Uninstall SRTP encryption policy, i.e.:
- // _veEncryptionPtr->DeRegisterExternalEncryption(channel);
- }
- if (ret == -1)
- {
- // restore inital state since API call failed
- button->SetCheck((check == BST_CHECKED) ? BST_UNCHECKED : BST_CHECKED);
- }
+ TEST(true, "Built-in SRTP support is deprecated.");
}
void CWinTestDlg::OnBnClickedCheckExtEncryption1()
{
- int ret(0);
- int channel = GetDlgItemInt(IDC_EDIT_1);
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_EXT_ENCRYPTION_1);
- int check = button->GetCheck();
- const bool enable = (check == BST_CHECKED);
- if (enable)
- {
- TEST((ret = _veEncryptionPtr->RegisterExternalEncryption(channel, *_encryptionPtr)) == 0,
- _T("RegisterExternalEncryption(channel=%d, encryption=0x%x)"), channel, _encryptionPtr);
- }
- else
- {
- TEST((ret = _veEncryptionPtr->DeRegisterExternalEncryption(channel)) == 0,
- _T("DeRegisterExternalEncryption(channel=%d)"), channel);
- }
- if (ret == -1)
- {
- // restore inital state since API call failed
- button->SetCheck((check == BST_CHECKED) ? BST_UNCHECKED : BST_CHECKED);
- }
+ TEST(true, "External Encryption has been removed from the API!");
}
void CWinTestDlg::OnBnClickedCheckExtEncryption2()
{
- int ret(0);
- int channel = GetDlgItemInt(IDC_EDIT_2);
- CButton* button = (CButton*)GetDlgItem(IDC_CHECK_EXT_ENCRYPTION_2);
- int check = button->GetCheck();
- const bool enable = (check == BST_CHECKED);
- if (enable)
- {
- TEST((ret = _veEncryptionPtr->RegisterExternalEncryption(channel, *_encryptionPtr)) == 0,
- _T("RegisterExternalEncryption(channel=%d, encryption=0x%x)"), channel, _encryptionPtr);
- }
- else
- {
- TEST((ret = _veEncryptionPtr->DeRegisterExternalEncryption(channel)) == 0,
- _T("DeRegisterExternalEncryption(channel=%d)"), channel);
- }
- if (ret == -1)
- {
- // restore inital state since API call failed
- button->SetCheck((check == BST_CHECKED) ? BST_UNCHECKED : BST_CHECKED);
- }
+ TEST(true, "External Encryption has been removed from the API!");
}
void CWinTestDlg::OnBnClickedButtonDtmf1()
diff --git a/voice_engine/test/win_test/WinTestDlg.h b/voice_engine/test/win_test/WinTestDlg.h
index 65dcf384..41041c23 100644
--- a/voice_engine/test/win_test/WinTestDlg.h
+++ b/voice_engine/test/win_test/WinTestDlg.h
@@ -83,7 +83,6 @@
#include "webrtc/voice_engine/include/voe_base.h"
#include "webrtc/voice_engine/include/voe_codec.h"
#include "webrtc/voice_engine/include/voe_dtmf.h"
-#include "webrtc/voice_engine/include/voe_encryption.h"
#include "webrtc/voice_engine/include/voe_external_media.h"
#include "webrtc/voice_engine/include/voe_file.h"
#include "webrtc/voice_engine/include/voe_hardware.h"
@@ -98,7 +97,6 @@
class MediaProcessImpl;
class ConnectionObserver;
-class MyEncryption;
class RxCallback;
class MyTransport;
@@ -153,7 +151,6 @@ private:
VoECodec* _veCodecPtr;
VoEExternalMedia* _veExternalMediaPtr;
VoEVolumeControl* _veVolumeControlPtr;
- VoEEncryption* _veEncryptionPtr;
VoEHardware* _veHardwarePtr;
VoEVideoSync* _veVideoSyncPtr;
VoENetwork* _veNetworkPtr;
@@ -165,7 +162,6 @@ private:
MyTransport* _transportPtr;
MediaProcessImpl* _externalMediaPtr;
ConnectionObserver* _connectionObserverPtr;
- MyEncryption* _encryptionPtr;
RxCallback* _rxVadObserverPtr;
private:
@@ -252,8 +248,6 @@ public:
afx_msg void OnBnClickedCheckSrtpRx1();
afx_msg void OnBnClickedCheckSrtpTx2();
afx_msg void OnBnClickedCheckSrtpRx2();
- afx_msg void OnBnClickedCheckExtEncryption1();
- afx_msg void OnBnClickedCheckExtEncryption2();
afx_msg void OnBnClickedButtonDtmf1();
afx_msg void OnBnClickedCheckRecMic();
afx_msg void OnBnClickedButtonDtmf2();
diff --git a/voice_engine/voe_encryption_impl.cc b/voice_engine/voe_encryption_impl.cc
deleted file mode 100644
index 518a1c61..00000000
--- a/voice_engine/voe_encryption_impl.cc
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#include "webrtc/voice_engine/voe_encryption_impl.h"
-
-
-#include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
-#include "webrtc/system_wrappers/interface/trace.h"
-#include "webrtc/voice_engine/channel.h"
-#include "webrtc/voice_engine/include/voe_errors.h"
-#include "webrtc/voice_engine/voice_engine_impl.h"
-
-namespace webrtc {
-
-VoEEncryption* VoEEncryption::GetInterface(VoiceEngine* voiceEngine)
-{
-#ifndef WEBRTC_VOICE_ENGINE_ENCRYPTION_API
- return NULL;
-#else
- if (NULL == voiceEngine)
- {
- return NULL;
- }
- VoiceEngineImpl* s = static_cast<VoiceEngineImpl*>(voiceEngine);
- s->AddRef();
- return s;
-#endif
-}
-
-#ifdef WEBRTC_VOICE_ENGINE_ENCRYPTION_API
-
-VoEEncryptionImpl::VoEEncryptionImpl(voe::SharedData* shared) : _shared(shared)
-{
- WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(_shared->instance_id(), -1),
- "VoEEncryptionImpl::VoEEncryptionImpl() - ctor");
-}
-
-VoEEncryptionImpl::~VoEEncryptionImpl()
-{
- WEBRTC_TRACE(kTraceMemory, kTraceVoice, VoEId(_shared->instance_id(), -1),
- "VoEEncryptionImpl::~VoEEncryptionImpl() - dtor");
-}
-
-int VoEEncryptionImpl::RegisterExternalEncryption(int channel,
- Encryption& encryption)
-{
- WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
- "RegisterExternalEncryption(channel=%d, encryption=0x%x)",
- channel, &encryption);
- if (!_shared->statistics().Initialized())
- {
- _shared->SetLastError(VE_NOT_INITED, kTraceError);
- return -1;
- }
- voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel);
- voe::Channel* channelPtr = ch.channel();
- if (channelPtr == NULL)
- {
- _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError,
- "RegisterExternalEncryption() failed to locate channel");
- return -1;
- }
- return channelPtr->RegisterExternalEncryption(encryption);
-}
-
-int VoEEncryptionImpl::DeRegisterExternalEncryption(int channel)
-{
- WEBRTC_TRACE(kTraceApiCall, kTraceVoice, VoEId(_shared->instance_id(), -1),
- "DeRegisterExternalEncryption(channel=%d)", channel);
- if (!_shared->statistics().Initialized())
- {
- _shared->SetLastError(VE_NOT_INITED, kTraceError);
- return -1;
- }
- voe::ChannelOwner ch = _shared->channel_manager().GetChannel(channel);
- voe::Channel* channelPtr = ch.channel();
- if (channelPtr == NULL)
- {
- _shared->SetLastError(VE_CHANNEL_NOT_VALID, kTraceError,
- "DeRegisterExternalEncryption() failed to locate channel");
- return -1;
- }
- return channelPtr->DeRegisterExternalEncryption();
-}
-
-#endif // #ifdef WEBRTC_VOICE_ENGINE_ENCRYPTION_API
-
-// EOF
-} // namespace webrtc
diff --git a/voice_engine/voe_encryption_impl.h b/voice_engine/voe_encryption_impl.h
deleted file mode 100644
index 6d482fff..00000000
--- a/voice_engine/voe_encryption_impl.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#ifndef WEBRTC_VOICE_ENGINE_VOE_ENCRYPTION_IMPL_H
-#define WEBRTC_VOICE_ENGINE_VOE_ENCRYPTION_IMPL_H
-
-#include "webrtc/voice_engine/include/voe_encryption.h"
-
-#include "webrtc/voice_engine/shared_data.h"
-
-namespace webrtc {
-
-class VoEEncryptionImpl : public VoEEncryption
-{
-public:
- // External encryption
- virtual int RegisterExternalEncryption(
- int channel,
- Encryption& encryption);
-
- virtual int DeRegisterExternalEncryption(int channel);
-
-protected:
- VoEEncryptionImpl(voe::SharedData* shared);
- virtual ~VoEEncryptionImpl();
-
-private:
- voe::SharedData* _shared;
-};
-
-} // namespace webrtc
-
-#endif // #ifndef WEBRTC_VOICE_ENGINE_VOE_ENCRYPTION_IMPL_H
diff --git a/voice_engine/voice_engine.gyp b/voice_engine/voice_engine.gyp
index 09bb58b6..85855d34 100644
--- a/voice_engine/voice_engine.gyp
+++ b/voice_engine/voice_engine.gyp
@@ -34,7 +34,6 @@
'include/voe_call_report.h',
'include/voe_codec.h',
'include/voe_dtmf.h',
- 'include/voe_encryption.h',
'include/voe_errors.h',
'include/voe_external_media.h',
'include/voe_file.h',
@@ -78,8 +77,6 @@
'voe_codec_impl.h',
'voe_dtmf_impl.cc',
'voe_dtmf_impl.h',
- 'voe_encryption_impl.cc',
- 'voe_encryption_impl.h',
'voe_external_media_impl.cc',
'voe_external_media_impl.h',
'voe_file_impl.cc',
@@ -155,7 +152,6 @@
'<(DEPTH)/testing/gtest.gyp:gtest',
'<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
'<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
- '<(webrtc_root)/test/libtest/libtest.gyp:libtest',
'<(webrtc_root)/test/test.gyp:channel_transport',
'<(webrtc_root)/test/test.gyp:test_support',
],
@@ -171,13 +167,11 @@
'test/auto_test/fixtures/after_streaming_fixture.h',
'test/auto_test/fixtures/before_initialization_fixture.cc',
'test/auto_test/fixtures/before_initialization_fixture.h',
- 'test/auto_test/fuzz/rtp_fuzz_test.cc',
'test/auto_test/standard/audio_processing_test.cc',
'test/auto_test/standard/call_report_test.cc',
'test/auto_test/standard/codec_before_streaming_test.cc',
'test/auto_test/standard/codec_test.cc',
'test/auto_test/standard/dtmf_test.cc',
- 'test/auto_test/standard/encryption_test.cc',
'test/auto_test/standard/external_media_test.cc',
'test/auto_test/standard/file_before_streaming_test.cc',
'test/auto_test/standard/file_test.cc',
diff --git a/voice_engine/voice_engine_impl.h b/voice_engine/voice_engine_impl.h
index fe6a7915..ffdf5910 100644
--- a/voice_engine/voice_engine_impl.h
+++ b/voice_engine/voice_engine_impl.h
@@ -27,9 +27,6 @@
#ifdef WEBRTC_VOICE_ENGINE_DTMF_API
#include "webrtc/voice_engine/voe_dtmf_impl.h"
#endif
-#ifdef WEBRTC_VOICE_ENGINE_ENCRYPTION_API
-#include "webrtc/voice_engine/voe_encryption_impl.h"
-#endif
#ifdef WEBRTC_VOICE_ENGINE_EXTERNAL_MEDIA_API
#include "webrtc/voice_engine/voe_external_media_impl.h"
#endif
@@ -70,9 +67,6 @@ class VoiceEngineImpl : public voe::SharedData, // Must be the first base class
#ifdef WEBRTC_VOICE_ENGINE_DTMF_API
public VoEDtmfImpl,
#endif
-#ifdef WEBRTC_VOICE_ENGINE_ENCRYPTION_API
- public VoEEncryptionImpl,
-#endif
#ifdef WEBRTC_VOICE_ENGINE_EXTERNAL_MEDIA_API
public VoEExternalMediaImpl,
#endif
@@ -112,9 +106,6 @@ public:
#ifdef WEBRTC_VOICE_ENGINE_DTMF_API
VoEDtmfImpl(this),
#endif
-#ifdef WEBRTC_VOICE_ENGINE_ENCRYPTION_API
- VoEEncryptionImpl(this),
-#endif
#ifdef WEBRTC_VOICE_ENGINE_EXTERNAL_MEDIA_API
VoEExternalMediaImpl(this),
#endif