Merge branch 'srtp' of git.linphone.org:linphone-android-private

Conflicts:
	.gitmodules
This commit is contained in:
Guillaume Beraudo 2011-10-13 13:18:58 +02:00
commit 8a52da78a0
9 changed files with 211 additions and 4 deletions

3
.gitmodules vendored
View file

@ -43,3 +43,6 @@
[submodule "submodules/externals/libzrtpcpp"]
path = submodules/externals/libzrtpcpp
url = git://github.com/wernerd/ZRTPCPP.git
[submodule "submodules/externals/srtp"]
path = submodules/externals/srtp
url = git://git.linphone.org/srtp.git

View file

@ -10,6 +10,7 @@ LINPHONE_VIDEO=0
BUILD_X264=0
endif
BUILD_SRTP=0
##ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
ifeq ($(BUILD_GPLV3_ZRTP), 1)
@ -20,6 +21,7 @@ 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

View file

@ -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

View file

@ -28,6 +28,8 @@ public class LinphoneCallParamsImpl implements LinphoneCallParams {
private native void enableVideo(long nativePtr, boolean b);
private native boolean getVideoEnabled(long nativePtr);
private native void audioBandwidth(long nativePtr, int bw);
private native void setMediaEncryption(long nativePtr, String menc);
private native String getMediaEncryption(long nativePtr);
private native void destroy(long nativePtr);
@ -48,4 +50,12 @@ public class LinphoneCallParamsImpl implements LinphoneCallParams {
public void setAudioBandwidth(int value) {
audioBandwidth(nativePtr, value);
}
public String getMediaEncryption() {
return getMediaEncryption(nativePtr);
}
public void setMediaEnctyption(String menc) {
setMediaEncryption(nativePtr, menc);
}
}

View file

@ -104,7 +104,12 @@ class LinphoneCoreImpl implements LinphoneCore {
private native void enableEchoLimiter(long nativePtr2, boolean val);
private native int setVideoDevice(long nativePtr2, int id);
private native int getVideoDevice(long nativePtr2);
private native String getMediaEncryption(long nativePtr);
private native void setMediaEncryption(long nativePtr, String menc);
private native boolean isMediaEncryptionMandatory(long nativePtr);
private native void setMediaEncryptionMandatory(long nativePtr, boolean yesno);
LinphoneCoreImpl(LinphoneCoreListener listener, File userConfig,File factoryConfig,Object userdata) throws IOException {
mListener=listener;
nativePtr = newLinphoneCore(listener,userConfig.getCanonicalPath(),factoryConfig.getCanonicalPath(),userdata);
@ -515,7 +520,7 @@ class LinphoneCoreImpl implements LinphoneCore {
public boolean isInConference() {
// TODO Auto-generated method stub
return false;
}
}
public void leaveConference() {
// TODO Auto-generated method stub
@ -545,4 +550,17 @@ class LinphoneCoreImpl implements LinphoneCore {
// TODO Auto-generated method stub
return null;
}
public String getMediaEncryption() {
return getMediaEncryption(nativePtr);
}
public boolean isMediaEncryptionMandatory() {
return isMediaEncryptionMandatory(nativePtr);
}
public void setMediaEncryption(String menc) {
setMediaEncryption(nativePtr, menc);
}
public void setMediaEncryptionMandatory(boolean yesno) {
setMediaEncryptionMandatory(nativePtr, yesno);
}
}

View file

@ -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 += \

171
submodules/externals/build/srtp/config.h vendored Normal file
View file

@ -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 <arpa/inet.h> header file. */
#define HAVE_ARPA_INET_H 1
/* Define to 1 if you have the <byteswap.h> 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 <inttypes.h> 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 <machine/types.h> header file. */
/*#define HAVE_MACHINE_TYPES_H 1*/
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the <netinet/in.h> 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 <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the <syslog.h> header file. */
#define HAVE_SYSLOG_H 1
/* Define to 1 if you have the <sys/int_types.h> header file. */
/* #undef HAVE_SYS_INT_TYPES_H */
/* Define to 1 if you have the <sys/socket.h> header file. */
#define HAVE_SYS_SOCKET_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <sys/uio.h> 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 <unistd.h> 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 <windows.h> header file. */
/* #undef HAVE_WINDOWS_H */
/* Define to 1 if you have the <winsock2.h> 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 <sys/types.h> does not define. */
/* #undef size_t */

1
submodules/externals/srtp vendored Submodule

@ -0,0 +1 @@
Subproject commit de53398a1aa8f60a37bded8d6019649959e7b132

@ -1 +1 @@
Subproject commit 9ea9dcadbd06bdc90cffc1e0e95d4e5d1c48fd8e
Subproject commit 514f67a88ad48a4a5a5eef9cfe77fd92b4a11081