diff --git a/.gitmodules b/.gitmodules index dd5b18727..b8d8bf450 100644 --- a/.gitmodules +++ b/.gitmodules @@ -40,3 +40,6 @@ [submodule "submodules/externals/libvpx"] path = submodules/externals/libvpx url = http://git.chromium.org/webm/libvpx.git +[submodule "submodules/externals/srtp"] + path = submodules/externals/srtp + url = git://git.linphone.org/srtp.git diff --git a/jni/Android.mk b/jni/Android.mk index 26eaa3408..9d1c9a05e 100755 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -10,16 +10,16 @@ LINPHONE_VIDEO=0 BUILD_X264=0 endif - +BUILD_SRTP=1 ##ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) ifeq ($(BUILD_GPLV3_ZRTP), 1) -BUILD_SRTP=1 ZRTP_C_INCLUDE= \ $(linphone-root-dir)/submodules/externals/libzrtpcpp/src endif ifeq ($(BUILD_SRTP), 1) SRTP_C_INCLUDE= \ + $(linphone-root-dir)/submodules/externals/srtp \ $(linphone-root-dir)/submodules/externals/srtp/include \ $(linphone-root-dir)/submodules/externals/srtp/crypto/include endif diff --git a/res/raw/linphonerc b/res/raw/linphonerc index b490f57df..c6d676668 100644 --- a/res/raw/linphonerc +++ b/res/raw/linphonerc @@ -18,6 +18,8 @@ default_proxy=0 auto_net_state_mon=0 keepalive_period=30000 auto_answer_replacing_calls=1 +media_encryption=srtp +media_encryption_mandatory=0 [rtp] audio_rtp_port=7076 diff --git a/src/org/linphone/core/LinphoneCoreImpl.java b/src/org/linphone/core/LinphoneCoreImpl.java index 4b3f9e99c..902ea9f4f 100644 --- a/src/org/linphone/core/LinphoneCoreImpl.java +++ b/src/org/linphone/core/LinphoneCoreImpl.java @@ -515,7 +515,7 @@ class LinphoneCoreImpl implements LinphoneCore { public boolean isInConference() { // TODO Auto-generated method stub return false; - } + } public void leaveConference() { // TODO Auto-generated method stub diff --git a/submodules/externals/build/srtp/Android.mk b/submodules/externals/build/srtp/Android.mk index c047702cd..e9c85e1e0 100644 --- a/submodules/externals/build/srtp/Android.mk +++ b/submodules/externals/build/srtp/Android.mk @@ -26,7 +26,7 @@ LOCAL_SRC_FILES := \ crypto/rng/ctr_prng.c \ crypto/rng/prng.c -LOCAL_CFLAGS := -Wall -O4 -fexpensive-optimizations -funroll-loops -DCPU_CISC +LOCAL_CFLAGS := -Wall -O4 -fexpensive-optimizations -funroll-loops -DCPU_CISC -include config.h ifeq ($(SRTP_USES_LINUX_KERNEL), 1) LOCAL_SRC_FILES += \ diff --git a/submodules/externals/build/srtp/config.h b/submodules/externals/build/srtp/config.h new file mode 100644 index 000000000..52e6cd654 --- /dev/null +++ b/submodules/externals/build/srtp/config.h @@ -0,0 +1,171 @@ +/* crypto/include/config.h. Generated by configure. */ +/* config_in.h. Generated from configure.in by autoheader. */ + +/* Define if building for a CISC machine (e.g. Intel). */ +#define CPU_CISC 1 + +/* Define if building for a RISC machine (assume slow byte access). */ +/* #undef CPU_RISC */ + +/* Path to random device */ +/* #undef DEV_URANDOM */ + +/* Define to compile in dynamic debugging system. */ +#define ENABLE_DEBUGGING 0 + +/* Report errors to this file. */ +/* #undef ERR_REPORTING_FILE */ + +/* Define to use logging to stdout. */ +#define ERR_REPORTING_STDOUT 1 + +/* Define this to use ISMAcryp code. */ +/* #undef GENERIC_AESICM */ + +/* Define to 1 if you have the header file. */ +#define HAVE_ARPA_INET_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_BYTESWAP_H */ + +/* Define to 1 if you have the `inet_aton' function. */ +#define HAVE_INET_ATON 1 + +/* Define to 1 if the system has the type `int16_t'. */ +#define HAVE_INT16_T 1 + +/* Define to 1 if the system has the type `int32_t'. */ +#define HAVE_INT32_T 1 + +/* Define to 1 if the system has the type `int8_t'. */ +#define HAVE_INT8_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `socket' library (-lsocket). */ +/* #undef HAVE_LIBSOCKET */ + +/* Define to 1 if you have the header file. */ +/*#define HAVE_MACHINE_TYPES_H 1*/ + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IN_H 1 + +/* Define to 1 if you have the `socket' function. */ +#define HAVE_SOCKET 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYSLOG_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_INT_TYPES_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_UIO_H 1 + +/* Define to 1 if the system has the type `uint16_t'. */ +#define HAVE_UINT16_T 1 + +/* Define to 1 if the system has the type `uint32_t'. */ +#define HAVE_UINT32_T 1 + +/* Define to 1 if the system has the type `uint64_t'. */ +#define HAVE_UINT64_T 1 + +/* Define to 1 if the system has the type `uint8_t'. */ +#define HAVE_UINT8_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the `usleep' function. */ +#define HAVE_USLEEP 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINDOWS_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_WINSOCK2_H */ + +/* Define to use X86 inlined assembly code */ +/* #undef HAVE_X86 */ + +/* Define to the address where bug reports for this package should be sent. */ +/*#define PACKAGE_BUGREPORT ""*/ + +/* Define to the full name of this package. */ +/*#define PACKAGE_NAME ""*/ + +/* Define to the full name and version of this package. */ +/*#define PACKAGE_STRING ""*/ + +/* Define to the one symbol short name of this package. */ +/*#define PACKAGE_TARNAME ""*/ + +/* Define to the version of this package. */ +/*#define PACKAGE_VERSION ""*/ + +/* The size of a `unsigned long', as computed by sizeof. */ +#define SIZEOF_UNSIGNED_LONG 4 + +/* The size of a `unsigned long long', as computed by sizeof. */ +#define SIZEOF_UNSIGNED_LONG_LONG 8 + +/* Define to use GDOI. */ +/* #undef SRTP_GDOI */ + +/* Define to compile for kernel contexts. */ +/* #undef SRTP_KERNEL */ + +/* Define to compile for Linux kernel context. */ +/* #undef SRTP_KERNEL_LINUX */ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Write errors to this file */ +/* #undef USE_ERR_REPORTING_FILE */ + +/* Define to use syslog logging. */ +/* #undef USE_SYSLOG */ + +/* Define to 1 if your processor stores words with the most significant byte + first (like Motorola and SPARC, unlike Intel and VAX). */ +/* #undef WORDS_BIGENDIAN */ + +/* Define to empty if `const' does not conform to ANSI C. */ +/* #undef const */ + +/* Define to `__inline__' or `__inline' if that's what the C compiler + calls it, or to nothing if 'inline' is not supported under any name. */ +#ifndef __cplusplus +/* #undef inline */ +#endif + +/* Define to `unsigned' if does not define. */ +/* #undef size_t */ diff --git a/submodules/externals/srtp b/submodules/externals/srtp new file mode 160000 index 000000000..de53398a1 --- /dev/null +++ b/submodules/externals/srtp @@ -0,0 +1 @@ +Subproject commit de53398a1aa8f60a37bded8d6019649959e7b132 diff --git a/submodules/linphone b/submodules/linphone index 3cb22b693..e83560115 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 3cb22b69375f1bd759bc0bd365fecad0b553cced +Subproject commit e835601158351ce465d0c401f83c82e595c63c1a