forked from Mirrors/freeswitch
[core][mod_sofia] remove ZRTP (deemed obsolete).
[unit-tests][build-system][docs] remove references to ZRTP.
This commit is contained in:
parent
2ab600c71a
commit
8e59603d98
|
@ -417,8 +417,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gsmlib", "src\mod\endpoints
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_gsmopen", "src\mod\endpoints\mod_gsmopen\mod_gsmopen.2017.vcxproj", "{74B120FF-6935-4DFE-A142-CDB6BEA99C90}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libzrtp", "libs\libzrtp\projects\win\libzrtp.2017.vcxproj", "{C13CC324-0032-4492-9A30-310A6BD64FF5}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_redis", "src\mod\applications\mod_redis\mod_redis.2017.vcxproj", "{886B5E9D-F2C2-4AF2-98C8-EF98C4C770E6}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "libs\win32\libjpeg\libjpeg.2017.vcxproj", "{019DBD2A-273D-4BA4-BF86-B5EFE2ED76B1}"
|
||||
|
@ -1865,17 +1863,6 @@ Global
|
|||
{74B120FF-6935-4DFE-A142-CDB6BEA99C90}.Release|Win32.Build.0 = Release|Win32
|
||||
{74B120FF-6935-4DFE-A142-CDB6BEA99C90}.Release|x64.ActiveCfg = Release|x64
|
||||
{74B120FF-6935-4DFE-A142-CDB6BEA99C90}.Release|x64.Build.0 = Release|x64
|
||||
{C13CC324-0032-4492-9A30-310A6BD64FF5}.All|Win32.ActiveCfg = Release|Win32
|
||||
{C13CC324-0032-4492-9A30-310A6BD64FF5}.All|Win32.Build.0 = Release|Win32
|
||||
{C13CC324-0032-4492-9A30-310A6BD64FF5}.All|x64.ActiveCfg = Release|Win32
|
||||
{C13CC324-0032-4492-9A30-310A6BD64FF5}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{C13CC324-0032-4492-9A30-310A6BD64FF5}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{C13CC324-0032-4492-9A30-310A6BD64FF5}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{C13CC324-0032-4492-9A30-310A6BD64FF5}.Debug|x64.Build.0 = Debug|x64
|
||||
{C13CC324-0032-4492-9A30-310A6BD64FF5}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{C13CC324-0032-4492-9A30-310A6BD64FF5}.Release|Win32.Build.0 = Release|Win32
|
||||
{C13CC324-0032-4492-9A30-310A6BD64FF5}.Release|x64.ActiveCfg = Release|x64
|
||||
{C13CC324-0032-4492-9A30-310A6BD64FF5}.Release|x64.Build.0 = Release|x64
|
||||
{886B5E9D-F2C2-4AF2-98C8-EF98C4C770E6}.All|Win32.ActiveCfg = Release|x64
|
||||
{886B5E9D-F2C2-4AF2-98C8-EF98C4C770E6}.All|x64.ActiveCfg = Release|x64
|
||||
{886B5E9D-F2C2-4AF2-98C8-EF98C4C770E6}.All|x64.Build.0 = Release|x64
|
||||
|
@ -2670,7 +2657,6 @@ Global
|
|||
{9DE35039-A8F6-4FBF-B1B6-EB527F802411} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
|
||||
{26C82FCE-E0CF-4D10-A00C-D8E582FFEB53} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
|
||||
{74B120FF-6935-4DFE-A142-CDB6BEA99C90} = {9460B5F1-0A95-41C4-BEB7-9C2C96459A7C}
|
||||
{C13CC324-0032-4492-9A30-310A6BD64FF5} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
|
||||
{886B5E9D-F2C2-4AF2-98C8-EF98C4C770E6} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
|
||||
{019DBD2A-273D-4BA4-BF86-B5EFE2ED76B1} = {EB910B0D-F27D-4B62-B67B-DE834C99AC5B}
|
||||
{D2396DD7-7D38-473A-ABB7-6F96D65AE1B9} = {9DE35039-A8F6-4FBF-B1B6-EB527F802411}
|
||||
|
|
21
LICENSE
21
LICENSE
|
@ -1709,27 +1709,6 @@ License: LGPL-2.1
|
|||
Files: libs/broadvoice/autogen.sh
|
||||
License: GPL-2
|
||||
|
||||
Files: libs/libzrtp/*
|
||||
Copyright: 2006-2012 Philip R. Zimmermann.
|
||||
1993-2005 Colin Plumb
|
||||
1998-2006, Dr Brian Gladman, Worcester, UK.
|
||||
2002, Bryce "Zooko" Wilcox-O'Hearn
|
||||
2010 Soft Industry
|
||||
License: AGPL-3 or MPL-1.1
|
||||
|
||||
Files: libs/libzrtp/test/cmockery/cmockery.c
|
||||
Copyright: 2008 Google Inc
|
||||
License: Apache-2.0
|
||||
|
||||
Files: libs/libzrtp/third_party/bnlib/legal.c
|
||||
libs/libzrtp/third_party/bnlib/*
|
||||
Copyright: 1993-2005 Colin Plumb
|
||||
License: GPL-2 or GPL-3 or MPL-1.1
|
||||
|
||||
Files: libs/libzrtp/third_party/bnlib/test/md5.c
|
||||
Copyright: 1995 Abandoned Colin Plumb
|
||||
License: public-domain
|
||||
|
||||
Files: libs/win32/sqlite/sqlite3.[ch]
|
||||
libs/win32/sqlite/parse.c
|
||||
Copyright: 2006 Abandoned D. Richard Hipp <drh@hwaci.com>
|
||||
|
|
16
Makefile.am
16
Makefile.am
|
@ -244,19 +244,6 @@ if HAVE_ODBC
|
|||
libfreeswitch_la_LDFLAGS += $(ODBC_LIB_FLAGS)
|
||||
endif
|
||||
|
||||
if ENABLE_ZRTP
|
||||
CORE_CFLAGS += -I$(switch_srcdir)/libs/libzrtp/third_party/bgaes
|
||||
CORE_CFLAGS += -I$(switch_srcdir)/libs/libzrtp/third_party/bnlib
|
||||
CORE_CFLAGS += -isystem $(switch_srcdir)/libs/libzrtp/include
|
||||
ZRTP_LDFLAGS = -L$(switch_srcdir)/libs/libzrtp/third_party/bnlib
|
||||
ZRTP_LDFLAGS += -L$(switch_srcdir)/libs/libzrtp
|
||||
ZRTP_LIBS = -lbn -lzrtp
|
||||
libfreeswitch_la_LDFLAGS += $(ZRTP_LDFLAGS)
|
||||
libfreeswitch_la_LIBADD += $(ZRTP_LIBS)
|
||||
CORE_LIBS += libs/libzrtp/libzrtp.a
|
||||
LIBS += libs/libzrtp/third_party/bnlib/libbn.a
|
||||
endif
|
||||
|
||||
library_includetestdir = $(includedir)/test
|
||||
library_includetest_HEADERS = \
|
||||
src/include/test/switch_fct.h \
|
||||
|
@ -570,9 +557,6 @@ src/include/switch_version.h: src/include/switch_version.h.in Makefile $(switch_
|
|||
libs/libedit/src/.libs/libedit.a:
|
||||
cd libs/libedit && $(MAKE)
|
||||
|
||||
libs/libzrtp/libzrtp.a:
|
||||
cd libs/libzrtp && $(MAKE)
|
||||
|
||||
libs/libvpx/Makefile: libs/libvpx/.update
|
||||
cd libs/libvpx && CC="$(CC)" CXX="$(CXX)" CFLAGS="$(CFLAGS) $(VISIBILITY_FLAG)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure --enable-pic --disable-docs --disable-examples --disable-install-bins --disable-install-srcs --disable-unit-tests --size-limit=16384x16384
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ BGJOB=false
|
|||
VERBOSE=false
|
||||
BASEDIR=`pwd`;
|
||||
LIBDIR=${BASEDIR}/libs;
|
||||
SUBDIRS="apr libzrtp iksemel srtp fs";
|
||||
SUBDIRS="apr iksemel srtp fs";
|
||||
|
||||
while getopts 'jhd:v' o; do
|
||||
case "$o" in
|
||||
|
@ -172,10 +172,6 @@ bootstrap_apr() {
|
|||
|
||||
}
|
||||
|
||||
bootstrap_libzrtp() {
|
||||
(cd ${LIBDIR}/libzrtp && ./bootstrap.sh)
|
||||
}
|
||||
|
||||
# Libs automake automation function
|
||||
libbootstrap() {
|
||||
i=$1
|
||||
|
@ -260,7 +256,7 @@ bootstrap_libs_post() {
|
|||
bootstrap_libs() {
|
||||
for i in ${SUBDIRS}; do
|
||||
case "$i" in
|
||||
apr|fs|libzrtp)
|
||||
apr|fs)
|
||||
${BGJOB} && wait
|
||||
bootstrap_$i
|
||||
continue
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
#!/bin/sh
|
||||
tar zxf libzrtp-0.81.514.tar.gz
|
||||
cd libzrtp-0.81.514
|
||||
patch -p1 < ../patches/zrtp_bnlib_pic.diff
|
||||
cd projects/gnu/
|
||||
./configure CFLAGS="-fPIC"
|
||||
make
|
||||
make install
|
|
@ -48,7 +48,6 @@
|
|||
<param name="auth-calls" value="false"/>
|
||||
<param name="rtp-timeout-sec" value="1800"/>
|
||||
<param name="inbound-late-negotiation" value="true"/>
|
||||
<param name="inbound-zrtp-passthru" value="true"/> <!-- (also enables late negotiation) -->
|
||||
<!--
|
||||
DO NOT USE HOSTNAMES, ONLY IP ADDRESSES IN THESE SETTINGS!
|
||||
-->
|
||||
|
|
|
@ -70,9 +70,6 @@
|
|||
<!-- Let calls hit the dialplan before selecting codec for the a-leg -->
|
||||
<param name="inbound-late-negotiation" value="true"/>
|
||||
|
||||
<!-- Allow ZRTP clients to negotiate end-to-end security associations (also enables late negotiation) -->
|
||||
<param name="inbound-zrtp-passthru" value="true"/>
|
||||
|
||||
<!-- this lets anything register -->
|
||||
<!-- comment the next line and uncomment one or both of the other 2 lines for call authentication -->
|
||||
<!-- <param name="accept-blind-reg" value="true"/> -->
|
||||
|
|
|
@ -106,9 +106,6 @@
|
|||
<!-- Let calls hit the dialplan before selecting codec for the a-leg -->
|
||||
<param name="inbound-late-negotiation" value="true"/>
|
||||
|
||||
<!-- Allow ZRTP clients to negotiate end-to-end security associations (also enables late negotiation) -->
|
||||
<param name="inbound-zrtp-passthru" value="true"/>
|
||||
|
||||
<!-- this lets anything register -->
|
||||
<!-- comment the next line and uncomment one or both of the other 2 lines for call authentication -->
|
||||
<!-- <param name="accept-blind-reg" value="true"/> -->
|
||||
|
|
|
@ -145,8 +145,6 @@
|
|||
<!-- <param name="rtp-start-port" value="16384"/> -->
|
||||
<!-- <param name="rtp-end-port" value="32768"/> -->
|
||||
|
||||
<param name="rtp-enable-zrtp" value="true"/>
|
||||
|
||||
<!--
|
||||
Native PostgreSQL support was removed from the FreeSWITCH Core!
|
||||
=================================
|
||||
|
|
|
@ -57,7 +57,6 @@
|
|||
<param name="nonce-ttl" value="60"/>
|
||||
<param name="auth-calls" value="$${external_auth_calls}"/>
|
||||
<param name="inbound-late-negotiation" value="true"/>
|
||||
<param name="inbound-zrtp-passthru" value="true"/> <!-- (also enables late negotiation) -->
|
||||
<!--
|
||||
DO NOT USE HOSTNAMES, ONLY IP ADDRESSES IN THESE SETTINGS!
|
||||
-->
|
||||
|
|
|
@ -14,13 +14,6 @@
|
|||
<X-PRE-PROCESS cmd="set" data="hold_music=local_stream://moh"/>
|
||||
<X-PRE-PROCESS cmd="set" data="use_profile=external"/>
|
||||
|
||||
<!--
|
||||
Enable ZRTP globally you can override this on a per channel basis
|
||||
|
||||
http://wiki.freeswitch.org/wiki/ZRTP (on how to enable zrtp)
|
||||
-->
|
||||
<X-PRE-PROCESS cmd="set" data="zrtp_secure_media=true"/>
|
||||
|
||||
<X-PRE-PROCESS cmd="set" data="global_codec_prefs=PCMU,PCMA"/>
|
||||
<X-PRE-PROCESS cmd="set" data="outbound_codec_prefs=PCMU,PCMA"/>
|
||||
|
||||
|
|
|
@ -49,7 +49,6 @@
|
|||
<param name="auth-calls" value="false"/>
|
||||
<param name="rtp-timeout-sec" value="1800"/>
|
||||
<param name="inbound-late-negotiation" value="true"/>
|
||||
<param name="inbound-zrtp-passthru" value="true"/> <!-- (also enables late negotiation) -->
|
||||
<!--
|
||||
DO NOT USE HOSTNAMES, ONLY IP ADDRESSES IN THESE SETTINGS!
|
||||
-->
|
||||
|
|
|
@ -69,9 +69,6 @@
|
|||
<!-- Let calls hit the dialplan before selecting codec for the a-leg -->
|
||||
<param name="inbound-late-negotiation" value="true"/>
|
||||
|
||||
<!-- Allow ZRTP clients to negotiate end-to-end security associations (also enables late negotiation) -->
|
||||
<param name="inbound-zrtp-passthru" value="true"/>
|
||||
|
||||
<!-- this lets anything register -->
|
||||
<!-- comment the next line and uncomment one or both of the other 2 lines for call authentication -->
|
||||
<!-- <param name="accept-blind-reg" value="true"/> -->
|
||||
|
|
|
@ -110,9 +110,6 @@
|
|||
<!-- Let calls hit the dialplan before selecting codec for the a-leg -->
|
||||
<param name="inbound-late-negotiation" value="true"/>
|
||||
|
||||
<!-- Allow ZRTP clients to negotiate end-to-end security associations (also enables late negotiation) -->
|
||||
<param name="inbound-zrtp-passthru" value="true"/>
|
||||
|
||||
<!-- this lets anything register -->
|
||||
<!-- comment the next line and uncomment one or both of the other 2 lines for call authentication -->
|
||||
<!-- <param name="accept-blind-reg" value="true"/> -->
|
||||
|
|
|
@ -150,8 +150,6 @@
|
|||
<!-- Test each port to make sure it is not in use by some other process before allocating it to RTP -->
|
||||
<!-- <param name="rtp-port-usage-robustness" value="true"/> -->
|
||||
|
||||
<param name="rtp-enable-zrtp" value="true"/>
|
||||
|
||||
<!--
|
||||
Native PostgreSQL support was removed from the FreeSWITCH Core!
|
||||
=================================
|
||||
|
|
|
@ -51,7 +51,6 @@
|
|||
<param name="nonce-ttl" value="60"/>
|
||||
<param name="auth-calls" value="false"/>
|
||||
<param name="inbound-late-negotiation" value="true"/>
|
||||
<param name="inbound-zrtp-passthru" value="true"/> <!-- (also enables late negotiation) -->
|
||||
<!--
|
||||
DO NOT USE HOSTNAMES, ONLY IP ADDRESSES IN THESE SETTINGS!
|
||||
-->
|
||||
|
|
|
@ -57,7 +57,6 @@
|
|||
<param name="nonce-ttl" value="60"/>
|
||||
<param name="auth-calls" value="false"/>
|
||||
<param name="inbound-late-negotiation" value="true"/>
|
||||
<param name="inbound-zrtp-passthru" value="true"/> <!-- (also enables late negotiation) -->
|
||||
<!--
|
||||
DO NOT USE HOSTNAMES, ONLY IP ADDRESSES IN THESE SETTINGS!
|
||||
-->
|
||||
|
|
|
@ -71,9 +71,6 @@
|
|||
<!-- Let calls hit the dialplan before selecting codec for the a-leg -->
|
||||
<param name="inbound-late-negotiation" value="true"/>
|
||||
|
||||
<!-- Allow ZRTP clients to negotiate end-to-end security associations (also enables late negotiation) -->
|
||||
<param name="inbound-zrtp-passthru" value="true"/>
|
||||
|
||||
<!-- this lets anything register -->
|
||||
<!-- comment the next line and uncomment one or both of the other 2 lines for call authentication -->
|
||||
<!-- <param name="accept-blind-reg" value="true"/> -->
|
||||
|
|
|
@ -246,9 +246,6 @@
|
|||
<!-- Let calls hit the dialplan before selecting codec for the a-leg -->
|
||||
<param name="inbound-late-negotiation" value="true"/>
|
||||
|
||||
<!-- Allow ZRTP clients to negotiate end-to-end security associations (also enables late negotiation) -->
|
||||
<param name="inbound-zrtp-passthru" value="true"/>
|
||||
|
||||
<!-- this lets anything register -->
|
||||
<!-- comment the next line and uncomment one or both of the other 2 lines for call authentication -->
|
||||
<!-- <param name="accept-blind-reg" value="true"/> -->
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
<X-PRE-PROCESS cmd="set" data="hold_music=local_stream://moh"/>
|
||||
<X-PRE-PROCESS cmd="set" data="use_profile=external"/>
|
||||
<X-PRE-PROCESS cmd="set" data="rtp_sdes_suites=AEAD_AES_256_GCM_8|AEAD_AES_128_GCM_8|AES_CM_256_HMAC_SHA1_80|AES_CM_192_HMAC_SHA1_80|AES_CM_128_HMAC_SHA1_80|AES_CM_256_HMAC_SHA1_32|AES_CM_192_HMAC_SHA1_32|AES_CM_128_HMAC_SHA1_32|AES_CM_128_NULL_AUTH"/>
|
||||
<X-PRE-PROCESS cmd="set" data="zrtp_secure_media=true"/>
|
||||
<X-PRE-PROCESS cmd="set" data="global_codec_prefs=OPUS,G722,PCMU,PCMA,VP8,H264,H263,H263-1998,G7221@32000h"/>
|
||||
<X-PRE-PROCESS cmd="set" data="outbound_codec_prefs=OPUS,G722,PCMU,PCMA,VP8,H264,H263,H263-1998,G7221@32000h"/>
|
||||
<X-PRE-PROCESS cmd="set" data="outbound_caller_name=FreeSWITCH"/>
|
||||
|
|
|
@ -153,8 +153,6 @@
|
|||
<!-- Test each port to make sure it is not in use by some other process before allocating it to RTP -->
|
||||
<!-- <param name="rtp-port-usage-robustness" value="true"/> -->
|
||||
|
||||
<param name="rtp-enable-zrtp" value="false"/>
|
||||
|
||||
<!--
|
||||
Store encryption keys for secure media in channel variables and call CDRs. Default: false.
|
||||
WARNING: If true, anyone with CDR access can decrypt secure media!
|
||||
|
|
|
@ -443,10 +443,6 @@
|
|||
This will take the SAS from the b-leg and send it to the display on the a-leg phone.
|
||||
Known working with Polycom and Snom maybe others.
|
||||
-->
|
||||
<!--
|
||||
<action application="set" data="exec_after_bridge_app=${sched_api(+4 zrtp expand uuid_display ${uuid} \${uuid_getvar(\${uuid_getvar(${uuid} signal_bond)} zrtp_sas1_string )} \${uuid_getvar(\${uuid_getvar(${uuid} signal_bond)} zrtp_sas2_string )} )}"/>
|
||||
<action application="export" data="nolocal:zrtp_secure_media=true"/>
|
||||
-->
|
||||
<action application="bridge" data="sofia/${use_profile}/$1@conference.freeswitch.org"/>
|
||||
</condition>
|
||||
</extension>
|
||||
|
@ -768,13 +764,6 @@
|
|||
</condition>
|
||||
</extension>
|
||||
|
||||
<!-- install zrtp_agent.lua into scripts (ZRTP == 9787) -->
|
||||
<extension name="zrtp_enrollement">
|
||||
<condition field="destination_number" expression="^9787$">
|
||||
<action application="lua" data="zrtp_agent.lua"/>
|
||||
</condition>
|
||||
</extension>
|
||||
|
||||
<!--
|
||||
You will no longer hear the bong tone. The wav file is playing stating the call is secure.
|
||||
The file will not play unless you have both TLS and SRTP active.
|
||||
|
@ -786,10 +775,8 @@
|
|||
<action application="answer"/>
|
||||
<action application="execute_extension" data="is_secure XML features"/>
|
||||
<action application="playback" data="$${hold_music}"/>
|
||||
<anti-action application="set" data="zrtp_secure_media=true"/>
|
||||
<anti-action application="answer"/>
|
||||
<anti-action application="playback" data="silence_stream://2000"/>
|
||||
<anti-action application="execute_extension" data="is_zrtp_secure XML features"/>
|
||||
<anti-action application="playback" data="$${hold_music}"/>
|
||||
</condition>
|
||||
</extension>
|
||||
|
|
|
@ -44,15 +44,7 @@
|
|||
<action application="transfer" data="$1 XML default"/>
|
||||
</condition>
|
||||
</extension>
|
||||
|
||||
<extension name="is_zrtp_secure" continue="true">
|
||||
<condition field="${zrtp_secure_media_confirmed}" expression="^true$">
|
||||
<action application="sleep" data="1000"/>
|
||||
<action application="playback" data="misc/call_secured.wav"/>
|
||||
<anti-action application="eval" data="not_secure"/>
|
||||
</condition>
|
||||
</extension>
|
||||
|
||||
|
||||
<extension name="is_secure" continue="true">
|
||||
<!-- Only Truly consider it secure if its TLS and SRTP -->
|
||||
<condition field="${sip_via_protocol}" expression="tls"/>
|
||||
|
|
|
@ -57,7 +57,6 @@
|
|||
<param name="nonce-ttl" value="60"/>
|
||||
<param name="auth-calls" value="false"/>
|
||||
<param name="inbound-late-negotiation" value="true"/>
|
||||
<param name="inbound-zrtp-passthru" value="true"/> <!-- (also enables late negotiation) -->
|
||||
<!--
|
||||
DO NOT USE HOSTNAMES, ONLY IP ADDRESSES IN THESE SETTINGS!
|
||||
-->
|
||||
|
|
|
@ -57,7 +57,6 @@
|
|||
<param name="nonce-ttl" value="60"/>
|
||||
<param name="auth-calls" value="false"/>
|
||||
<param name="inbound-late-negotiation" value="true"/>
|
||||
<param name="inbound-zrtp-passthru" value="true"/> <!-- (also enables late negotiation) -->
|
||||
<!--
|
||||
DO NOT USE HOSTNAMES, ONLY IP ADDRESSES IN THESE SETTINGS!
|
||||
-->
|
||||
|
|
|
@ -73,9 +73,6 @@
|
|||
<!-- Let calls hit the dialplan before selecting codec for the a-leg -->
|
||||
<param name="inbound-late-negotiation" value="true"/>
|
||||
|
||||
<!-- Allow ZRTP clients to negotiate end-to-end security associations (also enables late negotiation) -->
|
||||
<param name="inbound-zrtp-passthru" value="true"/>
|
||||
|
||||
<!-- this lets anything register -->
|
||||
<!-- comment the next line and uncomment one or both of the other 2 lines for call authentication -->
|
||||
<!-- <param name="accept-blind-reg" value="true"/> -->
|
||||
|
|
|
@ -251,9 +251,6 @@
|
|||
<!-- Let calls hit the dialplan before selecting codec for the a-leg -->
|
||||
<param name="inbound-late-negotiation" value="true"/>
|
||||
|
||||
<!-- Allow ZRTP clients to negotiate end-to-end security associations (also enables late negotiation) -->
|
||||
<param name="inbound-zrtp-passthru" value="true"/>
|
||||
|
||||
<!-- this lets anything register -->
|
||||
<!-- comment the next line and uncomment one or both of the other 2 lines for call authentication -->
|
||||
<!-- <param name="accept-blind-reg" value="true"/> -->
|
||||
|
|
|
@ -41,7 +41,6 @@
|
|||
storage_dir
|
||||
cache_dir
|
||||
core_uuid
|
||||
zrtp_enabled
|
||||
nat_public_addr
|
||||
nat_private_addr
|
||||
nat_type
|
||||
|
@ -64,12 +63,6 @@
|
|||
<X-PRE-PROCESS cmd="set" data="hold_music=local_stream://moh"/>
|
||||
<X-PRE-PROCESS cmd="set" data="use_profile=external"/>
|
||||
<X-PRE-PROCESS cmd="set" data="rtp_sdes_suites=AEAD_AES_256_GCM_8|AEAD_AES_128_GCM_8|AES_CM_256_HMAC_SHA1_80|AES_CM_192_HMAC_SHA1_80|AES_CM_128_HMAC_SHA1_80|AES_CM_256_HMAC_SHA1_32|AES_CM_192_HMAC_SHA1_32|AES_CM_128_HMAC_SHA1_32|AES_CM_128_NULL_AUTH"/>
|
||||
<!--
|
||||
Enable ZRTP globally you can override this on a per channel basis
|
||||
|
||||
http://wiki.freeswitch.org/wiki/ZRTP (on how to enable zrtp)
|
||||
-->
|
||||
<X-PRE-PROCESS cmd="set" data="zrtp_secure_media=true"/>
|
||||
<!--
|
||||
NOTICE: When using SRTP it's critical that you do not offer or accept
|
||||
variable bit rate codecs, doing so would leak information and possibly
|
||||
|
|
12
configure.ac
12
configure.ac
|
@ -601,13 +601,6 @@ have_openal=no
|
|||
AC_CHECK_LIB(openal, alcLoopbackOpenDeviceSOFT, [have_openal="yes"])
|
||||
AM_CONDITIONAL([HAVE_OPENAL],[test "${have_openal}" = "yes"])
|
||||
|
||||
AC_ARG_ENABLE(zrtp,
|
||||
[AS_HELP_STRING([--enable-zrtp], [Compile with zrtp Support])],,[enable_zrtp="no"])
|
||||
if test "x$enable_zrtp" = "xyes" ; then
|
||||
LIBS="-lpthread $LIBS"
|
||||
APR_ADDTO(SWITCH_AM_CFLAGS, -DENABLE_ZRTP)
|
||||
fi
|
||||
|
||||
PA_LIBS=
|
||||
|
||||
PKG_CHECK_MODULES(JACK, jack, have_jack=yes, have_jack=no)
|
||||
|
@ -622,8 +615,6 @@ fi
|
|||
|
||||
AC_SUBST(PA_LIBS)
|
||||
|
||||
AM_CONDITIONAL([ENABLE_ZRTP],[test "x$enable_zrtp" != "xno"])
|
||||
|
||||
AM_CONDITIONAL([WANT_DEBUG],[test "${enable_debug}" = "yes"])
|
||||
|
||||
AC_ARG_ENABLE(core-odbc-support,
|
||||
|
@ -2330,9 +2321,6 @@ if test "$use_system_apr" != "yes"; then
|
|||
AC_CONFIG_SUBDIRS([libs/apr])
|
||||
fi
|
||||
AC_CONFIG_SUBDIRS([libs/iksemel])
|
||||
if test "x${enable_zrtp}" = "xyes"; then
|
||||
AC_CONFIG_SUBDIRS([libs/libzrtp])
|
||||
fi
|
||||
|
||||
case $host in
|
||||
*-openbsd*|*-netbsd*)
|
||||
|
|
|
@ -1709,27 +1709,6 @@ License: LGPL-2.1
|
|||
Files: libs/broadvoice/autogen.sh
|
||||
License: GPL-2
|
||||
|
||||
Files: libs/libzrtp/*
|
||||
Copyright: 2006-2012 Philip R. Zimmermann.
|
||||
1993-2005 Colin Plumb
|
||||
1998-2006, Dr Brian Gladman, Worcester, UK.
|
||||
2002, Bryce "Zooko" Wilcox-O'Hearn
|
||||
2010 Soft Industry
|
||||
License: AGPL-3 or MPL-1.1
|
||||
|
||||
Files: libs/libzrtp/test/cmockery/cmockery.c
|
||||
Copyright: 2008 Google Inc
|
||||
License: Apache-2.0
|
||||
|
||||
Files: libs/libzrtp/third_party/bnlib/legal.c
|
||||
libs/libzrtp/third_party/bnlib/*
|
||||
Copyright: 1993-2005 Colin Plumb
|
||||
License: GPL-2 or GPL-3 or MPL-1.1
|
||||
|
||||
Files: libs/libzrtp/third_party/bnlib/test/md5.c
|
||||
Copyright: 1995 Abandoned Colin Plumb
|
||||
License: public-domain
|
||||
|
||||
Files: libs/win32/sqlite/sqlite3.[ch]
|
||||
libs/win32/sqlite/parse.c
|
||||
Copyright: 2006 Abandoned D. Richard Hipp <drh@hwaci.com>
|
||||
|
|
|
@ -23,11 +23,6 @@ Rules:
|
|||
-
|
||||
Glob: libs/srtp/update.sh
|
||||
Copyright: Ingate Systems AB
|
||||
-
|
||||
Glob: libs/libzrtp/third_party/bnlib/test/md5.c
|
||||
Matches: This\scode\sis\sin\sthe\spublic\sdomain;\sdo\swith\sit\swhat\syou\swish.
|
||||
Copyright: 1995 Abandoned Colin Plumb
|
||||
License: public-domain
|
||||
-
|
||||
Glob: src/g711.c
|
||||
Matches: Copyright\s\(C\)\s2006\sSteve\sUnderwood
|
||||
|
@ -56,28 +51,6 @@ Rules:
|
|||
Glob: src/include/switch_cpp.h
|
||||
Matches: Author[:]\sYossi\sNeiman\s<freeswitch@cartissolutions.com>,\s\(C\)\s2007////\sCopyright[:]
|
||||
Copyright: 2007 Yossi Neiman <freeswitch@cartissolutions.com>
|
||||
-
|
||||
Glob: libs/libzrtp/*
|
||||
Matches: For\slicensing\sand\sother\slegal\sdetails,\ssee\sthe\sfile\szrtp_legal.c.
|
||||
License: AGPL-3 or MPL-1.1
|
||||
-
|
||||
Glob: libs/libzrtp/third_party/bnlib/*
|
||||
Matches: For\slicensing\sand\sother\slegal\sdetails,\ssee\sthe\sfile\slegal.c.
|
||||
License: GPL-2 or GPL-3 or MPL-1.1
|
||||
-
|
||||
Glob: libs/libzrtp/src/zrtp_legal.c
|
||||
Matches: As\sa\sspecial\sexception,\syou\smay\scombine\sthis\slibrary\swith\sthe\scode
|
||||
Matches: License\sVersion\s1.1\s\(MPLv1.1\).
|
||||
License: AGPL-3 or MPL-1.1
|
||||
-
|
||||
Glob: libs/libzrtp/third_party/bnlib/legal.c
|
||||
Matches: As\sa\sspecial\sexception,\syou\smay\scombine\sthis\slibrary\swith\sthe\scode
|
||||
Matches: License\sVersion\s1.1\s\(MPLv1.1\).
|
||||
License: GPL-2 or GPL-3 or MPL-1.1
|
||||
-
|
||||
Glob: libs/libzrtp/projects/symbian/DelayRuner.h
|
||||
Matches: Copyright\s+:\sCopyright\s\(c\)\s2010\sSoft\sIndustry
|
||||
Copyright: 2010 Soft Industry
|
||||
-
|
||||
Glob: libs/win32/sqlite/*.[ch]
|
||||
Matches: The\sauthor\sdisclaims\scopyright\sto\sthis\ssource\scode.
|
||||
|
|
|
@ -74,7 +74,7 @@ override_dh_auto_clean:
|
|||
--host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
|
||||
--prefix=/usr --localstatedir=/var --sysconfdir=/etc \
|
||||
--with-gnu-ld --with-python --with-python3 --with-erlang --with-openssl \
|
||||
--enable-core-odbc-support --enable-zrtp
|
||||
--enable-core-odbc-support
|
||||
touch $@
|
||||
|
||||
override_dh_auto_configure: .stamp-configure
|
||||
|
|
|
@ -814,24 +814,6 @@
|
|||
<prompt phrase="Das ist eine ungültige Durchwahl." filename="invalid_extension.wav"/>
|
||||
<prompt phrase="Englisch." filename="en.wav"/>
|
||||
</misc>
|
||||
<zrtp>
|
||||
<!-- Event prompts -->
|
||||
<prompt phrase="Willkommen bei der Anmeldung zum Z R T P Sicherheits-System." filename="zrtp-enroll_welcome.wav"/>
|
||||
<prompt phrase="Sie müssen den Authentisierungs-String mit Ihrem Gesprächspartner vergleichen. Wenn er nicht übereinstimmt, ist dies ein Hinweis darauf, dass das Gespräch abgehört wird." filename="zrtp-check_sas.wav"/>
|
||||
<prompt phrase="Nur authentisierte Telefone können so konfiguriert werden, dass sie diesem System vertrauen bezüglich der Vermittlung von Verbindungen die mit Z R T P gesichert sind. Ihr Telefon ist nicht authentisiert, daher wird dieser Anruf nicht vermittelt." filename="zrtp-enroll_not_sip_registered.wav"/>
|
||||
<prompt phrase="Ihr Telefon signalisiert, dass es diesem System bereits vertraut bezüglich der Vermittlung von Verbindungen die mit Z R T P gesichert sind. Sie müssen deshalb nichts weiter tun." filename="zrtp-enroll_already_enrolled.wav"/>
|
||||
<prompt phrase="Nur Telefone, die das Z R T P Protokoll unterstützen, können diese Nebenstelle Nutzen. Ihr Telefon unterstützt Z R T P nicht, daher wird dieser Anruf nicht vermittelt." filename="zrtp-enroll_notzrtp.wav"/>
|
||||
<prompt phrase="Dieses System ist für die Verarbeitung von mit Z R T P verschlüsselten Telefonanrufen ausgestattet. Sie müssen entscheiden, ob Sie zulassen möchten, dass dieses System Ihre sicheren Telefonanrufe abfangen und möglicherweise überwachen kann. Sie können auflegen, nachdem Sie dies getan haben." filename="zrtp-enroll_confirmed.wav"/>
|
||||
<prompt phrase="Vergleichen Sie diesen Authentifizierungscode mit Ihrem Gesprächspartner, indem Sie sich diesen Code vorlesen." filename="zrtp-is_secure.wav"/>
|
||||
<prompt phrase="Der Authentifizierungscode ist derzeit nicht überprüft." filename="zrtp-is_unverified.wav"/>
|
||||
<prompt phrase="Der Authentifizierungscode ist jetzt überprüft." filename="zrtp-is_verified.wav"/>
|
||||
<prompt phrase="Vielen Dank für Ihren Anruf. Auf Wiedersehen." filename="zrtp-thankyou_goodbye.wav"/>
|
||||
<prompt phrase="Etwas stimmt nicht." filename="zrtp-somethings_wrong.wav"/>
|
||||
<prompt phrase="Fehler." filename="zrtp-status_error.wav"/>
|
||||
<prompt phrase="Verbindung ist nicht sicher." filename="zrtp-status_notsecure.wav"/>
|
||||
<prompt phrase="Verbindung ist sicher." filename="zrtp-status_secure.wav"/>
|
||||
<prompt phrase="Sichere die Verbindung." filename="zrtp-status_securing.wav"/>
|
||||
</zrtp>
|
||||
</de>
|
||||
</language>
|
||||
<!--
|
||||
|
|
|
@ -1253,24 +1253,6 @@
|
|||
<prompt phrase="woodlark" filename="woodlark.wav"/>
|
||||
<prompt phrase="yesteryear" filename="yesteryear.wav"/>
|
||||
</base256>
|
||||
<zrtp>
|
||||
<!-- Event prompts -->
|
||||
<prompt phrase="Welcome to the ZRTP security enrollment agent." filename="zrtp-enroll_welcome.wav"/>
|
||||
<prompt phrase="You must check the authentication string with your partner. If it doesn't match, it indicates the presence of a wire tapper." filename="zrtp-check_sas.wav"/>
|
||||
<prompt phrase="Only phones that are authenticated can be configured to trust this system to relay ZRTP secured calls. Your phone is not authenticated with this system, so this call will have no effect." filename="zrtp-enroll_not_sip_registered.wav"/>
|
||||
<prompt phrase="Your phone indicates that it already trusts this system to relay ZRTP secured calls, so you do not need to do anything more." filename="zrtp-enroll_already_enrolled.wav"/>
|
||||
<prompt phrase="Only phones equipped with the ZRTP protocol can use this extension. Your phone is not a ZRTP-enable phone, so this call will have no effect." filename="zrtp-enroll_notzrtp.wav"/>
|
||||
<prompt phrase="This system is equipped to handle ZRTP encrypted phone calls. You must decide if you want to allow this system to be in a position to intercept and possibly monitor your secure phone calls. You may hang up after you've done this." filename="zrtp-enroll_confirmed.wav"/>
|
||||
<prompt phrase="Verbally compare this authentication code with your partner." filename="zrtp-is_secure.wav"/>
|
||||
<prompt phrase="Authentication code is now unverified." filename="zrtp-is_unverified.wav"/>
|
||||
<prompt phrase="Authentication code is now verified." filename="zrtp-is_verified.wav"/>
|
||||
<prompt phrase="Thank you for calling. Goodbye." filename="zrtp-thankyou_goodbye.wav"/>
|
||||
<prompt phrase="Something's wrong" filename="zrtp-somethings_wrong.wav"/>
|
||||
<prompt phrase="Error." filename="zrtp-status_error.wav"/>
|
||||
<prompt phrase="Call is not secure." filename="zrtp-status_notsecure.wav"/>
|
||||
<prompt phrase="Call is secure." filename="zrtp-status_secure.wav"/>
|
||||
<prompt phrase="Securing call." filename="zrtp-status_securing.wav"/>
|
||||
</zrtp>
|
||||
</en>
|
||||
</language>
|
||||
<!--
|
||||
|
|
|
@ -992,23 +992,5 @@
|
|||
<prompt phrase="woodlark" filename="woodlark.wav"/>
|
||||
<prompt phrase="yesteryear" filename="yesteryear.wav"/>
|
||||
</base256>
|
||||
<zrtp>
|
||||
<!-- Event prompts -->
|
||||
<prompt phrase="Bienvenidos al servicio de inscripción ZRTP." filename="zrtp-enroll_welcome.wav"/>
|
||||
<prompt phrase="Usted debe verificar la cadena de caracteres con su destino. Si no coincide, indica la presencia de una escucha telefónica." filename="zrtp-check_sas.wav"/>
|
||||
<prompt phrase="Solo teléfonos autenticados pueden confiar en llamadas securizadas con ZRTP. Su teléfono no está autenticado con este sistema, por lo que esta llamada no estará securizada." filename="zrtp-enroll_not_sip_registered.wav"/>
|
||||
<prompt phrase="Su teléfono indica que confía en este sistema para realizar llamadas seguras con ZRTP, no necesita hacer nada más." filename="zrtp-enroll_already_enrolled.wav"/>
|
||||
<prompt phrase="Solo teléfonos soportando el protocolo ZRTP pueden usar esta extensión. Su teléfono no tiene ZRTP habilitado, por lo que esta llamada no estará securizada." filename="zrtp-enroll_notzrtp.wav"/>
|
||||
<prompt phrase="Este sistema está configurado para manejar llamadas cifradas con ZRTP. Decida si permite al sistema tener la posibilidad de interceptar o monitorizar su llamada. Puede colgar una vez confirmado." filename="zrtp-enroll_confirmed.wav"/>
|
||||
<prompt phrase="Compara verbalmente este código de autenticación con su destino." filename="zrtp-is_secure.wav"/>
|
||||
<prompt phrase="El código de autenticación no está verificado." filename="zrtp-is_unverified.wav"/>
|
||||
<prompt phrase="El código de autenticación está verificado." filename="zrtp-is_verified.wav"/>
|
||||
<prompt phrase="Gracias por llamar. Adiós." filename="zrtp-thankyou_goodbye.wav"/>
|
||||
<prompt phrase="Algún error ha ocurrido." filename="zrtp-somethings_wrong.wav"/>
|
||||
<prompt phrase="Error." filename="zrtp-status_error.wav"/>
|
||||
<prompt phrase="Esta llamada no está protegida." filename="zrtp-status_notsecure.wav"/>
|
||||
<prompt phrase="Esta llamada está protegida." filename="zrtp-status_secure.wav"/>
|
||||
<prompt phrase="Securizando su llamada." filename="zrtp-status_securing.wav"/>
|
||||
</zrtp>
|
||||
</es_ES>
|
||||
</language>
|
||||
|
|
|
@ -991,23 +991,5 @@
|
|||
<prompt phrase="woodlark" filename="woodlark.wav"/>
|
||||
<prompt phrase="yesteryear" filename="yesteryear.wav"/>
|
||||
</base256>
|
||||
<zrtp>
|
||||
<!-- Event prompts -->
|
||||
<prompt phrase="Bienvenidos al servicio de inscripción ZRTP." filename="zrtp-enroll_welcome.wav"/>
|
||||
<prompt phrase="Usted debe verificar la cadena de caracteres con su destino. Si no coincide, indica la presencia de una escucha telefónica." filename="zrtp-check_sas.wav"/>
|
||||
<prompt phrase="Solo teléfonos autenticados pueden confiar en llamadas seguras con ZRTP. Su teléfono no está autenticado con este sistema, su llamada no estará securizada." filename="zrtp-enroll_not_sip_registered.wav"/>
|
||||
<prompt phrase="Su teléfono indica que confía en este sistema para realizar llamadas seguras con ZRTP, no necesita hacer nada más." filename="zrtp-enroll_already_enrolled.wav"/>
|
||||
<prompt phrase="Solo teléfonos soportando el protocolo ZRTP pueden usar esta extensión. Su teléfono no tiene ZRTP habilitado, y está llamada no será securizada." filename="zrtp-enroll_notzrtp.wav"/>
|
||||
<prompt phrase="Este sistema está configurado para manejar llamadas cifradas con ZRTP. Decida si permite al sistema tener la posibilidad de interceptar o monitorizar su llamada. Puede colgar una vez confirmado." filename="zrtp-enroll_confirmed.wav"/>
|
||||
<prompt phrase="Compara verbalmente este código de autenticación con su destino." filename="zrtp-is_secure.wav"/>
|
||||
<prompt phrase="El código de autenticación no está verificado." filename="zrtp-is_unverified.wav"/>
|
||||
<prompt phrase="El código de autenticación está verificado." filename="zrtp-is_verified.wav"/>
|
||||
<prompt phrase="Gracias por llamar. Adiós." filename="zrtp-thankyou_goodbye.wav"/>
|
||||
<prompt phrase="Algún error ha ocurrido." filename="zrtp-somethings_wrong.wav"/>
|
||||
<prompt phrase="Error." filename="zrtp-status_error.wav"/>
|
||||
<prompt phrase="Esta llamada no está protegida." filename="zrtp-status_notsecure.wav"/>
|
||||
<prompt phrase="Esta llamada está protegida." filename="zrtp-status_secure.wav"/>
|
||||
<prompt phrase="Securizando su llamada." filename="zrtp-status_securing.wav"/>
|
||||
</zrtp>
|
||||
</es_MX>
|
||||
</language>
|
||||
|
|
|
@ -985,23 +985,5 @@
|
|||
<prompt phrase="woodlark" filename="woodlark.wav"/>
|
||||
<prompt phrase="yesteryear" filename="yesteryear.wav"/>
|
||||
</base256>
|
||||
<zrtp>
|
||||
<!-- Event prompts -->
|
||||
<prompt phrase="Bem-vindo ao agente de registro de segurança ZRTP." filename="zrtp-enroll_welcome.wav"/>
|
||||
<prompt phrase="Você deve verificar a autentificação com o seu destinatário. Se não coincidir, isso indica presença de um dispositivo de escuta telefonica." filename="zrtp-check_sas.wav"/>
|
||||
<prompt phrase="Somente aqueles telefones que estão autentificados podem ser configurados de maneira segura neste sistema para retransmitir as ligações em ZRTP. O seu telefone não está autentificado com este sistema, esta ligação não será realizada." filename="zrtp-enroll_not_sip_registered.wav"/>
|
||||
<prompt phrase="O seu telefone indica que é seguro este sistema para realizar ligações seguras em ZRTP, você não precisa fazer nada mais." filename="zrtp-enroll_already_enrolled.wav"/>
|
||||
<prompt phrase="Somente os telefones equipados com protocolo ZRTP podem usar este ramal. O seu telefone não esta configurado para ZRTP, esta ligação não sera completada." filename="zrtp-enroll_notzrtp.wav"/>
|
||||
<prompt phrase="Este sistema está configurado para realizar ligações telefónicas encriptadas em ZRTP. Você deve decidir se permitira que este sistema possa interceptar e monitorizar as suas ligações telefónicas seguras. Pode finalizar a ligação depois disso." filename="zrtp-enroll_confirmed.wav"/>
|
||||
<prompt phrase="Compare verbalmente este código de autentificação com o seu destinatário." filename="zrtp-is_secure.wav"/>
|
||||
<prompt phrase="O código de autentificação não foi verificado." filename="zrtp-is_unverified.wav"/>
|
||||
<prompt phrase="O código de autentificação foi verificado." filename="zrtp-is_verified.wav"/>
|
||||
<prompt phrase="Obrigado pela sua ligação. Até logo." filename="zrtp-thankyou_goodbye.wav"/>
|
||||
<prompt phrase="Algo falha." filename="zrtp-somethings_wrong.wav"/>
|
||||
<prompt phrase="Erro." filename="zrtp-status_error.wav"/>
|
||||
<prompt phrase="A ligação não e segura." filename="zrtp-status_notsecure.wav"/>
|
||||
<prompt phrase="A ligação é segura." filename="zrtp-status_secure.wav"/>
|
||||
<prompt phrase="Securizando a ligação." filename="zrtp-status_securing.wav"/>
|
||||
</zrtp>
|
||||
</pt_BR>
|
||||
</language>
|
||||
|
|
|
@ -984,23 +984,5 @@
|
|||
<prompt phrase="woodlark" filename="woodlark.wav"/>
|
||||
<prompt phrase="yesteryear" filename="yesteryear.wav"/>
|
||||
</base256>
|
||||
<zrtp>
|
||||
<!-- Event prompts -->
|
||||
<prompt phrase="Bem-vindo ao agente de registo ZRTP." filename="zrtp-enroll_welcome.wav"/>
|
||||
<prompt phrase="Deve verificar a chave de autenticação com destinatário. Se não for igual, indica a presença de uma escuta." filename="zrtp-check_sas.wav"/>
|
||||
<prompt phrase="Apenas telefones que estão autenticados podem ser configurados para usarem este sistema de retransmissão ZRTP para chamadas com modo de segurança activo. Se o seu telefone não está autenticado com o sistema, esta chamada não terá qualquer efeito." filename="zrtp-enroll_not_sip_registered.wav"/>
|
||||
<prompt phrase="O seu telefone indica que já confia neste sistema de retransmissão ZRTP para chamadas com o modo de segurança activo, portanto você já não precisa de fazer mais nada." filename="zrtp-enroll_already_enrolled.wav"/>
|
||||
<prompt phrase="Apenas telefones equipados com o protocolo ZRTP podem usar esta extensão. O seu telefone não suporta ZRTP, portanto esta chamada não terá qualquer efeito." filename="zrtp-enroll_notzrtp.wav"/>
|
||||
<prompt phrase="Este sistema está preparado para suportar chamadas telefónicas encriptadas em ZRTP. Você deve determinar se deseja permitir que o sistema possa interceptar ou gravar as suas chamadas telefónicas com o modo de segurança activado. Você pode desligar após confirmar este comportamento." filename="zrtp-enroll_confirmed.wav"/>
|
||||
<prompt phrase="Comparando verbalmente o código desta autenticação com o destinatário." filename="zrtp-is_secure.wav"/>
|
||||
<prompt phrase="O código de autenticação não foi verificado." filename="zrtp-is_unverified.wav"/>
|
||||
<prompt phrase="O código de autenticação foi verificado." filename="zrtp-is_verified.wav"/>
|
||||
<prompt phrase="Obrigado por telefonar. Até breve." filename="zrtp-thankyou_goodbye.wav"/>
|
||||
<prompt phrase="Algo está errado" filename="zrtp-somethings_wrong.wav"/>
|
||||
<prompt phrase="Erro." filename="zrtp-status_error.wav"/>
|
||||
<prompt phrase="O modo de segurança não está activo na chamada." filename="zrtp-status_notsecure.wav"/>
|
||||
<prompt phrase="O modo de segurança está activo na chamada." filename="zrtp-status_secure.wav"/>
|
||||
<prompt phrase="Activando o modo de segurança na chamada." filename="zrtp-status_securing.wav"/>
|
||||
</zrtp>
|
||||
</pt_PT>
|
||||
</language>
|
||||
|
|
|
@ -1157,39 +1157,6 @@
|
|||
<prompt phrase="woodlark" filename="woodlark.wav"/>
|
||||
<prompt phrase="yesteryear" filename="yesteryear.wav"/>
|
||||
</base256>
|
||||
<zrtp>
|
||||
<!-- Event prompts -->
|
||||
<prompt phrase="Добро пожаловать в агента регистрации шифрования ZRTP" filename="zrtp-enroll_welcome.wav"/>
|
||||
<!-- Welcome to the ZRTP security enrollment agent. -->
|
||||
<prompt phrase="Вы должны выбрать строку аутентификации с партнером по разговору, Если она не совпадет, система сообщит Вам разрывом линии." filename="zrtp-check_sas.wav"/>
|
||||
<!-- You must check the authentication string with your partner. If it doesn't match, it indicates the presence of a wire tapper. -->
|
||||
<prompt phrase="Только телефоны, прошедшие аутентификацию, могут быть сконфигурированы для доверия системе для обеспечения ZRTP шифрованных звонков, так что такой звонок не даст эффекта." filename="zrtp-enroll_not_sip_registered.wav"/>
|
||||
<!-- Only phones that are authenticated can be configured to trust this system to relay ZRTP secured calls. Your phone is not authenticated with this system, so this call will have no effect. -->
|
||||
<prompt phrase="Ваш телефон сообщит, что он уже доверяет системе для перенаправления ZRTP шифрованных звонков, так что больше делать ничего не нужно будет" filename="zrtp-enroll_already_enrolled.wav"/>
|
||||
<!-- Your phone indicates that it already trusts this system to relay ZRTP secured calls, so you do not need to do anything more. -->
|
||||
<prompt phrase="Только телефоны, с поддержкой протокола ZRTP могут использовать такую функцию. Ваш телефон не поддерживает ZRTP протокол и звонок не даст эффекта ZRTP защиты." filename="zrtp-enroll_notzrtp.wav"/>
|
||||
<!-- Only phones equipped with the ZRTP protocol can use this extension. Your phone is not a ZRTP-enable phone, so this call will have no effect.-->
|
||||
<prompt phrase="Система оборудована для проведения шифрованных ZRTP звонков. Вы должны решить, если вы хотите чтобы система была задействована для приема и возможно мониторинга Ваших защищенных звонков. Вы можете повесить трубку после окончания разговора." filename="zrtp-enroll_confirmed.wav"/>
|
||||
<!-- This system is equipped to handle ZRTP encrypted phone calls. You must decide if you want to allow this system to be in a position to intercept and possibly monitor your secure phone calls. You may hang up after you've done this. -->
|
||||
<prompt phrase="Договоритесь с партнером по разговору о парольной фразе." filename="zrtp-is_secure.wav"/>
|
||||
<!-- Verbally compare this authentication code with your partner. -->
|
||||
<prompt phrase="Парольная фраза на данный момент не проверена" filename="zrtp-is_unverified.wav"/>
|
||||
<!-- Authentication code is now unverified. -->
|
||||
<prompt phrase="Парольная фраза проверена." filename="zrtp-is_verified.wav"/>
|
||||
<!-- Authentication code is now verified. -->
|
||||
<prompt phrase="Спасибо за звонок. До свидания." filename="zrtp-thankyou_goodbye.wav"/>
|
||||
<!-- Thank you for calling. Goodbye. -->
|
||||
<prompt phrase="Что-то происходит не так." filename="zrtp-somethings_wrong.wav"/>
|
||||
<!-- Something's wrong -->
|
||||
<prompt phrase="Ошибка." filename="zrtp-status_error.wav"/>
|
||||
<!-- Error. -->
|
||||
<prompt phrase="Ваш разговор не шифруется" filename="zrtp-status_notsecure.wav"/>
|
||||
<!-- Call is not secure. -->
|
||||
<prompt phrase="Ваш разговор шифруется." filename="zrtp-status_secure.wav"/>
|
||||
<!-- Call is secure. -->
|
||||
<prompt phrase="Шифрованный вызов." filename="zrtp-status_securing.wav"/>
|
||||
<!-- Securing call. -->
|
||||
</zrtp>
|
||||
<users>
|
||||
<prompt phrase="Для отправки факса" filename="to_send_a_fax.wav"/>
|
||||
<prompt phrase="Абонент с номером ... не отвечает, пожалуйста..." filename="no_answer_please.wav"/>
|
||||
|
|
|
@ -1616,7 +1616,6 @@ autoreconf --force --install
|
|||
--with-odbc \
|
||||
--with-erlang \
|
||||
--with-openssl \
|
||||
--enable-zrtp \
|
||||
%{?configure_options}
|
||||
|
||||
unset MODULES
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
# -*- mode:conf -*-
|
||||
/*.a
|
||||
/*.dat
|
||||
/*.o
|
||||
/.cproject
|
||||
/.deps
|
||||
/.project
|
||||
/.stamp-doc
|
||||
/Makefile
|
||||
/Makefile.in
|
||||
/_configs.sed
|
||||
/aclocal.m4
|
||||
/autom4te.cache/*
|
||||
/cache_test
|
||||
/config.*
|
||||
/config/*
|
||||
/configure
|
||||
/doc/Doxyfile
|
||||
/doc/out
|
||||
/include/zrtp_config_unix.h
|
||||
!/build/Makefile.am
|
||||
!/build/test/Makefile.am
|
|
@ -1,30 +0,0 @@
|
|||
#
|
||||
# Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
# Contact: http://philzimmermann.com
|
||||
# For licensing and other legal details, see the file zrtp_legal.c.
|
||||
#
|
||||
# Viktor Krikun <v.krikun at zfoneproject.com>
|
||||
|
||||
Created by Phil Zimmermann.
|
||||
|
||||
Developers:
|
||||
Viktor Krikun
|
||||
Nikolay Popok
|
||||
Vitaly Rozhkov
|
||||
Andrey Rozinko
|
||||
Bryce Wilcox-O'Hearn
|
||||
|
||||
Thanks to:
|
||||
Alan Johnston
|
||||
Jon Callas
|
||||
Hal Finney
|
||||
Colin Plumb
|
||||
Sagar Pai
|
||||
Werner Dittmann
|
||||
Travis Cross
|
||||
L. Amber Wilcox-O'Hearn
|
||||
Ariel Boston
|
||||
Donovan Preston
|
||||
|
||||
Portions of this software are available under open source licenses from other authors.
|
||||
Notably, Brian Gladman's AES implementation, and David McGrew's libSRTP package.
|
|
@ -1,7 +0,0 @@
|
|||
/*
|
||||
* libZRTP SDK library, implements the ZRTP secure VoIP protocol.
|
||||
* Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
* Contact: http://philzimmermann.com
|
||||
* For licensing and other legal details, see the file zrtp_legal.c.
|
||||
*/
|
||||
|
|
@ -1,556 +0,0 @@
|
|||
* libZRTP SDK library, implements the ZRTP secure VoIP protocol.
|
||||
* Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
* Contact: http://philzimmermann.com
|
||||
* For licensing and other legal details, see the file zrtp_legal.c.
|
||||
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
SINCE LIBZRTP v0.80 CHANGELOG IS A PART OF HTML DOCUMENTATION.
|
||||
Check generated html or doc/manuals/changelog.dox doxygen sources
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
|
||||
libzrtp 0.7.1 18.11.2008
|
||||
--------------------------------------------------------------------------------
|
||||
1. Fixed bug with hardcoded AES128 cipher for generating SRTP keys. In this
|
||||
version is selected according to ZRTP discovery.
|
||||
|
||||
2. Added initialization/deinitalization functions to zrtp helper functions.
|
||||
|
||||
libzrtp 0.7.0 04.11.2008
|
||||
--------------------------------------------------------------------------------
|
||||
1. Changes in libzrtp sources tree.
|
||||
|
||||
2. Improvements in libzrtp initialization routine:
|
||||
- all global zrtp options were combined in zrtp_config_t structure;
|
||||
- zrtp_init() allocates memory for zrtp global context;
|
||||
- zrtp_config_defaults()
|
||||
|
||||
3. Improvements for Passive/Active mode support.
|
||||
a) A passive endpoint never sends a commit message, period. Also, it
|
||||
declares itself as a passive endpoint by setting the P flag it its own
|
||||
Hello message;
|
||||
b) A active endpoint does not send a commit to a passive endpoint, which it
|
||||
recognizes by detecting the P flag;
|
||||
c) A passive phone, if acting as a SIP initiator (meaning it initiated the
|
||||
call), rejects all commit packets from everyone;
|
||||
d) A passive phone rejects all commit messages from a PBX, which is easily
|
||||
recognized by the M flag.
|
||||
Passive mode support is built into the library logic and will be used
|
||||
automatically if the developer specifies signaling role by setting
|
||||
is_initiator flag in zrtp_init_session_ctx().
|
||||
|
||||
4. Improvements in ZRTP feedback interface and system-dependent functions.
|
||||
There are two types of interface functions in libzrtp: system dependent API
|
||||
and realization of helper functions and events. System dependent API in
|
||||
defined in zrtp_iface_system.h as set of extern functions. System
|
||||
functions are already implemented for several basic platforms in
|
||||
zrtp_iface.sys.c libzrtp feedback and helper functions were re-factored
|
||||
and implemented as set of callbacks. If the developer doesn't want to
|
||||
handle one or another event it may just leave necessary pointer empty.
|
||||
See zrtp_init() and zrtp_callback_t, zrtp_iface.h for more details.
|
||||
|
||||
5. ZRTP configuration approach was improved: zrtp_config_xxx.h contains
|
||||
adjustments for necessary target platform. libzrtp contains default
|
||||
configs for Linux, OS X, Windows, Window CE and Symbian platforms.
|
||||
All ZRTP protocol and behavior related adjustments are collected in
|
||||
zrtp_config_user.h. Edit this file to configure libzrtp for your
|
||||
needs.
|
||||
|
||||
6. Implemented new functions in protocol according to the Internet Draft v 10.
|
||||
|
||||
7. Improved realization of built-in libzrtp scheduler. Fixed bug with crashing
|
||||
on performing delay call when zrtp session have been already deleted.
|
||||
|
||||
8. Logging function was improved. Use ZRTP_LOG macro to print log messages. See
|
||||
zrtp_log.h for more information.
|
||||
|
||||
|
||||
libzrtp 0.6.8 03.09.2008
|
||||
--------------------------------------------------------------------------------
|
||||
ZRTP
|
||||
1. Fixed bug with incorrect maximum value for T1 retry interval timer which
|
||||
increased delay between LOOKING_FOR_ZRTP and NO_ZRTP_SUPPORT states.
|
||||
Internal fix, no API changes required;
|
||||
2. Implemented version negotiation according to the latest specification.
|
||||
libzrtp v 0.6.8 supports ZRTP v0.90 only. No changes required in
|
||||
applications that use the SDK.
|
||||
3. Compilation flag WITH_ZFONE was removed. The developer, who wants to use
|
||||
built-in ZRTP cache, has to set name of the ZRTP cache explicitly,
|
||||
implementing zrtp_get_cache_path() function.
|
||||
4. New libzrtp licensing scheme was implemented. It allows the licensing policy
|
||||
to be changed at run time. See zrtp_license_mode_t doc. for more details.
|
||||
Affected API - zrtp_init().
|
||||
5. ZRTP Protocol version was changed to 0.90 according to ZRTP Internet Draft.
|
||||
6. Some changes in Linux config files: surplus configuration flags were removed
|
||||
from ./cfg.XXX templates.
|
||||
7. Added experimental ZRTP messages retries scheduler for slow channels. As
|
||||
ex ample for GSM CSD channel with average bandwidth 6Kb/s. To use this
|
||||
option build library with BUILD_FOR_CSD flag.
|
||||
|
||||
|
||||
libzrtp 0.6.6 27.06.2008
|
||||
--------------------------------------------------------------------------------
|
||||
ZRTP
|
||||
1. Small bug was fixed in S0 calculation: when RS1 is corrupted the library uses
|
||||
RS2 instead;
|
||||
2. Some changes in Makefile and building process: unused header were eliminated
|
||||
from the installation process.
|
||||
3. -DBUILD_WITH_ZRTP_MUTEXES was replaced with --enable_mutexes option passed to
|
||||
./configure script. This change allows not to specify any libzrtp compilation
|
||||
flags during user application compilation. --enable-mutexes adds
|
||||
BUILD_ZRTP_MUTEXES definition to the ./config/zrtp_unix_config.h so if you
|
||||
build libzrtp on other platforms - define this flag manually (windows
|
||||
configuration file already includes this option).
|
||||
4. Clean-up in .h and .c comments was made.
|
||||
|
||||
|
||||
libzrtp 0.6.5 04.06.2008
|
||||
--------------------------------------------------------------------------------
|
||||
ZRTP
|
||||
1. New names for: other_secret - pbxs; srtps - auxs. In bits and secrets storages;
|
||||
2. RS2 secret was eliminated form DH s0 calculation;
|
||||
3. Protocol version number was increased to 0.85
|
||||
|
||||
|
||||
libzrtp 0.6.4 19.05.2008
|
||||
--------------------------------------------------------------------------------
|
||||
ZRTP
|
||||
1. According to the new version of the Internet Draft Signaling shared secret was
|
||||
removed from the protocol and from the sources. It was not used by interface
|
||||
functions and developers may change nothing in libzrtp based applications.
|
||||
|
||||
2. DH4K Key echange was eleminated from the specification and from the sources.
|
||||
Now ECDH is used for all larger AES key sizes.
|
||||
|
||||
|
||||
libzrtp 0.6.2 04.02.2008
|
||||
--------------------------------------------------------------------------------
|
||||
ZRTP
|
||||
1. New behaviour for Secure --> Clear --> Secure scenario was implemnted. According
|
||||
to ZRTP ID 06 section 5.7.2.1 new value of ZRTPSess computed as hash(ZRTPSess).
|
||||
|
||||
DOC:
|
||||
Libzrtp documentation was updated up to version 0.6.2.
|
||||
|
||||
|
||||
libzrtp 0.6.1 03.14.2008
|
||||
--------------------------------------------------------------------------------
|
||||
ZRTP
|
||||
1. Multistream mode was implemented according to ZRTP Internet Draft 05.n:
|
||||
- new stream mode zrtp_stream_mode_t:: ZRTP_STREAM_MODE_MULT;
|
||||
- Multistream key exchange component was added with ID zrtp_pktype_id_t::
|
||||
ZRTP_PKTYPE_MULT and symbolic name ZRTP_MULT. To allow libzrtp use Multistream
|
||||
mode - ZRTP_PKTYPE_MULT have to be added to the stream profile in the first
|
||||
position;
|
||||
- According to the new draft SAS and ZRTPSess key are Session option and
|
||||
were moved to the zrtp_conn_ctx_t structure. New specification defines
|
||||
single SAS values for all streams within the session;
|
||||
- ZRTP state-machine was changed to handle Multistream mode. In .Fast. mode
|
||||
DH exchange is omitted and stream skips ZRTP_STATE_WAIT_CONFIRM1 and
|
||||
ZRTP_STATE_PENDINGSECURE for the Initiator and Responder state-machines,
|
||||
respectively;
|
||||
|
||||
2. Hash preimages were added to prevent DOS attacks. See ZRTP ID sec 9.0 for detail
|
||||
information. This option is available using zrtp_set_signaling_hash() and
|
||||
zrtp_get_signaling_hash() functions.
|
||||
|
||||
3. Hmac values were added to every packet to allow eliminate SAS validation
|
||||
if SIP is protected;
|
||||
|
||||
4. Autosave. of the default realization of the ZRTP cache to the hard drive was
|
||||
implemented;
|
||||
|
||||
5. Lot of other internal changes and improvements according to the latest ZRTP
|
||||
specification v06.
|
||||
|
||||
|
||||
libzrtp 0.4.5-6
|
||||
--------------------------------------------------------------------------------
|
||||
1. Full PBX support. Tested on GS-Labs Asterisk
|
||||
API:
|
||||
DOC:
|
||||
|
||||
2. Resolved problem with BG ciphers compilation: initialization of AES hash tables.
|
||||
|
||||
3. Fixed bug in SRTP replay protection. (Undeleted nodes for mulsy-stream encryption)
|
||||
(May resulted in a error zrtp_protocol_error_t::zrtp_status_rp_fail)
|
||||
|
||||
4. Vrification is a session option. Input parameter of zrtp_set_verified() was
|
||||
changed from stream to ZRTP session structure.
|
||||
|
||||
5. Fixed bug with malformed ZRTP Hello packet.
|
||||
|
||||
5. fast video
|
||||
|
||||
libzrtp 0.4.4 31.07.2007
|
||||
--------------------------------------------------------------------------------
|
||||
1. New extra error code for replay protection was added.
|
||||
See zrtp_status_t::zrtp_status_rp_fail.
|
||||
|
||||
2. Fixed bug which may resulted in a dammage with decrypt failed 7 error. It
|
||||
was happen when libzrtp passed RTP alerts packet to the replay protection
|
||||
engine and ROC was broken.
|
||||
|
||||
3. Fixed RTCP encryption/decryption.
|
||||
|
||||
4. Fixed bug with RS1 and RS2 swapping when one of the sides lost RS1.
|
||||
(May resulted in a error zrtp_protocol_error_t::zrtp_error_auth_decrypt )
|
||||
|
||||
|
||||
libzrtp 0.4.3 06.07.2007
|
||||
--------------------------------------------------------------------------------
|
||||
1. Beta version of API for PBX support according to the latest ZRTP draft.
|
||||
Not tested. For internal development only. Follow // PBX comments;
|
||||
- secret's cache format was changed.
|
||||
|
||||
2. S0 calculation according to NIST recommendations; Internal change
|
||||
- ZRTP protocol version was increased to 0.07.
|
||||
|
||||
3. All libzrtp sources was audited with coverity code analyzer. http://coverity.com/
|
||||
|
||||
libzrtp (0.3.9 - 0.4.2) 27.06.2008
|
||||
--------------------------------------------------------------------------------
|
||||
1. Changes according to new draft 04a. All changes are internal.
|
||||
a) new DH packets: pvi/pvr, nonce field is at the end of the DH packet.
|
||||
In "Preshared" mode both DH packets contain nonce value instead of pvi/r;
|
||||
b) new hvi value the same for all modes (DH and Preshared)
|
||||
hvi = hash(initiator's DHPart2 message | responder's Hello message);
|
||||
c) new algorithm of SAS computing: sasvalue = HMAC(hmackeyi,"SAS");
|
||||
|
||||
2. New GUI based test-unite forSymbian platform
|
||||
|
||||
3. Default implementation of the packet retries unite for Symbian was added
|
||||
to the libzrtp package. Except besides scheduler, libzrtp includes
|
||||
realization of some synchronization and threading routines. These
|
||||
components written in C++ and can't be linked with the library. One should
|
||||
add them to own Symbian project project.
|
||||
|
||||
4. Compilation of default realization of ZRTP mutexes was separated from
|
||||
the other system interfaces. To build library with default mutexes
|
||||
BUILD_ZRTP_MUTEXES flag should be used;
|
||||
|
||||
5. New clearing logic. Goals:
|
||||
API:
|
||||
- state-machine states were changed
|
||||
- goclear reason was eliminated. Now we can switch to CLEAR just on
|
||||
user action.
|
||||
- ZRTP_EVENT_IS_INITIATINGCLEAR was removed as a uperfluous event. As a
|
||||
result all event codes were changed.
|
||||
- new clear_hmac = HMAC(hmakkeyi/r, "Clear Hmac")
|
||||
6. New Errors handling logic. See updated state-macine diagram and "developers
|
||||
guide".
|
||||
API:
|
||||
- ZRTP_STATE_ERROR was added to handle error requests. Libzrtp switches
|
||||
to this state after the Error exchange. From ZRTP_STATE_ERROR stream
|
||||
cxan be started again or destroyed, depending on application strategy.
|
||||
- ZRTP_ERRORACK and ZRTP_ERROR packets were added
|
||||
- new event ZRTP_ENEVT_NO_ZRTP inform's user that other side doesn't
|
||||
support ZRTP encryption.
|
||||
|
||||
7. -D WITH_STACK_MINIM compilation flag allows to minimize coasts for the
|
||||
system stack. In the most critical places dynamic allocation will be used
|
||||
instead of static variables. This option can be useful on mobile platforms
|
||||
in kernel mode, etc.
|
||||
|
||||
8. Several bug fixes in scheduler. Improved built-in realization of Symbian
|
||||
platform. If you use our default realization on Symbian - please update.
|
||||
|
||||
9. David A. McGrew's srtp was replaced with our own. We did it to get control
|
||||
over all crypto functions, generalize interface of crypto component. It
|
||||
allows us to port libsrtp to any platforms more smoothly. We have one
|
||||
configuration file, all platform-dependent function and definitions are
|
||||
concentrated at one place. We eliminated superfluous functionality from
|
||||
libsrtp, made it crossplatform and thread-safe. In SRTP engine we use our
|
||||
own crypto-components based on by Dr. Brian Gladman's sources. Each component
|
||||
has strong self-test function allows it to be tested on any platform and
|
||||
in any environment.
|
||||
- project structure was changed;
|
||||
- bgaes folder includes AES and SHA routines by Dr. Brian Gladman. For details
|
||||
see dgaes/howto and bg2zrtp.h files;
|
||||
- libzrtp supports external realizations of SRTP (Use zrtp_srtp.h API and flag
|
||||
-D WITHOUT_BUILTIN_SRTP );
|
||||
|
||||
10. Header files were refactored: one can add just single zrtp.h include to use
|
||||
any libzrtp function or data type;
|
||||
|
||||
11. Solved problem with deadlock during Video conferences. (One side starts
|
||||
negotioation with Video and another one with Audio stream)
|
||||
|
||||
12. Some changes in test-unite:
|
||||
- test vectores and test-cases for all cryptio components are available;
|
||||
- zrtp_system_test.h checks environment and compilation flags
|
||||
- use ZRTP_ENABLE_TEST flag to build library with all tests
|
||||
13. Full documentation review and updating.
|
||||
|
||||
14. Sources clean up and some refactoring;
|
||||
|
||||
15. Fixing in "break the tie" logic. See diagrams and zrtp_preparse_commit(),
|
||||
zrtp_preparse_init_commit();
|
||||
|
||||
16. Some changes according to the lates ZRTP specification:
|
||||
- sasvalue was trancated to 32 bits and used mostleft parts of the hashvalue.
|
||||
|
||||
17. Small bug fixes (zrtp_can_start_dh and zrtp_can_start_preshared() mixed into
|
||||
zrtp_can_start_stream);
|
||||
|
||||
18. New key derivation mechanism according to NIST standarts. See ZRTP Draft
|
||||
5.4.4 and 5.5.4.
|
||||
|
||||
libzrtp (0.3.7)
|
||||
--------------------------------------------------------------------------------
|
||||
1. New, more clear and useful test-unite
|
||||
2. Eliminated zrtp_stop_protocol(). Now zrtp_done_session_ctx() includes
|
||||
protocol stopping.
|
||||
3. Some simplifications in project structure: removed zrtp_inet.h and bnase32.h,
|
||||
zrtp_iface.c was removed to src\iface folder;
|
||||
4. ZSTR_GET_VALUE should be used to convert zrtp_stringxx_t to zrtp_stringn_t;
|
||||
5. Some changes for windows CE;
|
||||
6. Changed default options: SAS base256 enabled by defauld and "staysecure" is on.
|
||||
|
||||
libzrtp (0.3.6)
|
||||
--------------------------------------------------------------------------------
|
||||
FIXES:
|
||||
a) CRC now covers the whole ZRTP packet, not just a body
|
||||
b) improved names of some crypto-components in HELLO/COMMIT packets
|
||||
c) improved messages hash: hash function covers all ZRTP message with
|
||||
magic number and length fields;
|
||||
d) fixed DHPart1 and DHPart2 packets format according to last version
|
||||
of ZRTP Internet draft.
|
||||
e) fixed retain secrets sorting algorithm according to the last version
|
||||
of the internet draft.
|
||||
|
||||
1. Windows CE support. Now library is fully compatible with Windows CE.
|
||||
- .\libzrtp\projects\libzrtp_wince_vc8.sln project file for MS VS 2005
|
||||
- .\libzrtp\test\WinCE contains sources of simple test-unite ( We have
|
||||
just started working in this direction and more intelligent test unite
|
||||
will be available soon. Tested on HTC S620 with Windows CE 2005 )
|
||||
|
||||
2. Added previous state field to ZRTP stream structure. It can be used to
|
||||
analyze conditions of switching from one state to another. (For libzrtp
|
||||
developers only)
|
||||
API:
|
||||
- zrtp_stream_ctx_t#_prev_state was added
|
||||
- _zrtp_change_state() MUST be used to switch from one state to another
|
||||
|
||||
3. Some changes in PENDING_CLEAR state handler. In case of error during
|
||||
transition from CLEAR to SECURE state-machine will switch back to CLEAR
|
||||
without the confirmation by user.
|
||||
|
||||
|
||||
libzrtp (0.3.5)
|
||||
--------------------------------------------------------------------------------
|
||||
Full description is in progress
|
||||
|
||||
1. Support of all crypto futures according to the new ZRTP draft v 0.3. Lots
|
||||
of internal changes were provided in ZRTP kernel.
|
||||
|
||||
2. Symbian support. Now you can build libzrtp and test unites on Symbian
|
||||
platforms. There are .inf and .mmp files in corresponded directories.
|
||||
(Symbian project files are a little bit row and we will appreciate any
|
||||
suggestions and advices.)
|
||||
|
||||
3. ZRTP stream became more independent. You can use different configurations
|
||||
for different streams. So
|
||||
ZRTP profile: profile;
|
||||
"staysecure" flag: staysecure;
|
||||
SAS values: sas_values;
|
||||
cache TTL: cache_ttl;
|
||||
and all used crypto components were removed from session context
|
||||
(zrtp_conn_ctx_t) to stream context (zrtp_stream_ctx_t).
|
||||
API:
|
||||
- you should configure every stream in the same way as the whole session in
|
||||
previous version has been done. See zrtp_init_session_ctx()
|
||||
and zrtp_attach_stream()
|
||||
|
||||
4. "Multistream" mode was replaced by "Preshared" (based on retain secrets
|
||||
from previous call. See http://zfoneproject.com/docs/ietf/draft-zimmermann-avt-zrtp-03.html#anchor19 .
|
||||
Preshared mode is available as a normal ZRTP crypto component e.g."DH3K"
|
||||
or "DH4K". If you enable Preshared mode in profile and libzrtp finds
|
||||
secrets in your cache - "Preshared" mode will be used for all next calls
|
||||
API:
|
||||
- the choice of stream mode was removed from zrtp_start_stream() and
|
||||
from zrtp_secure_stream().
|
||||
|
||||
5. Integer enumerations for all crypto components e.g. Hash type, cipher type
|
||||
etc. You should use these values instead of character values for optional
|
||||
profile configuration. (as an example for enabling "preshared" mode)
|
||||
API:
|
||||
- enumerations types zrtp_hash_id, zrtp_cipher_idzrtp_atl_id,
|
||||
zrtp_pktype_id, zrtp_sas_id in zrtp_crypto.h
|
||||
- all crypto components structures now have id field and libzrtp
|
||||
operates with this field to find, register or delete crypto
|
||||
components.
|
||||
- ZRTP profile: zrtp_profile_t uses this integer values too. (list of
|
||||
crypto-components is a zero terminated array of values of necessary
|
||||
type)
|
||||
- zrtp_find_in_profile() and zrtp_find_comp() operate with component
|
||||
integer identifiers
|
||||
- there are two special functions to convert component ID to ZRTP
|
||||
character name: zrtp_comp_id2type(), zrtp_comp_type2id.
|
||||
|
||||
6. Integer error codes were provided instead of 4-character values. One should
|
||||
use them to analyze zrtp_stream_ctx_t#last_error value in your ZRTP
|
||||
errors handlers.
|
||||
API:
|
||||
- zrtp_protocol_error_t was added to zrtp_error.h.
|
||||
- zrtp_stream_ctx_t#last_error now is an integer value from
|
||||
zrtp_protocol_error_t space.
|
||||
|
||||
7. Special function for verification of SAS value was added. One should use
|
||||
this function to set/unset SAS verification flag from his own
|
||||
application.
|
||||
API:
|
||||
- zrtp_set_verified() was added to zrtp.h
|
||||
|
||||
8. Some optimization of types was provided. Here are some possible changes which you
|
||||
need to make in your product:
|
||||
- libzrtp uses it own strings (zrtp_stringXX_t group) to operate with
|
||||
binary and character strings. In this version we made attempt to
|
||||
minimize memory coasts and replaced zrtp_string_t with zrtp_stringXX_t
|
||||
group, where XX - maximum length in bytes. zrtp_stringxx_t contains
|
||||
its length and as a result all functions for work with strings are
|
||||
type independent. So one should use one of these types to store binary
|
||||
strings and zrtp_stringn_t as a type of operand in all global functions.
|
||||
- all retain secrets holders and flags were removed to zrtp_secrets
|
||||
structure in zrtp_conn_ctx_t#secrets.
|
||||
- zrtp_packet_string4_t was replaced by zrtp_ucharXX_t group where XX -
|
||||
type length in bytes. These types are used in library for packets
|
||||
construction instead of char arrays.
|
||||
|
||||
9. Packets retries synchronization was added. zrtp_retry_task_t structure
|
||||
from zrtp_types_t is used for all operations with scheduler. One should
|
||||
use #callback and #timeout fields from this structure.
|
||||
API:
|
||||
- zrtp_send_packet_later(), zrtp_cancel_send_packet_later()
|
||||
|
||||
libzrtp (0.3.4)
|
||||
--------------------------------------------------------------------------------
|
||||
1. ZRTP state-macine was fully refactored. All transitions between states
|
||||
are absolutely identical to diagram attached to documentation.
|
||||
DOC:
|
||||
- See doc/img/png/state_mach_ext.png
|
||||
|
||||
2. ZRTP uses new packets format according to draft-zimmermann-avt-zrtp-03i
|
||||
|
||||
3. Improved some mistakes in libbn make-files for windows. Unused
|
||||
functions were omitted.
|
||||
|
||||
4. Provided types optimization to decrease RAM memory costs.
|
||||
|
||||
5. Packets retries were synchronized.
|
||||
|
||||
6. zrtp_voip_proto_t was removed from the library
|
||||
API:
|
||||
- if you need this enumeration see zfone_types.h in zfone project
|
||||
|
||||
7. "GoClear reasons" support
|
||||
|
||||
8. Some internal changes according to draft-zimmermann-avt-zrtp-03i
|
||||
a) Commit hash covers the whole Hello body
|
||||
b) GoClear hmac includes "Reason string"
|
||||
c) Confirm body encrypted by AES CDB cipher
|
||||
d) Confirm hmac covers whole encrypted part of the packet
|
||||
|
||||
9. Use BUILD_ZRTP_DEBUG_LOG flag instead of BUILD_DEBUG_LOG to build the
|
||||
library with debug logs.
|
||||
|
||||
libzrtp (0.3.3) 21.02.2007
|
||||
--------------------------------------------------------------------------------
|
||||
1. libzrtp test application refactored for better performance and usability.
|
||||
For addition information see test application README file and
|
||||
"libzrtp test suite" chapter in main documentation page.
|
||||
|
||||
2. Some changes in documentation for better English
|
||||
|
||||
3. Use microseconds in zrtp_time_t instead of milliseconds.
|
||||
API changes:
|
||||
- change zrtp_get_time() function realization if needed
|
||||
|
||||
4. Fixed several small mistakes
|
||||
|
||||
|
||||
libzrtp (0.3.2) 09.02.2007
|
||||
--------------------------------------------------------------------------------
|
||||
1. Global context allocation removed to user space.
|
||||
This was made to able RNG using before library initialization.
|
||||
API changes:
|
||||
- zrtp_init(), zrtp_down()
|
||||
- zrtp_randstr(), zrtp_add_system_state()
|
||||
|
||||
2. Fixed bug in srtp SHA1 calculation for Windows.
|
||||
|
||||
3. Confirm and GoClear HMAC was truncated to 64 bits.
|
||||
|
||||
4. Calls stack minimized for library using in kernel mode
|
||||
|
||||
5. Default realization of secrets' cache is available. Cache was implemented
|
||||
as a simple binary file and can be built using -DBUILD_DEFAULT_CACHE file.
|
||||
API:
|
||||
- realization at src\iface\zrtp_cache.c
|
||||
DOC:
|
||||
- 1.4 libZRTP setup and building
|
||||
- 2.2 System-dependent functions
|
||||
|
||||
6. Default cross-platform realization of time-out sending unite is available.
|
||||
This unite is available for Linux, MacOS and Windows. It can be built using
|
||||
-DBUILD_DEFAULT_TIMER flag.
|
||||
API:
|
||||
- realization at src\iface\zrtp_scheduler.c
|
||||
DOC:
|
||||
- 1.4 libZRTP setup and building
|
||||
- 2.2 System-dependent functions
|
||||
|
||||
7. "HOWTO libzrtp" was added to the library documentation
|
||||
|
||||
libzrtp (0.3.1) 06.12.2006
|
||||
--------------------------------------------------------------------------------
|
||||
1. Global variables were removed from c-files. Added global context
|
||||
zrtp_global_ctx_t for necessary data storing. This was made to allow
|
||||
to build library in some special environment as Symbian OS ed2.
|
||||
DOC changes:
|
||||
- 2.1.2 data structure
|
||||
API changes:
|
||||
- zrtp_global_ctx_t added
|
||||
- zrtp_init(), zrtp_down(), zrtp_init_session(), zrtp_down_session()
|
||||
|
||||
2. Added multithreading support. Now libzrtp is thread-safe. About all
|
||||
conditions of usage in multithreading application and synchronization
|
||||
schemes see section "2.3.3 Multithreading and concurrent streams" in
|
||||
developers guide.
|
||||
DOC changes:
|
||||
- 2.2.3 Multithreading and concurrent streams
|
||||
API changes:
|
||||
- mutex were added to main data structures
|
||||
- mutex interface section at zrtp_iface.c, default realization at
|
||||
zrtp_iface.c
|
||||
|
||||
3. Session configuration routine was simplified. ZRTP profile is applied on
|
||||
session initialization. Some configuration functions were removed and
|
||||
changed.
|
||||
DOC changes:
|
||||
- 2.3.1 Setup, initialization and deinitialization
|
||||
API:
|
||||
- zrtp_profile_autoload() removed
|
||||
- zrtp_init_session(), zrtp_check_profile()
|
||||
|
||||
4. Default realizations of system interfaces was added (for Windows, Linux
|
||||
and MacOS).
|
||||
API:
|
||||
- zrtp_iface.c added
|
||||
|
||||
5. Test suit developed.
|
||||
Simple test-unite created. It runs several ZRTP sessions, enters SECURE
|
||||
mode, shows statistics and is closed. To build test-suite on Unix - use C
|
||||
flags -DBUILD_DEBUG_LOG -DBUILD_WITH_CFUNC -DBUILD_EMPTY_CACHE
|
||||
-DBUILD_EMPTY_TIMER and configure param. --enable-test. To run tests:
|
||||
make check. To build test-suite on Windows use necessary project files.
|
||||
DOC changes:
|
||||
- 1.4 libZRTP setup and building
|
||||
API:
|
||||
- Sources can be found at /test directory
|
||||
|
||||
6. Some changes in project structure, configuration and make files according
|
||||
to new functionality.
|
||||
DOC changes:
|
||||
- 1.4 libZRTP setup and building
|
||||
|
|
@ -1,255 +0,0 @@
|
|||
/*
|
||||
* libZRTP SDK library, implements the ZRTP secure VoIP protocol.
|
||||
* Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
* Contact: http://philzimmermann.com
|
||||
* For licensing and other legal details, see the file zrtp_legal.c.
|
||||
*
|
||||
* Viktor Krykun <v.krikun at zfoneproject.com>
|
||||
*/
|
||||
|
||||
Basic Installation
|
||||
================================================================================
|
||||
|
||||
To start playing with Zfone and libzrtp you should install few developers
|
||||
packages on your machine: gcc and g++ compilers, automake and autoconf tools.
|
||||
|
||||
To install library as a Zfone component for Linux the following flags
|
||||
should be used: BUILD_DEBUG_LOG, BUILD_WITH_CFUNC, BUILD_DEFAULT_CACHE,
|
||||
BUILD_DEFAULT_TIMER and WITH_ZFONE.
|
||||
The following instructions are for experienced users and developers only.
|
||||
If you just want to install Zfone use the command as follows:
|
||||
./configure CFLAGS="-O0 -g3 -W -Wall -DBUILD_DEBUG_LOG -DBUILD_WITH_CFUNC
|
||||
-DBUILD_DEFAULT_CACHE -DBUILD_DEFAULT_TIMER -DWITH_ZFONE"
|
||||
|
||||
Library distribution contains installation and configuration files, project files
|
||||
for several Operation Systems. To install Library on Unix-like systems the
|
||||
autotools tool set is used. To install on Windows - Microsoft Visual Studio.
|
||||
Except standard for your system compile flags the following are available for
|
||||
your system:
|
||||
-# -DBUILD_DEBUG_LOG - enables debug and logging information
|
||||
This flag is recommended to be used at design stages for testing. Logs make
|
||||
debug process much easier and are to be included into bugreport.
|
||||
-# -DBUILD_WITH_CFUNC - assign to the library to gather standard for this
|
||||
platform system interface functions realizations. This option simplifies the
|
||||
library use and make code more compact. You can have a look at realizations
|
||||
in src/zrtp-iface.c. file. And if they suit you use this flag.
|
||||
-# -DBUILD_EMPTY_CACHE this flag assigns to the library to use empty stubs
|
||||
instead of operations with cache. This checkbox may be used in test
|
||||
applications or in systems where cache secrets storing is impossible. Be
|
||||
careful with this flag! Use it if it is really necessary.
|
||||
-# -DBUILD_EMPTY_TIMER this flag assigns to the library to use empty stubs
|
||||
instead of delayed tasks processing. This checkbox may be used in test
|
||||
applications or in systems with the reliable communication channel (the
|
||||
package loss is impossible). Be careful with this flag! Use it if it is
|
||||
really necessary.
|
||||
|
||||
Except library itself, the set of utilities for the all components workability
|
||||
check on the basis of a certain platform is provided. libzrtp test creates
|
||||
several parallel ZRTP sessions, initiates transfer to the protected mode,
|
||||
displays statistics, after which the application is stopped. If application test
|
||||
was completed successfully the library is configured correctly, all components
|
||||
work correctly. Note! Installation of test application is carried out with
|
||||
-DBUILD_EMPTY_CACHE -DBUILD_EMPTY_TIMER flags. After fulfilling tests reinstall
|
||||
library without use of these flags.
|
||||
|
||||
Further instructions must be followed in order to build and set up the library in
|
||||
any Unix-like operation system (Linux, FreeBSD, MacOS):
|
||||
-# Download source codes from zfoneproject.com
|
||||
-# Decompress the archive libzrtp-0.3.X.tzr.gz : tar -zxf ./libzrtp-0.3.X.tzr.gz
|
||||
and open cd libzrtp-0.3.X directory
|
||||
-# Configure the library: ./configure (use necessary compollation flags)
|
||||
-# Build the library: make
|
||||
-# If you get the errors during, please send a full log of configuration
|
||||
and building process to zfone-bugs@philzimmermann.com. Please specify
|
||||
the operation system, hardware platform, compiler version and other
|
||||
environmental parameters. Any proposals will be taken into account when
|
||||
developing new versions.
|
||||
-# After te library successful building, run setup (installation): ./make install
|
||||
-# to build test unites run ./configure with CFLAGS="-DBUILD_DEBUG_LOG
|
||||
-DBUILD_WITH_CFUNC -DBUILD_EMPTY_CACHE -DBUILD_EMPTY_TIMER and parameter
|
||||
--enable-test. After successful configuration start test: "make check".
|
||||
This command will build and run all test (bnlib test, srtp tests and
|
||||
libzrtp tests) Don't forget to rebuild library without -DBUILD_EMPTY_CACHE
|
||||
-DBUILD_EMPTY_TIMER.
|
||||
|
||||
For library configuration and installation on Windows platform the followinf
|
||||
files should be used:
|
||||
-# For installation with the Microsoft Visual Studio v6 use:
|
||||
- libzrtp.dsw
|
||||
- libzrtp.dsp
|
||||
- test\libzrtp_test.dsp
|
||||
-# For installation with the Microsoft Visual Studio v7 use:
|
||||
- libzrtp.sln
|
||||
- libzrtp.vcproj
|
||||
- test\libzrtp_test.vcproj
|
||||
-# If you want to build libzrtp in Windows kernel mode you mast use MAKEFILE.WIN32
|
||||
|
||||
For 32-bit machines bnlib contains assemble file lbn80386.asm. The assembler is
|
||||
needed to install it. The compiler ml is in the stracture of VS7, if you use VS6
|
||||
you can use Microsoft Macro Assembler (http://www.masm32.com/masmdl.htm). To
|
||||
compile this file you have define in properties: <c>Commands: <dir>\ml /c /Cx
|
||||
/coff /Fo $(TargetDir)\$(InputName).obj $(InputPath) Outputs: $(TargetDir)\$(InputName).obj
|
||||
</c> where <dir> is a complete path to the compiler.
|
||||
|
||||
Possible problems and methods of the solution:
|
||||
-# Some environment problems with automatic definition of architecture
|
||||
and byte-order are possible at library building. We recommend before building
|
||||
of libZRTP on a new program or hardware platform uncomment the test-unite at
|
||||
the end of the file \c zrtp_syste.h. If there is a mistakes in definition of
|
||||
architecture or byte-order use zrtp_system.h manual configuration following
|
||||
the comments.
|
||||
|
||||
Please take into account the fact that libzrtp developers are not responsible for
|
||||
external modules of the library. In other words, the functionality of the library
|
||||
was tested under majority of widespread Linux and Windows systems, but warnings
|
||||
can still occur during these modules compilation.
|
||||
|
||||
If you have faced with some problems during configuration or installing of the
|
||||
library - send a report to the Support Service. If you installed library on the
|
||||
platform not described here, please contact the Support Service. We are
|
||||
interested very much to get know the results of testing on new platforms. We
|
||||
will carefully examine all proposals and will do our best to realize them in new
|
||||
library versions.
|
||||
|
||||
|
||||
Compilers and Options
|
||||
=================
|
||||
|
||||
Some systems require unusual options for compilation or linking that
|
||||
the `configure' script does not know about. You can give `configure'
|
||||
initial values for variables by setting them in the environment. Using
|
||||
a Bourne-compatible shell, you can do that on the command line like
|
||||
this:
|
||||
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
|
||||
|
||||
Or on systems that have the `env' program, you can do it like this:
|
||||
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
=================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you must use a version of `make' that
|
||||
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
If you have to use a `make' that does not supports the `VPATH'
|
||||
variable, you have to compile the package for one architecture at a time
|
||||
in the source code directory. After you have installed the package for
|
||||
one architecture, use `make distclean' before reconfiguring for another
|
||||
architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' will install the package's files in
|
||||
`/usr/local/include', `/usr/local/lib', etc. You can specify an
|
||||
installation prefix other than `/usr/local' by giving `configure' the
|
||||
option `--prefix=PATH'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
give `configure' the option `--exec-prefix=PATH', the package will use
|
||||
PATH as the prefix for installing programs and libraries.
|
||||
Documentation and other data files will still use the regular prefix.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' can not figure out
|
||||
automatically, but needs to determine by the type of host the package
|
||||
will run on. Usually `configure' can figure that out, but if it prints
|
||||
a message saying it can not guess the host type, give it the
|
||||
`--host=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name with three fields:
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the host type.
|
||||
|
||||
If you are building compiler tools for cross-compiling, you can also
|
||||
use the `--target=TYPE' option to select the type of system they will
|
||||
produce code for and the `--build=TYPE' option to select the type of
|
||||
system on which you are compiling the package.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share,
|
||||
you can create a site shell script called `config.site' that gives
|
||||
default values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
will cause the specified gcc to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
Operation Controls
|
||||
==================
|
||||
|
||||
`configure' recognizes the following options to control how it
|
||||
operates.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Use and save the results of the tests in FILE instead of
|
||||
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
|
||||
debugging `configure'.
|
||||
|
||||
`--help'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made.
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`--version'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options.
|
|
@ -1,115 +0,0 @@
|
|||
#
|
||||
# Copyright (c) 2006-2007 Philip R. Zimmermann. All rights reserved.
|
||||
# Contact: http://philzimmermann.com
|
||||
#
|
||||
# Viktor Krikun <v.krikun@soft-industry.com> <v.krikun@gmail.com>
|
||||
#
|
||||
|
||||
libzrtp_includedir=$(includedir)/libzrtp
|
||||
libzrtp_include_HEADERS = \
|
||||
$(top_srcdir)/include/zrtp.h \
|
||||
$(top_srcdir)/include/zrtp_base.h \
|
||||
$(top_srcdir)/include/zrtp_config.h \
|
||||
$(top_srcdir)/include/zrtp_config_user.h \
|
||||
$(top_srcdir)/include/zrtp_config_unix.h \
|
||||
$(top_srcdir)/include/zrtp_crypto.h \
|
||||
$(top_srcdir)/include/zrtp_ec.h \
|
||||
$(top_srcdir)/include/zrtp_engine.h \
|
||||
$(top_srcdir)/include/zrtp_error.h \
|
||||
$(top_srcdir)/include/zrtp_iface.h \
|
||||
$(top_srcdir)/include/zrtp_iface_scheduler.h \
|
||||
$(top_srcdir)/include/zrtp_iface_cache.h \
|
||||
$(top_srcdir)/include/zrtp_iface_system.h \
|
||||
$(top_srcdir)/include/zrtp_legal.h \
|
||||
$(top_srcdir)/include/zrtp_list.h \
|
||||
$(top_srcdir)/include/zrtp_log.h \
|
||||
$(top_srcdir)/include/zrtp_pbx.h \
|
||||
$(top_srcdir)/include/zrtp_protocol.h \
|
||||
$(top_srcdir)/include/zrtp_srtp.h \
|
||||
$(top_srcdir)/include/zrtp_srtp_builtin.h \
|
||||
$(top_srcdir)/include/zrtp_string.h \
|
||||
$(top_srcdir)/include/zrtp_types.h \
|
||||
$(top_srcdir)/include/zrtp_version.h \
|
||||
\
|
||||
$(top_srcdir)/third_party/bnlib/bn.h \
|
||||
\
|
||||
$(top_srcdir)/third_party/bgaes/aes.h \
|
||||
$(top_srcdir)/third_party/bgaes/aesopt.h \
|
||||
$(top_srcdir)/third_party/bgaes/aestab.h \
|
||||
$(top_srcdir)/third_party/bgaes/bg2zrtp.h \
|
||||
$(top_srcdir)/third_party/bgaes/brg_types.h \
|
||||
$(top_srcdir)/third_party/bgaes/sha1.h \
|
||||
$(top_srcdir)/third_party/bgaes/sha2.h
|
||||
|
||||
lib_LIBRARIES = libzrtp.a
|
||||
|
||||
libzrtp_a_CPPFLAGS = \
|
||||
-I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/. \
|
||||
-I$(top_srcdir)/third_party/bgaes \
|
||||
-I$(top_srcdir)/third_party/bnlib
|
||||
|
||||
libzrtp_a_LIBADD = $(top_srcdir)/third_party/bnlib/libbn.a
|
||||
|
||||
libzrtp_a_SOURCES = $(top_srcdir)/src/zrtp.c \
|
||||
$(top_srcdir)/src/zrtp_crc.c \
|
||||
$(top_srcdir)/src/zrtp_crypto_aes.c \
|
||||
$(top_srcdir)/src/zrtp_crypto_atl.c \
|
||||
$(top_srcdir)/src/zrtp_crypto_ec.c \
|
||||
$(top_srcdir)/src/zrtp_crypto_ecdh.c \
|
||||
$(top_srcdir)/src/zrtp_crypto_hash.c \
|
||||
$(top_srcdir)/src/zrtp_crypto_pk.c \
|
||||
$(top_srcdir)/src/zrtp_crypto_sas.c \
|
||||
$(top_srcdir)/src/zrtp_datatypes.c \
|
||||
$(top_srcdir)/src/zrtp_engine.c \
|
||||
$(top_srcdir)/src/zrtp_iface_scheduler.c \
|
||||
$(top_srcdir)/src/zrtp_iface_sys.c \
|
||||
$(top_srcdir)/src/zrtp_initiator.c \
|
||||
$(top_srcdir)/src/zrtp_legal.c \
|
||||
$(top_srcdir)/src/zrtp_list.c \
|
||||
$(top_srcdir)/src/zrtp_log.c \
|
||||
$(top_srcdir)/src/zrtp_pbx.c \
|
||||
$(top_srcdir)/src/zrtp_protocol.c \
|
||||
$(top_srcdir)/src/zrtp_responder.c \
|
||||
$(top_srcdir)/src/zrtp_rng.c \
|
||||
$(top_srcdir)/src/zrtp_srtp_builtin.c \
|
||||
$(top_srcdir)/src/zrtp_string.c \
|
||||
$(top_srcdir)/src/zrtp_utils.c \
|
||||
$(top_srcdir)/src/zrtp_utils_proto.c \
|
||||
\
|
||||
$(top_srcdir)/third_party/bgaes/aes_modes.c \
|
||||
$(top_srcdir)/third_party/bgaes/aescrypt.c \
|
||||
$(top_srcdir)/third_party/bgaes/aeskey.c \
|
||||
$(top_srcdir)/third_party/bgaes/aestab.c \
|
||||
$(top_srcdir)/third_party/bgaes/sha1.c \
|
||||
$(top_srcdir)/third_party/bgaes/sha2.c\
|
||||
\
|
||||
$(top_srcdir)/src/zrtp_iface_cache.c
|
||||
$(top_srcdir)/src/zrtp_engine_driven.c
|
||||
|
||||
check_PROGRAMS = cache_test
|
||||
|
||||
cache_test_CPPFLAGS = -I$(top_srcdir)/include \
|
||||
-I$(top_srcdir)/. \
|
||||
-I$(top_srcdir)/test \
|
||||
-I$(top_srcdir)/test/cmockery \
|
||||
-I$(top_srcdir)/third_party/bgaes \
|
||||
-I$(top_srcdir)/third_party/bnlib
|
||||
|
||||
cache_test_SOURCES = $(top_srcdir)/test/cmockery/cmockery.c \
|
||||
$(top_srcdir)/test/cache_test.c
|
||||
cache_test_LDADD = libzrtp.a $(top_srcdir)/third_party/bnlib/libbn.a -lpthread
|
||||
|
||||
SUBDIRS = third_party/bnlib
|
||||
|
||||
if HAVE_DOXYGEN
|
||||
doc: .stamp-doc
|
||||
.stamp-doc:
|
||||
(cd doc && $(DOXYGEN) Doxyfile)
|
||||
touch $@
|
||||
endif
|
||||
|
||||
uninstall:
|
||||
rm -rf $(prefix)/include/libzrtp
|
||||
rm -f $(prefix)/lib/libzrtp.a
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
#
|
||||
# libZRTP SDK library, implements the ZRTP secure VoIP protocol.
|
||||
# Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
# Contact: http://philzimmermann.com
|
||||
# For licensing and other legal details, see the file zrtp_legal.c.
|
||||
#
|
||||
|
||||
- Check HTML Documentation ./doc
|
||||
- Visit the Zfone Project Home Page http://zfoneproject.com/
|
||||
- Report bugs via the Zfone Bugs Page http://zfoneproject.com/bugs.html
|
|
@ -1,94 +0,0 @@
|
|||
AC_DEFUN([AX_PREFIX_CONFIG_H],[dnl
|
||||
AC_BEFORE([AC_CONFIG_HEADERS],[$0])dnl
|
||||
AC_CONFIG_COMMANDS([ifelse($1,,$PACKAGE-config.h,$1)],[dnl
|
||||
AS_VAR_PUSHDEF([_OUT],[ac_prefix_conf_OUT])dnl
|
||||
AS_VAR_PUSHDEF([_DEF],[ac_prefix_conf_DEF])dnl
|
||||
AS_VAR_PUSHDEF([_PKG],[ac_prefix_conf_PKG])dnl
|
||||
AS_VAR_PUSHDEF([_LOW],[ac_prefix_conf_LOW])dnl
|
||||
AS_VAR_PUSHDEF([_UPP],[ac_prefix_conf_UPP])dnl
|
||||
AS_VAR_PUSHDEF([_INP],[ac_prefix_conf_INP])dnl
|
||||
m4_pushdef([_script],[conftest.prefix])dnl
|
||||
m4_pushdef([_symbol],[m4_cr_Letters[]m4_cr_digits[]_])dnl
|
||||
_OUT=`echo ifelse($1, , $PACKAGE-config.h, $1)`
|
||||
_DEF=`echo _$_OUT | sed -e "y:m4_cr_letters:m4_cr_LETTERS[]:" -e "s/@<:@^m4_cr_Letters@:>@/_/g"`
|
||||
_PKG=`echo ifelse($2, , $PACKAGE, $2)`
|
||||
_LOW=`echo _$_PKG | sed -e "y:m4_cr_LETTERS-:m4_cr_letters[]_:"`
|
||||
_UPP=`echo $_PKG | sed -e "y:m4_cr_letters-:m4_cr_LETTERS[]_:" -e "/^@<:@m4_cr_digits@:>@/s/^/_/"`
|
||||
_INP=`echo "ifelse($3,,,$3)" | sed -e 's/ *//'`
|
||||
if test ".$_INP" = "."; then
|
||||
for ac_file in : $CONFIG_HEADERS; do test "_$ac_file" = _: && continue
|
||||
case "$ac_file" in
|
||||
*.h) _INP=$ac_file ;;
|
||||
*)
|
||||
esac
|
||||
test ".$_INP" != "." && break
|
||||
done
|
||||
fi
|
||||
if test ".$_INP" = "."; then
|
||||
case "$_OUT" in
|
||||
*/*) _INP=`basename "$_OUT"`
|
||||
;;
|
||||
*-*) _INP=`echo "$_OUT" | sed -e "s/@<:@_symbol@:>@*-//"`
|
||||
;;
|
||||
*) _INP=config.h
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test -z "$_PKG" ; then
|
||||
AC_MSG_ERROR([no prefix for _PREFIX_PKG_CONFIG_H])
|
||||
else
|
||||
if test ! -f "$_INP" ; then if test -f "$srcdir/$_INP" ; then
|
||||
_INP="$srcdir/$_INP"
|
||||
fi fi
|
||||
AC_MSG_NOTICE(creating $_OUT - prefix $_UPP for $_INP defines)
|
||||
if test -f $_INP ; then
|
||||
echo "s/^@%:@undef *\\(@<:@m4_cr_LETTERS[]_@:>@\\)/@%:@undef $_UPP""_\\1/" > _script
|
||||
echo "s/^@%:@undef *\\(@<:@m4_cr_letters@:>@\\)/@%:@undef $_LOW""_\\1/" >> _script
|
||||
echo "s/^@%:@def[]ine *\\(@<:@m4_cr_LETTERS[]_@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_UPP""_\\1 \\" >> _script
|
||||
echo "@%:@def[]ine $_UPP""_\\1 \\2 \\" >> _script
|
||||
echo "@%:@endif/" >>_script
|
||||
echo "s/^@%:@def[]ine *\\(@<:@m4_cr_letters@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_LOW""_\\1 \\" >> _script
|
||||
echo "@%:@define $_LOW""_\\1 \\2 \\" >> _script
|
||||
echo "@%:@endif/" >> _script
|
||||
# now executing _script on _DEF input to create _OUT output file
|
||||
echo "@%:@ifndef $_DEF" >$tmp/pconfig.h
|
||||
echo "@%:@def[]ine $_DEF 1" >>$tmp/pconfig.h
|
||||
echo ' ' >>$tmp/pconfig.h
|
||||
echo /'*' $_OUT. Generated automatically at end of configure. '*'/ >>$tmp/pconfig.h
|
||||
|
||||
sed -f _script $_INP >>$tmp/pconfig.h
|
||||
echo ' ' >>$tmp/pconfig.h
|
||||
echo '/* once:' $_DEF '*/' >>$tmp/pconfig.h
|
||||
echo "@%:@endif" >>$tmp/pconfig.h
|
||||
if cmp -s $_OUT $tmp/pconfig.h 2>/dev/null; then
|
||||
AC_MSG_NOTICE([$_OUT is unchanged])
|
||||
else
|
||||
ac_dir=`AS_DIRNAME(["$_OUT"])`
|
||||
AS_MKDIR_P(["$ac_dir"])
|
||||
rm -f "$_OUT"
|
||||
mv $tmp/pconfig.h "$_OUT"
|
||||
fi
|
||||
cp _script _configs.sed
|
||||
else
|
||||
AC_MSG_ERROR([input file $_INP does not exist - skip generating $_OUT])
|
||||
fi
|
||||
rm -f conftest.*
|
||||
fi
|
||||
m4_popdef([_symbol])dnl
|
||||
m4_popdef([_script])dnl
|
||||
AS_VAR_POPDEF([_INP])dnl
|
||||
AS_VAR_POPDEF([_UPP])dnl
|
||||
AS_VAR_POPDEF([_LOW])dnl
|
||||
AS_VAR_POPDEF([_PKG])dnl
|
||||
AS_VAR_POPDEF([_DEF])dnl
|
||||
AS_VAR_POPDEF([_OUT])dnl
|
||||
],[PACKAGE="$PACKAGE"])])
|
||||
|
||||
dnl implementation note: a bug report (31.5.2005) from Marten Svantesson points
|
||||
dnl out a problem where `echo "\1"` results in a Control-A. The unix standard
|
||||
dnl http://www.opengroup.org/onlinepubs/000095399/utilities/echo.html
|
||||
dnl defines all backslash-sequences to be inherently non-portable asking
|
||||
dnl for replacement mit printf. Some old systems had problems with that
|
||||
dnl one either. However, the latest libtool (!) release does export an $ECHO
|
||||
dnl (and $echo) that does the right thing - just one question is left: what
|
||||
dnl was the first version to have it? Is it greater 2.58 ?
|
|
@ -1,14 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
reconf () {
|
||||
aclocal
|
||||
mkdir -p config
|
||||
libtoolize --copy --automake
|
||||
autoconf
|
||||
autoheader
|
||||
automake --no-force --add-missing --copy
|
||||
}
|
||||
|
||||
(cd third_party/bnlib && ./bootstrap.sh)
|
||||
reconf
|
||||
|
|
@ -1,97 +0,0 @@
|
|||
#
|
||||
# Copyright (c) 2006-2011 Philip R. Zimmermann. All rights reserved.
|
||||
# Contact: http://philzimmermann.com
|
||||
# For licensing and other legal details, see the file zrtp_legal.c.
|
||||
#
|
||||
# Viktor Krikun <v.krikun at zfoneproject.com>
|
||||
#
|
||||
|
||||
AC_INIT([libzrtp], [1.2.0])
|
||||
|
||||
AC_CONFIG_AUX_DIR(config)
|
||||
AC_CONFIG_HEADER(config/config.h)
|
||||
|
||||
# Checks for target OS
|
||||
AC_CANONICAL_TARGET
|
||||
|
||||
case $target_os in
|
||||
aix*) ;;
|
||||
*mingw* | *cygw* | *win32* | *w32* )
|
||||
echo "------- START libzrtp configuration for Windows platform ------------"
|
||||
;;
|
||||
*darwin*)
|
||||
echo "------- START libzrtp configuration for Darwin platform ------------"
|
||||
;;
|
||||
*freebsd2* | *freebsd* | *netbsd* | *openbsd* | *osf[12]*)
|
||||
echo "------- START libzrtp configuration for BSD platform ------------"
|
||||
;;
|
||||
hpux* | irix* | linuxaout* | linux* | osf* | solaris2* | sunos4*)
|
||||
echo "------- START libzrtp configuration for Linux platform ------------"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
AM_INIT_AUTOMAKE
|
||||
AX_PREFIX_CONFIG_H(include/zrtp_config_unix.h,ZRTP,config/config.h)
|
||||
|
||||
CFLAGS="$CFLAGS -std=c99 -O2 -g3 -Wall -Wextra -Wno-unused-parameter -fno-strict-aliasing -fPIC -DZRTP_AUTOMAKE=1"
|
||||
|
||||
# Configuring external libraries
|
||||
echo "========================= configuring bnlib =============================="
|
||||
cd third_party/bnlib
|
||||
./configure CFLAGS="$CFLAGS"
|
||||
cd ../..
|
||||
echo "================================ done ==================================="
|
||||
|
||||
# Checks for programs.
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
AC_PROG_RANLIB
|
||||
AM_PROG_CC_C_O
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([linux/version.h endian.h])
|
||||
AC_CHECK_HEADERS([errno.h])
|
||||
AC_CHECK_HEADERS([asm/types.h])
|
||||
AC_CHECK_HEADERS([stdlib.h stdint.h stdarg.h])
|
||||
AC_CHECK_HEADERS([string.h strings.h])
|
||||
AC_CHECK_HEADERS([stdio.h unistd.h])
|
||||
AC_CHECK_HEADERS([inttypes.h sys/inttypes.h sys/types.h machine/types.h])
|
||||
AC_CHECK_HEADERS([pthread.h semaphore.h sys/time.h fcntl.h])
|
||||
|
||||
AC_CHECK_TYPES([int8_t,uint8_t,int16_t,uint16_t,int32_t,uint32_t,uint64_t,int64_t])
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
|
||||
# Checks for library functions.
|
||||
AC_CHECK_FUNCS([memset memcpy malloc free])
|
||||
AC_CHECK_FUNCS([usleep nanosleep])
|
||||
AC_CHECK_FUNCS([fopen fread])
|
||||
AC_CHECK_FUNCS([pthread_mutex_lock pthread_mutex_unlock pthread_mutex_init pthread_mutex_destroy])
|
||||
AC_CHECK_FUNCS([pthread_attr_init pthread_attr_setdetachstate pthread_create])
|
||||
AC_CHECK_FUNCS([sem_wait sem_trywait sem_post sem_unlink sem_destroy sem_open sem_init])
|
||||
|
||||
AC_CHECK_LIB([pthread], [main], [LIBS="-lpthread $LIBS"], [echo " Couldn't find library pthread";])
|
||||
|
||||
# Other
|
||||
AC_DEFINE(PRAGMA_PACK_PUSH,[#pragma pack(push, 1)],[Define pragma pack(push) for your platform])
|
||||
AC_DEFINE(PRAGMA_PACK_POP,[#pragma pack(pop)],[Define pragma pack(pop) for your platform])
|
||||
AC_DEFINE(INLINE,[static inline],[Define inline construction for your platform])
|
||||
|
||||
#
|
||||
# Documentation
|
||||
#
|
||||
AM_CONDITIONAL([HAVE_DOXYGEN], [false])
|
||||
AC_CHECK_PROGS([DOXYGEN], [doxygen])
|
||||
if test -z "$DOXYGEN"; then
|
||||
AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])
|
||||
else
|
||||
AM_CONDITIONAL([HAVE_DOXYGEN], [true])
|
||||
AC_CONFIG_FILES([doc/Doxyfile])
|
||||
fi
|
||||
|
||||
#
|
||||
# Generate Makefiles
|
||||
AC_OUTPUT([Makefile])
|
|
@ -1,9 +0,0 @@
|
|||
cd ../../doc
|
||||
rm -f docs.tar.gz
|
||||
rm -rf libzrtp-doc
|
||||
echo "=================> start doxygen."
|
||||
doxygen > /dev/null 2>&1
|
||||
mkdir libzrtp-doc
|
||||
cp -Rf ./out/html/* ./libzrtp-doc
|
||||
tar -zcvf ./libzrtp-doc.tar.gz ./libzrtp-doc >> /dev/null
|
||||
rm -rf libzrtp-doc
|
|
@ -1,421 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use Getopt::Std;
|
||||
|
||||
getopts("l:ehs", \%args);
|
||||
|
||||
if ($args{h})
|
||||
{
|
||||
print "Usage: create_pack.pl [OPTION]...\n\n";
|
||||
print " -l file write down list of files\n";
|
||||
print " -e enterprise version\n";
|
||||
print " -s dont add version suffix to package name\n";
|
||||
print " -h this help\n\n";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
#to create list of files:
|
||||
if ($args{l})
|
||||
{
|
||||
create_files_list($args{l});
|
||||
exit 1;
|
||||
}
|
||||
|
||||
$enterprise = 0;
|
||||
if ($args{e})
|
||||
{
|
||||
$enterprise = 1;
|
||||
}
|
||||
|
||||
if ($args{s})
|
||||
{
|
||||
$packdir="libzrtp";
|
||||
}
|
||||
else
|
||||
{
|
||||
$LIBZRTP_VERSION=`cat ../../include/zrtp_version.h | grep 'LIBZRTP_VERSION_STR' | awk '{print \$3, \$4}' | sed 's/"v\\(.*\\) \\(.*\\)"/\\1.\\2/'`;
|
||||
chomp($LIBZRTP_VERSION);
|
||||
$packdir="libzrtp-$LIBZRTP_VERSION";
|
||||
}
|
||||
|
||||
if (-d $packdir)
|
||||
{
|
||||
`rm -rf $packdir`
|
||||
}
|
||||
|
||||
mkdir $packdir;
|
||||
create_array();
|
||||
|
||||
foreach $file(@array)
|
||||
{
|
||||
if (!$enterprise &&
|
||||
(($file =~ m/\/enterprise/i) ||
|
||||
($file =~ m/_ec.*(proj|sln)/i) ||
|
||||
($file =~ m/_EC.*(WIN)/i) ||
|
||||
($file =~ m/\/xcode/i)))
|
||||
{
|
||||
print "$file skipped\n";
|
||||
next;
|
||||
}
|
||||
|
||||
$path = "../../" . $file;
|
||||
if (!-e $path)
|
||||
{
|
||||
print "[ERROR]: file $file doesn't exist!\n";
|
||||
`rm -rf $packdir`;
|
||||
exit -1;
|
||||
}
|
||||
if (-d $path)
|
||||
{
|
||||
mkdir "$packdir/$file";
|
||||
}
|
||||
else
|
||||
{
|
||||
# print "copying $path file\n";
|
||||
`cp $path $packdir/$file`
|
||||
}
|
||||
}
|
||||
|
||||
if (!$enterprise)
|
||||
{
|
||||
`cp -f ../../projects/win/libzrtp_not_ec.vcproj $packdir/projects/win/libzrtp.vcproj`;
|
||||
`cp -f ../../projects/win_ce/libzrtp_wince_not_ec.vcproj $packdir/projects/win_ce/libzrtp_wince.vcproj`;
|
||||
`cp -f ../../projects/win_kernel/MAKEFILE_NOT_EC.WIN64 $packdir/projects/win_kernel/MAKEFILE.WIN64`;
|
||||
`cp -f ../../projects/win_kernel/MAKEFILE_NOT_EC.WIN32 $packdir/projects/win_kernel/MAKEFILE.WIN32`;
|
||||
|
||||
`rm $packdir/include/zrtp_ec.h`;
|
||||
# `rm $packdir/include/zrtp_iface_cache.h`;
|
||||
`rm $packdir/src/zrtp_crypto_ecdsa.c`;
|
||||
`rm $packdir/src/zrtp_crypto_ec.c`;
|
||||
# `rm $packdir/src/zrtp_engine_driven.c`;
|
||||
`rm $packdir/src/zrtp_crypto_ecdh.c`;
|
||||
# `rm $packdir/src/zrtp_iface_cache.c`;
|
||||
}
|
||||
|
||||
|
||||
`find $packdir -name "._*" -delete`;
|
||||
|
||||
$pack_name = $packdir;
|
||||
if ($enterprise)
|
||||
{
|
||||
$pack_name = $pack_name . "-ec";
|
||||
}
|
||||
|
||||
$system = `uname -a`;
|
||||
if ($system =~ m/darwin/i)
|
||||
{
|
||||
`rm -rf $pack_name.zip`;
|
||||
`zip -r $pack_name.zip $packdir`;
|
||||
}
|
||||
else
|
||||
{
|
||||
`rm -rf $pack_name.tar.gz`;
|
||||
`tar -zcvf $pack_name.tar.gz $packdir`;
|
||||
}
|
||||
`rm -rf $packdir`;
|
||||
print "package was created\n";
|
||||
|
||||
#for item in $array; do
|
||||
# echo "item:"$'\t'"$item"
|
||||
|
||||
sub create_files_list()
|
||||
{
|
||||
$path = `pwd`;
|
||||
chop($path);
|
||||
`cd ../..;find . -not -path *svn* -print | awk '{printf \"\\t\\t\\"%s\\",\\n\", \$1} ' > $path/$_[0];cd $path`;
|
||||
}
|
||||
|
||||
|
||||
sub create_array()
|
||||
{
|
||||
@array =
|
||||
(
|
||||
"./ChangeLog",
|
||||
"./README",
|
||||
"./AUTHORS",
|
||||
"./projects",
|
||||
"./projects/gnu",
|
||||
"./projects/gnu/Makefile.am",
|
||||
"./projects/gnu/Makefile.in",
|
||||
"./projects/gnu/COPYING",
|
||||
"./projects/gnu/aclocal.m4",
|
||||
"./projects/gnu/configure",
|
||||
"./projects/gnu/README",
|
||||
"./projects/gnu/AUTHORS",
|
||||
"./projects/gnu/configure.in",
|
||||
"./projects/gnu/INSTALL",
|
||||
"./projects/gnu/autoreconf.sh",
|
||||
"./projects/gnu/config",
|
||||
"./projects/gnu/config/config.guess",
|
||||
"./projects/gnu/config/config.sub",
|
||||
"./projects/gnu/config/config.h.in",
|
||||
"./projects/gnu/config/install-sh",
|
||||
"./projects/gnu/config/missing",
|
||||
"./projects/gnu/config/prefix_config.m4",
|
||||
"./projects/gnu/config/depcomp",
|
||||
"./projects/gnu/NEWS",
|
||||
"./projects/gnu/Makefile.in",
|
||||
"./projects/gnu/build",
|
||||
"./projects/gnu/build/Makefile.am",
|
||||
"./projects/gnu/build/Makefile.in",
|
||||
"./projects/gnu/build/test",
|
||||
"./projects/gnu/build/test/Makefile.am",
|
||||
"./projects/gnu/build/test/Makefile.in",
|
||||
"./projects/gnu/ChangeLog",
|
||||
"./projects/xcode",
|
||||
"./projects/xcode/libzrtp.xcodeproj",
|
||||
"./projects/xcode/libzrtp.xcodeproj/project.pbxproj",
|
||||
"./projects/xcode/libzrtp_test.xcodeproj",
|
||||
"./projects/xcode/libzrtp_test.xcodeproj/project.pbxproj",
|
||||
"./projects/win_kernel",
|
||||
"./projects/win_kernel/MAKEFILE.WIN64",
|
||||
"./projects/win_kernel/MAKEFILE.WIN32",
|
||||
"./projects/win",
|
||||
"./projects/win/libzrtp.vcproj",
|
||||
"./projects/win/libzrtp.sln",
|
||||
"./projects/win/libzrtp_test.vcproj",
|
||||
"./projects/win_ce",
|
||||
"./projects/win_ce/libzrtp_test_wince.vcproj",
|
||||
"./projects/win_ce/libzrtp_wince.sln",
|
||||
"./projects/win_ce/libzrtp_wince.vcproj",
|
||||
"./projects/symbian",
|
||||
"./projects/symbian/bld.bat",
|
||||
"./projects/symbian/bld.inf",
|
||||
"./projects/symbian/bldgcce.bat",
|
||||
"./projects/symbian/libzrtp.mmp",
|
||||
"./projects/symbian/zrtp_iface_symb.cpp",
|
||||
"./src",
|
||||
"./src/zrtp.c",
|
||||
"./src/zrtp_crc.c",
|
||||
"./src/zrtp_crypto_aes.c",
|
||||
"./src/zrtp_crypto_atl.c",
|
||||
"./src/zrtp_crypto_hash.c",
|
||||
"./src/zrtp_crypto_pk.c",
|
||||
"./src/zrtp_crypto_sas.c",
|
||||
"./src/zrtp_datatypes.c",
|
||||
"./src/zrtp_engine.c",
|
||||
"./src/zrtp_iface_scheduler.c",
|
||||
"./src/zrtp_iface_sys.c",
|
||||
"./src/zrtp_initiator.c",
|
||||
"./src/zrtp_legal.c",
|
||||
"./src/zrtp_list.c",
|
||||
"./src/zrtp_log.c",
|
||||
"./src/zrtp_pbx.c",
|
||||
"./src/zrtp_protocol.c",
|
||||
"./src/zrtp_responder.c",
|
||||
"./src/zrtp_rng.c",
|
||||
"./src/zrtp_srtp_builtin.c",
|
||||
"./src/zrtp_srtp_dm.c",
|
||||
"./src/zrtp_string.c",
|
||||
"./src/zrtp_utils.c",
|
||||
"./src/zrtp_utils_proto.c",
|
||||
"./src/zrtp_crypto_ecdsa.c",
|
||||
"./src/zrtp_crypto_ec.c",
|
||||
"./src/zrtp_engine_driven.c",
|
||||
"./src/zrtp_crypto_ecdh.c",
|
||||
"./src/zrtp_iface_cache.c",
|
||||
"./doc",
|
||||
"./include",
|
||||
"./include/zrtp.h",
|
||||
"./include/zrtp_base.h",
|
||||
"./include/zrtp_config.h",
|
||||
"./include/zrtp_config_user.h",
|
||||
"./include/zrtp_config_win.h",
|
||||
"./include/zrtp_config_symbian.h",
|
||||
"./include/zrtp_crypto.h",
|
||||
"./include/zrtp_engine.h",
|
||||
"./include/zrtp_error.h",
|
||||
"./include/zrtp_ec.h",
|
||||
"./include/zrtp_iface.h",
|
||||
"./include/zrtp_iface_cache.h",
|
||||
"./include/zrtp_iface_system.h",
|
||||
"./include/zrtp_iface_scheduler.h",
|
||||
"./include/zrtp_legal.h",
|
||||
"./include/zrtp_list.h",
|
||||
"./include/zrtp_log.h",
|
||||
"./include/zrtp_pbx.h",
|
||||
"./include/zrtp_protocol.h",
|
||||
"./include/zrtp_srtp.h",
|
||||
"./include/zrtp_srtp_builtin.h",
|
||||
"./include/zrtp_string.h",
|
||||
"./include/zrtp_types.h",
|
||||
"./include/zrtp_version.h",
|
||||
"./third_party",
|
||||
"./third_party/bnlib",
|
||||
"./third_party/bnlib/lbnmem.c",
|
||||
"./third_party/bnlib/lbn00.c",
|
||||
"./third_party/bnlib/bn16.c",
|
||||
"./third_party/bnlib/bn32.c",
|
||||
"./third_party/bnlib/bn.c",
|
||||
"./third_party/bnlib/lbnppc.h",
|
||||
"./third_party/bnlib/bnsize00.h",
|
||||
"./third_party/bnlib/lbn32.h",
|
||||
"./third_party/bnlib/lbn80386.h",
|
||||
"./third_party/bnlib/lbn68020.h",
|
||||
"./third_party/bnlib/germtest",
|
||||
"./third_party/bnlib/jacobi.h",
|
||||
"./third_party/bnlib/bn00.c",
|
||||
"./third_party/bnlib/bnconfig.h",
|
||||
"./third_party/bnlib/lbn8086.h",
|
||||
"./third_party/bnlib/bntest00.c",
|
||||
"./third_party/bnlib/germain.c",
|
||||
"./third_party/bnlib/lbn960jx.h",
|
||||
"./third_party/bnlib/sizetest.c",
|
||||
"./third_party/bnlib/config.cache",
|
||||
"./third_party/bnlib/bn68000.c",
|
||||
"./third_party/bnlib/lbnalpha.h",
|
||||
"./third_party/bnlib/cputime.h",
|
||||
"./third_party/bnlib/legal.c",
|
||||
"./third_party/bnlib/configure.lineno",
|
||||
"./third_party/bnlib/configure",
|
||||
"./third_party/bnlib/bnprint.c",
|
||||
"./third_party/bnlib/bn8086.c",
|
||||
"./third_party/bnlib/lbn68020.c",
|
||||
"./third_party/bnlib/README.bntest",
|
||||
"./third_party/bnlib/lbn8086.asm",
|
||||
"./third_party/bnlib/lbn16.c",
|
||||
"./third_party/bnlib/lbn32.c",
|
||||
"./third_party/bnlib/legal.h",
|
||||
"./third_party/bnlib/configure.in",
|
||||
"./third_party/bnlib/lbn960jx.s",
|
||||
"./third_party/bnlib/prime.h",
|
||||
"./third_party/bnlib/bninit16.c",
|
||||
"./third_party/bnlib/bninit32.c",
|
||||
"./third_party/bnlib/files",
|
||||
"./third_party/bnlib/ppcasm.h",
|
||||
"./third_party/bnlib/lbn.h",
|
||||
"./third_party/bnlib/README.bn",
|
||||
"./third_party/bnlib/bnintern.doc",
|
||||
"./third_party/bnlib/sieve.c",
|
||||
"./third_party/bnlib/bn16.h",
|
||||
"./third_party/bnlib/bn32.h",
|
||||
"./third_party/bnlib/bnprint.h",
|
||||
"./third_party/bnlib/sieve.h",
|
||||
"./third_party/bnlib/cfg",
|
||||
"./third_party/bnlib/lbn68000.h",
|
||||
"./third_party/bnlib/lbnalpha.s",
|
||||
"./third_party/bnlib/bntest16.c",
|
||||
"./third_party/bnlib/bntest32.c",
|
||||
"./third_party/bnlib/cfg.debug",
|
||||
"./third_party/bnlib/lbnmem.h",
|
||||
"./third_party/bnlib/germtest.c",
|
||||
"./third_party/bnlib/prime.c",
|
||||
"./third_party/bnlib/lbn68000.c",
|
||||
"./third_party/bnlib/config.log",
|
||||
"./third_party/bnlib/germain.h",
|
||||
"./third_party/bnlib/kludge.h",
|
||||
"./third_party/bnlib/Makefile.in",
|
||||
"./third_party/bnlib/test",
|
||||
"./third_party/bnlib/test/primetest.c",
|
||||
"./third_party/bnlib/test/rsaglue.h",
|
||||
"./third_party/bnlib/test/randpool.c",
|
||||
"./third_party/bnlib/test/keys.c",
|
||||
"./third_party/bnlib/test/primes.doc",
|
||||
"./third_party/bnlib/test/rsatest.c",
|
||||
"./third_party/bnlib/test/posix.h",
|
||||
"./third_party/bnlib/test/legal.c",
|
||||
"./third_party/bnlib/test/README.rsatest",
|
||||
"./third_party/bnlib/test/rsaglue.c",
|
||||
"./third_party/bnlib/test/kbmsdos.c",
|
||||
"./third_party/bnlib/test/keygen.c",
|
||||
"./third_party/bnlib/test/README.dsatest",
|
||||
"./third_party/bnlib/test/types.h",
|
||||
"./third_party/bnlib/test/random.c",
|
||||
"./third_party/bnlib/test/md5.c",
|
||||
"./third_party/bnlib/test/userio.h",
|
||||
"./third_party/bnlib/test/md5.h",
|
||||
"./third_party/bnlib/test/dsatest.c",
|
||||
"./third_party/bnlib/test/pt.c",
|
||||
"./third_party/bnlib/test/dhtest.c",
|
||||
"./third_party/bnlib/test/sha.h",
|
||||
"./third_party/bnlib/test/keygen.h",
|
||||
"./third_party/bnlib/test/noise.h",
|
||||
"./third_party/bnlib/test/first.h",
|
||||
"./third_party/bnlib/test/README.dhtest",
|
||||
"./third_party/bnlib/test/randtest.c",
|
||||
"./third_party/bnlib/test/randpool.h",
|
||||
"./third_party/bnlib/test/random.h",
|
||||
"./third_party/bnlib/test/sha.c",
|
||||
"./third_party/bnlib/test/noise.c",
|
||||
"./third_party/bnlib/test/kbunix.c",
|
||||
"./third_party/bnlib/test/kludge.h",
|
||||
"./third_party/bnlib/test/keys.h",
|
||||
"./third_party/bnlib/test/usuals.h",
|
||||
"./third_party/bnlib/test/kb.h",
|
||||
"./third_party/bnlib/CHANGES",
|
||||
"./third_party/bnlib/bnconfig.hin",
|
||||
"./third_party/bnlib/lbn80386.asm",
|
||||
"./third_party/bnlib/jacobi.c",
|
||||
"./third_party/bnlib/config.status",
|
||||
"./third_party/bnlib/lbn16.h",
|
||||
"./third_party/bnlib/lbn80386.s",
|
||||
"./third_party/bnlib/lbn68360.s",
|
||||
"./third_party/bnlib/bignum-ARM",
|
||||
"./third_party/bnlib/bignum-ARM/lbnmem.c",
|
||||
"./third_party/bnlib/bignum-ARM/sha256_core.s",
|
||||
"./third_party/bnlib/bignum-ARM/lbnarm.h",
|
||||
"./third_party/bnlib/bignum-ARM/config.h",
|
||||
"./third_party/bnlib/bignum-ARM/cputime.h",
|
||||
"./third_party/bnlib/bignum-ARM/lbn16.c",
|
||||
"./third_party/bnlib/bignum-ARM/lbnarm.s",
|
||||
"./third_party/bnlib/bignum-ARM/README-small-memory",
|
||||
"./third_party/bnlib/bignum-ARM/sha256_arm.c",
|
||||
"./third_party/bnlib/bignum-ARM/lbn.h",
|
||||
"./third_party/bnlib/bignum-ARM/bntest16.c",
|
||||
"./third_party/bnlib/bignum-ARM/lbnmem.h",
|
||||
"./third_party/bnlib/bignum-ARM/kludge.h",
|
||||
"./third_party/bnlib/bignum-ARM/lbn16.h",
|
||||
"./third_party/bnlib/bn.doc",
|
||||
"./third_party/bnlib/lbnppc.c",
|
||||
"./third_party/bnlib/bn.h",
|
||||
"./third_party/bgaes",
|
||||
"./third_party/bgaes/sha1.h",
|
||||
"./third_party/bgaes/sha1.c",
|
||||
"./third_party/bgaes/brg_types.h",
|
||||
"./third_party/bgaes/aestab.c",
|
||||
"./third_party/bgaes/aestab.h",
|
||||
"./third_party/bgaes/sha2.h",
|
||||
"./third_party/bgaes/aes_modes.c",
|
||||
"./third_party/bgaes/aescrypt.c",
|
||||
"./third_party/bgaes/bg2zrtp.h",
|
||||
"./third_party/bgaes/aeskey.c",
|
||||
"./third_party/bgaes/sha2.c",
|
||||
"./third_party/bgaes/aes.h",
|
||||
"./third_party/bgaes/aesopt.h",
|
||||
"./test",
|
||||
"./test/README",
|
||||
"./test/pc",
|
||||
"./test/pc/zrtp_test_core.c",
|
||||
"./test/pc/zrtp_test_core.h",
|
||||
"./test/pc/zrtp_test_crypto.c",
|
||||
"./test/pc/zrtp_test_queue.c",
|
||||
"./test/pc/zrtp_test_queue.h",
|
||||
"./test/pc/zrtp_test_ui.c",
|
||||
"./test/win_ce",
|
||||
"./test/win_ce/libzrtp_test_GUI.cpp",
|
||||
"./test/win_ce/libzrtp_test_GUI.h",
|
||||
"./test/win_ce/libzrtp_test_GUI.ico",
|
||||
"./test/win_ce/libzrtp_test_GUIppc.rc",
|
||||
"./test/win_ce/libzrtp_test_GUIppc.rc2",
|
||||
"./test/win_ce/libzrtp_test_GUIsp.rc",
|
||||
"./test/win_ce/libzrtp_test_GUIsp.rc2",
|
||||
"./test/win_ce/ReadMe.txt",
|
||||
"./test/win_ce/resourceppc.h",
|
||||
"./test/win_ce/resourcesp.h",
|
||||
"./test/win_ce/stdafx.cpp",
|
||||
"./test/win_ce/stdafx.h",
|
||||
"./doc",
|
||||
"./doc/img",
|
||||
"./doc/manuals",
|
||||
"./doc/manuals/howto.dox",
|
||||
"./doc/manuals/main.dox",
|
||||
"./doc/manuals/rng.dox",
|
||||
"./doc/out",
|
||||
"./doc/out/html",
|
||||
"./doc/out/html/zfone.jpg",
|
||||
"./doc/Doxyfile",
|
||||
"./doc/doxygen.css",
|
||||
"./doc/footer.html",
|
||||
"./doc/header.html"
|
||||
)
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -1,223 +0,0 @@
|
|||
#
|
||||
# Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
# Contact: http://philzimmermann.com
|
||||
# For licensing and other legal details, see the file zrtp_legal.c.
|
||||
#
|
||||
# Viktor Krykun <v.krikun at zfoneproject.com>
|
||||
|
||||
/**
|
||||
* \file changelog.dox
|
||||
* \brief libzrtp ChangeLog
|
||||
*/
|
||||
|
||||
/*!
|
||||
\page changelog ChangeLog
|
||||
|
||||
****************************************************************************************************
|
||||
\section v120 libzrtp v1.20 build XXX (ZRTP RFC 6189, protocol 1.1)
|
||||
****************************************************************************************************
|
||||
|
||||
<b>This release is focused</b> on better ZRTP cache management.
|
||||
|
||||
***\subsection v120_changes API changes and Upgrade Instructions:
|
||||
*- Starting from v120 libzrtp uses global ZID for all outgoing connections. Local ZID should be
|
||||
specified in zrtp_global_t#zid and provided to zrtp_init(). App doesn't need to pass local ZID
|
||||
each time it creates new session via zrtp_session_init().
|
||||
*- Added zrtp_randstr2() which allow to generate random string before libzrtp being initialized.
|
||||
Can be handy to generate initial ZID. In normal circumstances, use zrtp_randstr() whenever possible.
|
||||
*- ZRTP cache API was completely redesigned. Look at zrtp_cache.h for more details.
|
||||
|
||||
|
||||
***\subsection v120_feature New features and improvements.
|
||||
*- new better cache management API.
|
||||
|
||||
***\subsection v120_bugs Bug fixes
|
||||
*- fixed bug when ZRTP forces enrolled endpoints to re-render SAS when sashash is empty.
|
||||
*- other minor bug fixes and improvements
|
||||
*- fixed bug when zrtp_signaling_hash_set() silently not accepted imported zrtp-hash-value with
|
||||
"buffer too small" debug output.
|
||||
|
||||
|
||||
****************************************************************************************************
|
||||
\section v091 DEVELOPERS BUILD Release Notes - libzrtp - Version 0.91 build XXX (ZRTP ID v16x, protocol 1.X)
|
||||
****************************************************************************************************
|
||||
\note To build Libzrtp Enterprise with Elliptic Cure Diffie-Hellman support on Unix platform, use
|
||||
<c>"./configure --enable-enterprise".</c> By default libzrtp will be build with no ECDH support.
|
||||
|
||||
<HR>
|
||||
***\subsection v091_feature New features and improvements.
|
||||
|
||||
***\subsection v091_bugs Bug fixes
|
||||
*- [LZRTP-179] Fixed bug in build scripts when commercial version of libzrtp v0.90 was built
|
||||
with ZRTP_ENABLE_EC set to 1 by default.
|
||||
*- [LZRTP-181] Fixed zrtp_init() crash on Mac OSX 10.6
|
||||
*- [LZRTP-182] Fixed libzrtp build issue on Free-BSD
|
||||
|
||||
|
||||
****************************************************************************************************
|
||||
\section v090 Release Notes - libzrtp - Version 0.90 build 577 (ZRTP ID v15x, protocol 1.1)
|
||||
****************************************************************************************************
|
||||
<HR>
|
||||
***\subsection v090_feature New features and improvements.
|
||||
*- [LZRTP-178] After the cache mismatch don't update the cache automatically, wait for the SAS verification. More details at this feature could be found in ZRTP ID section 4.6.1.1
|
||||
*- [LZRTP-151] Add secrets flags to \ref zrtp_info_t to allow user monitor secrets state
|
||||
*- [LZRTP-169] Check and optimize build process on Windows mingw and msys.
|
||||
|
||||
***\subsection v090_bugs Bug fixes
|
||||
*- [LZRTP-176] Added -fPIC flag to Linux and Mac builds to be able to link the library into 64bit applications.
|
||||
*- [LZRTP-175] Change SHA1 definition name to SRTP_SHA1 and move to private part of the API to eliminate ambiguity.
|
||||
*- [LZRTP-155] Session info should display current, updated value of the TTL, not the old one from previous negotiation.
|
||||
*- [LZRTP-177] Diffie-Hellman secret exponent for DH2K should be 256bits instead of 128.
|
||||
|
||||
|
||||
****************************************************************************************************
|
||||
\section v082 Release Notes - libzrtp - Version 0.82 build 540 (ZRTP ID v15, protocol 1.1)
|
||||
****************************************************************************************************
|
||||
<HR>
|
||||
Minor improvements. Zfone and libZRTP projects moved to public bug-tracking and wiki system.
|
||||
|
||||
***\subsection v082_feature New features and improvements.
|
||||
*- Improved libzrtp resistance to long delays during DH calculations on slow hardware.
|
||||
*- Structures Members alignment in Microsoft Visual Studio projects was changed from 1 byte to "Default".
|
||||
*- Implemented entropy collection from dropped RTP messages. Don't forget to store RNG seed when you done with libzrtp and upload it agan on next session.
|
||||
*- Implement default entropy collector for Win32 platform. RtlGenRandom() system call is used. Together with the entropy collection from dropped RTP message, it should guaranty good enough entropy.
|
||||
*- zrtp_def_cache_reset_since() was implemented as call-back, similar to the rest of ZRTP cache interfaces.
|
||||
*- Eliminated secure logs from the public build.
|
||||
*- Public bug-tracker and wiki launched (in addition to our internal tools)
|
||||
*- libzrtp API documentation is available at developers.zfoneproject.com
|
||||
|
||||
|
||||
****************************************************************************************************
|
||||
\section v081 Release Notes - libzrtp - Version 0.81 build 514 (ZRTP ID v15, protocol 1.1)
|
||||
****************************************************************************************************
|
||||
<HR>
|
||||
***\subsection v081_bugs Bug
|
||||
*- [LZRTP-161] <b>Improvement in ZRTP state-machine</b>\n
|
||||
libzrtp state-machine didn't process incoming Hello message in StartInitiatingSecure state.
|
||||
In some situations this issue could cause libzrtp not responding on incoming HELLO messages and freeze the protocol.
|
||||
|
||||
*- [LZRTP-166] <b>Fixed "Secure Since" logic.</b>\n
|
||||
Previous version of libzrtp computed secure since in a wrong way. libzrtp 0.81 remembers secure since date when new RS1 secret is generated and keep it unchanged while RS secrets are matched for all next calls.
|
||||
\n
|
||||
Use zrtp_def_cache_get_since() to get secure since for the particular pair of ZIDs.
|
||||
\warning Secure since function is available for the build-in implementation of ZRTP cache.
|
||||
|
||||
***\subsection v081_feature New Feature
|
||||
*- [LZRTP-157] <b>Implement algorithms negotiation according to ZRTP ID v15 section 4.1.2</b>\n
|
||||
This method is provided to allow the two parties to mutually and deterministically choose the same DH key size and algorithm before a Commit message is sent. No API changes required.
|
||||
|
||||
*- [LZRTP-158] <b>Zfone Ping response implemented.</b>\n
|
||||
New Zfone3 software uses specific VoIp calls detection algorithms and uses ZRTP Ping to discover the call topology. Each ZRTP endpoint may response with PingAck to be compatible with Zfone3. libzrtp based products don't need to do anything more to support Zfone3. The library handles this automatically. Ping-Response doesn't affect res of ZRTP logic.
|
||||
\n
|
||||
\sa Check ZRTP RFC sec 5.16 for more information.
|
||||
|
||||
***\subsection v081_improv Improvement
|
||||
*- [LZRTP-164] <b>New ZRTP security event was added.</b>\n
|
||||
Libzrtp rises special event when after switching to secure state, the secrets are not expired, cached, but don't match. In other words: it is typical condition for the MitM attacks. Developer should use this event to notify user about the situation. Check zrtp_security_event_t#ZRTP_EVENT_MITM_WARNING for more detail information.
|
||||
|
||||
*- [LZRTP-153] <b>New Project files to build libzrtp on Windows CE.</b>\n
|
||||
Check ./projects/win_ce directory to find appropriate Microsoft Visual Studio projects.
|
||||
|
||||
|
||||
|
||||
****************************************************************************************************
|
||||
\section v080 Release Notes - libzrtp - Version 0.80
|
||||
****************************************************************************************************
|
||||
<HR>
|
||||
***\subsection v080_bugs Bug
|
||||
- [LZRTP-97] <b>zrtp_hex2str and zrtp_st2hex don't work correct.</b>\n
|
||||
Fixed bug in str2hex() providing wrong converting. Previous versions of libzrtp were affect,
|
||||
but str2hex wasn't used in crypto logic and there was no security weakness.
|
||||
- [LZRTP-154] zrtp_register_with_trusted_mitm() on storing MiTM secret didn't set the "matches" flag for ZRTP_BIT_PBX. In result, zrtp_is_user_enrolled() returned false right after ZRTP_STATE_SECURE event. This issue affected ZRTP MitM endpoints only and for the very first enrollment stream with the endpoint. In all next calls with the endpoint zrtp_is_user_enrolled() worked correct.
|
||||
|
||||
***\subsection v080_improv Improvement
|
||||
*- [LZRTP-26] <b>Refactoring in the test-unite</b>\n
|
||||
Test-unite was redesigned: platform independent test-core and UI parts, specific for every
|
||||
target platform. test-core has cleaner API and internal structure. UI part allow to simplify
|
||||
application and separate business logic from UI routine.
|
||||
|
||||
*- [LZRTP-46] <b>Change zrtp_time_t to literal integer type.</b>\n
|
||||
zrtp_tim_now() just returns current time in milliseconds instead of zrtp_time_t structure.
|
||||
|
||||
*- [LZRTP-83] <b>Refactoring in libzrtp debug logging.</b>\n
|
||||
Made logs easy to read and analyze. Used indention.
|
||||
|
||||
*- [LZRTP-84] <b>Refactoring in libzrtp terms.</b>\n
|
||||
Following changes in functions names and data structures were made:
|
||||
zrtp_stream_ctx_t - zrtp_stream_t\n
|
||||
zrtp_conn_ctx_t - zrtp_session_t\n
|
||||
zrtp_global_ctx_t - zrtp_global_t\n
|
||||
(in zrtp.h more explicitly reflect meaning of data types)\n
|
||||
\n
|
||||
ZSTR_GET_VALUE/P - ZRTP_GV/P\n
|
||||
SET_EMPTY_ZRTP_STRING - ZSTR_SET_EMPTY\n
|
||||
(in zrtp_string.h just cleaner and shorter names)\n
|
||||
\n
|
||||
zrtp_init() (Allocates memory)\n
|
||||
zrtp_init_session_ctx() - zrtp_session_init(). (Allocates memory)\n
|
||||
zrtp_add_entropy() - zrtp_entropy_add() \n
|
||||
zrtp_secure_stream() - zrtp_stream_secure()\n
|
||||
zrtp_clear_stream() - zrtp_stream_clear()\n
|
||||
zrtp_done_session_ctx - zrtp_session_down()\n
|
||||
zrtp_attach_stream - zrtp_stream_attach()\n
|
||||
zrtp_start_stream() - zrtp_stream_start()\n
|
||||
zrtp_stop_stream() - zrtp_stream_stop()\n
|
||||
zrtp_set_verified - zrtp_verified_set()\n
|
||||
zrtp_check_profile - zrtp_profile_check()\n
|
||||
(in zrtp.h used following approach: zrtp prefix; module name; action name)
|
||||
|
||||
*- [LZRTP-85] <b>Hide private fields in zrtp_session_ctx and zrtp_stream_ctx.</b>\n
|
||||
zrtp_stream_t and zrtp_session_t structures were hidden inside libzrtp internal data-types. General libzrtp-based application shouldn't use these structures directly. zrtp_stream_info_t and zrtp_session_info_t structures should be used instead. To implement data encapsulation, libzrtp provides following functions:
|
||||
zrtp_stream_get(), zrtp_session_get()\n
|
||||
zrtp_stream_set_userdata(), zrtp_stream_get_userdata()\n
|
||||
zrtp_session_set_userdata(), zrtp_session_get_userdata()\n
|
||||
\n
|
||||
Advanced zrtp products may access zrtp_stream_t and zrtp_session_t directly but implementer can avoid this in most of the cases.
|
||||
|
||||
*- [LZRTP-88] <b>Create a macro for UNALIGNED constructions on mobile platforms.</b>\n
|
||||
|
||||
*- [LZRTP-89] <b>Code style for crypto components sources.</b>\n
|
||||
Public API not affected. Internal changes:
|
||||
- more compact code because fo using more general crypto functions
|
||||
- code stayle and comments
|
||||
- test-vectors were moved inside c-files fof appropriate crypto components.
|
||||
|
||||
*- [LZRTP-99] <b>zrtp_session_init should allocate memory for zrtp_session_t.</b>\n
|
||||
|
||||
*- [LZRTP-112] <b>Modify zrtp logger to be able write \\n and NON \\n logs.</b>\n
|
||||
ZRTP_LOG by default doesn't add \\n at the end of the log string. ZRTP_LOGC print plain log message without header and any formatting.
|
||||
|
||||
*- [LZRTP-116] <b>Review synchronization objects in libzrtp.</b>\n
|
||||
- zrtp_global_t#comp_protector was removed. This mutex protected crypto components list. Since v0.80 libzrtp doesn't allow users to manage list of crypto components. libzrtp loads all available components at zrtp_init() and destroys them on zrtp_down(). Any modification with the list performed between these two call - don't need mutex.
|
||||
- zrtp_secrets_t#protector was removed, just unused in the code
|
||||
- zrtp_global_t#cache_protector was removed. Third-party ZRTP cache implementation should be thread-safe. It was made because it is simpler and more flexible solution.
|
||||
|
||||
*- [LZRTP-120] <b>Add file with version number to identify builds.</b>\n
|
||||
zrtp_version.h have been added to the project.
|
||||
|
||||
*- [LZRTP-128] <b>Eliminate Sound event from libzrtp.</b>\n
|
||||
zrtp_callback_misc_t::on_sound_event() was eliminated. This message was originally deigned for early versions of ZFone project. Event is supernumerary and duplicated other protocol and security events. Users, who need such event may perform the same actions using zrtp_callback_event_t events.
|
||||
|
||||
*- [LZRTP-133] <b>Move ssrc parameter from stream_create() to stream_start()</b>\n
|
||||
SSRC parameter was moved from zrtp_stream_attach() to zrtp_stream_start(). Such improvement should allow users to create zrtp streams before media starts and ssrc is unknown. It may be useful for proxy products: ZFone, UM-Lab software and other.
|
||||
|
||||
*- [LZRTP-143] <b>Speedup DH key exchange procedure.</b>\n
|
||||
DH crypto context data was moved directly to zrtp_stream_t and statically allocated. On creating protocol routine, libzrtp checks is DH context have been already initialized with the same type of key exchange scheme. If so - new DH value will not be recalculated.
|
||||
|
||||
***\subsection v080_feature New Feature
|
||||
- [LZRTP-14] <b>Add DH2K public key exchange scheme</b>\n
|
||||
DH2K public key exchange scheme was implemented and available for developers the same way as rest of crypto components.
|
||||
|
||||
***\subsection v080_tasks Task
|
||||
*- [LZRTP-24] <b>Implement Self-tests for DH and ECDH components.</b>\n
|
||||
Test cases for DH components were implemented and added to the libzrtp test-unite routine. DH checks algorithm correctness and performance as well. Besides test-vectors, it emulates DH exchange computing public and secret values for both endpoints.
|
||||
|
||||
*- [LZRTP-122] <b>Print out all zrtp configuration settings and adjustments on initialization.</b>
|
||||
|
||||
*- [LZRTP-123] <b>Create standard error codes and error text descriptions.</b>\n
|
||||
New functions zrtp_log_error2str() and zrtp_log_status2str() were added to convert status codes to text description. Some clean-up in zrtp_status_t was made, removed unused or ambiguous status codes.
|
||||
|
||||
*- [LZRTP-132] <b>Replace HMAC with KDF function call.</b>\n
|
||||
Since ZRTP draft 12b defines ZRTP KDF to be in compliance with the recommendations in NIST SP 800-108. KDF function implemented as _zrtp_kdf() in zrtp_utils_proto.c. All KDF operations were replaced with from hmac to kdf function.
|
||||
|
||||
*/
|
|
@ -1,489 +0,0 @@
|
|||
#
|
||||
# Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
# Contact: http://philzimmermann.com
|
||||
# For licensing and other legal details, see the file zrtp_legal.c.
|
||||
#
|
||||
# Viktor Krykun <v.krikun at zfoneproject.com>
|
||||
|
||||
|
||||
/**
|
||||
* \file howto.dox
|
||||
* \brief How to Get Up and Running Quickly with libZRTP
|
||||
*/
|
||||
|
||||
/**
|
||||
\page howto How to Get Up and Running Quickly with libZRTP
|
||||
|
||||
****************************************************************************************************
|
||||
\section howto_about 1. About
|
||||
****************************************************************************************************
|
||||
<HR>
|
||||
The libzrtp library is a cross-platform implementation of ZRTP, a VoIP encryption protocol developed by Phil Zimmermann. libzrtp is suitable for inclusion in software VoIP clients, firmware for hardware VoIP phones, VoIP PBX servers, mobile VoIP clients, and SIP border control servers, enabling a VoIP application to interoperate and make secure calls with the rest of the ZRTP
|
||||
community.
|
||||
|
||||
The libzrtp library consists of three main components: the protocol module responsible for the safe connection of a call, the encryption module, and a set of interfaces. ZRTP works by assuming control of the VoIP traffic and initiating an encrypted connection between two ZRTP endpoints after a safe mode is achieved. To integrate the library, please review our documentation on the
|
||||
ZRTP interfaces, connections management, and integration plan.
|
||||
|
||||
|
||||
****************************************************************************************************
|
||||
\section howto_quick 2. Quick Info
|
||||
****************************************************************************************************
|
||||
<HR>
|
||||
***<H3>Building with GNU tools (Linux, *BSD, MacOS X, mingw, etc.)</H3>
|
||||
|
||||
Generally these should be all that are needed to build the libraries, applications, and samples:
|
||||
-# go to ./projects/gnu and run
|
||||
\code
|
||||
$ ./configure
|
||||
$ make clean && make
|
||||
\endcode
|
||||
|
||||
**<H3>Building Win32 Target with Microsoft Visual Studio</H3>
|
||||
Generally we can just do these steps:
|
||||
-# Visual Studio 8: open projects/win/libzrtp_vc8.sln solution,
|
||||
-# build the libzrtp_test application.
|
||||
|
||||
**<H3>Building for Windows Mobile</H3>
|
||||
Generally these are all that are needed:
|
||||
-# Visual Studio 8: open projects/win/libzrtp_wince_vc8.sln solution,
|
||||
-# build the libzrtp_test application.
|
||||
|
||||
**<H3>Locating Output Binaries/Libraries</H3>
|
||||
For GNU targets, library files will be placed to <c>./projects/gnu/build</c> and <c>./third_party/bnlib</c>.
|
||||
|
||||
**<H3>Running the Applications</H3>
|
||||
After successful build, you can try running libzrtp_test application on projects/gnu/build/test directory.
|
||||
|
||||
****************************************************************************************************
|
||||
\section howto_getting_source 3. Getting the Source Distribution
|
||||
****************************************************************************************************
|
||||
<HR>
|
||||
***\subsection howto_getting_source_tar 3.1 Getting the Release tarball
|
||||
|
||||
Getting the released tarball is the best way to obtain stable version of libzrtp. The tarball may not contain the latest features or bug-fixes, but normally it is considered more stable, tested and well documented.
|
||||
|
||||
The latest released tarball can be downloaded from the http://zfoneproject.com/prod_sdk.html
|
||||
|
||||
***\subsection howto_getting_source_svn 3.2 Getting from Subversion trunk
|
||||
At the moment, SVN repository is available for libzrtp developers only. It will be opened for public soon.
|
||||
|
||||
***\subsection howto_getting_source_layout 3.3 Source Directories Layout
|
||||
|
||||
The top-level directories (denoted as $TOP here) in the source distribution contains the following sub-directories:
|
||||
|
||||
\c $TOP/doc - documentation folder;
|
||||
|
||||
\c $TOP/include - header files:
|
||||
- \c zrtp_config_user.h - user defined ZRTP configuration options;
|
||||
- \c zrtp_config_win.h - Windows related configuration options;
|
||||
- \c zrtp_config.h - libzrtp automatic configuration routine.
|
||||
- \c zrtp_crypto.h - contains definitions of the data types and functions necessary to
|
||||
strengthen the crypto-segment of the library. These functions are used only by libzrtp
|
||||
developers only. Typical projects based on libzrtp do not use these functions;
|
||||
- \c zrtp_engine.h - contains types and functions needed by the ZRTP state-machine For
|
||||
internal use only;
|
||||
- \c zrtp_error.h - contains error codes returned by the libzrtp functions;
|
||||
- \c zrtp_iface_system.h - contains a set of OS-related interface functions which must be
|
||||
implemented in order to use the library;
|
||||
- \c zrtp_iface.h - contains a set of ZRTP utility interface functions which must be
|
||||
implemented in order to use the library;
|
||||
- \c zrtp_legal.h - libzrtp license agreement;
|
||||
- \c zrtp_list.h - contains functions and macros for safe operations with linked lists. All
|
||||
lists in libzrtp are based on these functions. They can be used to avoid mistakes in list operations;
|
||||
- \c zrtp_log.h - contains functions to track bugs and store the error log.;
|
||||
- \c zrtp_pbx.h - conatins declarations of the main PBX related functions. Use this header if you are the implementor of some VoIP-server solutions;
|
||||
- \c zrtp_srtp.h - SRTP crypto types and interfaces. Used to integrate libzrtp with third
|
||||
party SRTP implementations;
|
||||
- \c zrtp_srtp_builtin.h - data structures for built-in realization of SRTP.
|
||||
- \c zrtp_string.h - contains functions for the use of the special, safe strings,
|
||||
zrtp_stringn_t, used by libzrtp.
|
||||
- \c zrtp_types.h - contains the definitions of the internal data types which are used by
|
||||
libzrtp developers and experienced users.
|
||||
- \c zrtp.h - conatins declarations of the main dataypes and function
|
||||
functions necessary to operate libzrtp. This file header is only must to
|
||||
be included in each module using the libzrt functions;
|
||||
|
||||
\c $TOP/projects
|
||||
- \c gnu - make files for Unix-like systems using autotools;
|
||||
- \c symbian - configuration and make files for Symbian platform;
|
||||
- \c win - Set of Microsoft Visual Studio project files for Windows and Windows CE.
|
||||
- \c win_kernel - makefiles for Windows Kernel mode.
|
||||
- \c xcode - project files for Apple Xcode.
|
||||
|
||||
\c $TOP/src - libzrtp source files;\n
|
||||
|
||||
\c $TOP/test - test suite for libZRTP kernel logic. Includes versions for Unix, Windows,
|
||||
Windows CE and Symbian.
|
||||
|
||||
\c $TOP/third_party
|
||||
- \c bnlib - libbn files which are not intended for external use;
|
||||
- \c bgaes - AES encryption library and hash functions by Brian Gladman;
|
||||
|
||||
|
||||
****************************************************************************************************
|
||||
\section howto_praparations 4. Build Preparation
|
||||
****************************************************************************************************
|
||||
<HR>
|
||||
***\subsection howto_praparations_config 4.1 zrtp_cinfig_user.h
|
||||
|
||||
Before building libzrtp, some adjustments may be performed according to developers needs. In order to do this, \c include/zrtp_cinfig_user.h should be used. Most of configuration parameters are optional and libzrtp can be build without any modifications.
|
||||
|
||||
Check \ref zrtp_config for more information.
|
||||
|
||||
***\subsection howto_praparations_iface 4.2 libzrtp platform-dependent interfaces
|
||||
|
||||
The library requires external implementation of some system-dependent functions to enable cross-platform operation. The libzrtp distribution contains almost all interface implementations for the following platforms: Windows, Linux, Mac OSX, Symbian, Windows CE. The Quick Start allows a fast integration of the library. Built-in implementations are used by default and developer don't need to anything more.
|
||||
|
||||
In order to start using libzrtp, developer should implement just few feedback interfaces. Libzrtp uses callbacks to notify application about some events in ZRTP protocol, such as:
|
||||
- zrtp_callback_event_t#on_zrtp_secure - notify user about switching to secure;
|
||||
- zrtp_callback_event_t#on_zrtp_not_secure - notify about ZRTP security issues.
|
||||
|
||||
Another callback which must be implemented - transport routine:
|
||||
- zrtp_callback_misc_t#on_send_packet - libzrtp uses this function to deliver ZRTP protocol message to the remote party.
|
||||
|
||||
These only two callbacks which must be implemented to start using libzrtp. Example can be found at the end of this article.
|
||||
|
||||
For more detail information about libzrtp platform-dependent interfaces check \ref XXX.
|
||||
|
||||
****************************************************************************************************
|
||||
\section howto_unix 5. Building Linux, *nix, *BSD, and MacOS X Targets with GNU Build Systems
|
||||
****************************************************************************************************
|
||||
<HR>
|
||||
***\subsection howto_unix_targets Supported Targets
|
||||
|
||||
The new, autoconf based GNU build system can be used to build the libraries/applications for the following targets:
|
||||
- Linux (i386, Opteron, Itanium, MIPS, PowerPC, etc.),
|
||||
- MacOS X (Intel, PowerPC),
|
||||
- mingw (i386),
|
||||
- FreeBSD (i386, Opteron, etc.),
|
||||
- etc.
|
||||
|
||||
***\subsection howto_unix_requir 5.1 Requirements
|
||||
|
||||
In order to use libzrtp's GNU build system, these typical GNU tools are needed:
|
||||
- GNU make,
|
||||
- GNU binutils for the target, and
|
||||
- GNU gcc for the target.
|
||||
|
||||
In addition, the appropriate libraries must be installed for platform-dependent interfaces implementation. This could just be a libc and the appropriate system abstraction library such as Posix.
|
||||
|
||||
The build system is known to work on the following hosts:
|
||||
- Linux, many types of distributions.
|
||||
- MacOS X 10.4 and higher
|
||||
|
||||
***\subsection howto_unix_build 5.2 Running configure and make
|
||||
|
||||
Run "./configure" without any options to let the script detect the appropriate settings for the host:
|
||||
\code
|
||||
$ cd libzrtp
|
||||
$ ./configure
|
||||
...
|
||||
\endcode
|
||||
|
||||
Once the configure script completes successfully, libzrtp is ready to be built. Use following commands:
|
||||
\code
|
||||
$ cd libzrtp
|
||||
$ make clean
|
||||
$ make
|
||||
\endcode
|
||||
|
||||
Description of all make targets supported by the Makefile's:
|
||||
- \c all. The default (or first) target to build the library binary;
|
||||
- \c clean. Clean the object files and libzrtp binary;
|
||||
- \c check. Build test cases and start libzrtp_test application;
|
||||
- \c distclean. Remove all generated files (object, libraries, binaries, and
|
||||
dependency files).
|
||||
- \c install. Make install of libzrtp headers and binaries;
|
||||
- \c uninstall. Remove installed headers and binaries.
|
||||
|
||||
****************************************************************************************************
|
||||
\section howto_osx 6. Building MacOS X Targets with Xcode
|
||||
****************************************************************************************************
|
||||
<HR>
|
||||
***\subsection howto_osx_requir 6.1 Requirements
|
||||
|
||||
To build libzrtp on OS X using Xcode you need following:
|
||||
- Mac OSX 10.4 or later.
|
||||
- Apple developers Tools installed.
|
||||
- Xcode 3.1 or higher.
|
||||
|
||||
***\subsection howto_osx_build 6.2 Building the Projects
|
||||
|
||||
Follow the steps below to build libzrtp using Apple Xcode:
|
||||
-# For Apple Xcode: open \c projects/xcode/libzrtp.xcodeproj project file.
|
||||
-# Set "libzrtp" or "libzrtp_ec" as Active Target.
|
||||
-# Select Debug or Release build as appropriate.
|
||||
-# Build "configure" target.
|
||||
-# Build the project. This will build libzrtp with all dependencies.
|
||||
-# After successful build, libzrtp will be placed in \c projects/xcode/build/Debug or Release.
|
||||
|
||||
Use \c projects/xcode/libzrtp_test.xcodeproj by analogy to build the test application.
|
||||
|
||||
****************************************************************************************************
|
||||
\section howto_win 7. Building for Windows Targets with Microsoft Visual Studio
|
||||
****************************************************************************************************
|
||||
<HR>
|
||||
***\subsection howto_win_requir 7.1 Requirements
|
||||
|
||||
The Microsoft Visual Studio based project files can be used with one of the following:
|
||||
- Microsoft Visual C++ 2005 (including Express edition),
|
||||
|
||||
For the host platform, the following are required:
|
||||
- Windows NT, 2000, XP, 2003, or later ,
|
||||
- Sufficient amount of RAM for the build process (at least 256MB).
|
||||
|
||||
***\subsection howto_win_build 7.2 Building the Projects
|
||||
|
||||
Follow the steps below to build libzrtp using Visual Studio:
|
||||
-# For Visual Studio 8 (VS 2005): open libzrtp_vs8.sln solution file.
|
||||
-# Set "libzrtp" or "libzrtp_ec" as StartUp Project.
|
||||
-# Select Debug or Release build as appropriate.
|
||||
-# Build the project. This will build libzrtp and all dependencies.
|
||||
-# After successful build, libzrtp will be placed in \c projects/win/Debug or Release.
|
||||
|
||||
To build libzrtp test-cases use "libzrtp_test" as StartUp Project and perform steps listed above.
|
||||
|
||||
****************************************************************************************************
|
||||
\section howto_wince 8. Building for Windows Mobile Targets (Windows CE/WinCE/PDA/SmartPhone)
|
||||
****************************************************************************************************
|
||||
<HR>
|
||||
***\subsection howto_wince_requir 8.1 Requirements
|
||||
|
||||
The Microsoft Visual Studio based project files can be used with one of the following:
|
||||
- Microsoft Visual C++ 2005
|
||||
|
||||
For the host platform, the following are required:
|
||||
- Windows NT, 2000, XP, 2003, or later ,
|
||||
- Sufficient amount of RAM for the build process (at least 256MB).
|
||||
|
||||
***\subsection howto_wince_build 8.2 Building the Projects
|
||||
|
||||
Follow the steps below to build libzrtp using Visual Studio:
|
||||
-# For Visual Studio 8 (VS 2005): open libzrtp_wince_vs8.sln solution file.
|
||||
-# Set "libzrtp" or "libzrtp_ec" as StartUp Project.
|
||||
-# Select Debug or Release build as appropriate.
|
||||
-# Build the project. This will build libzrtp and all dependencies.
|
||||
-# After successful build, libzrtp will be placed in \c projects/win/Debug or Release.
|
||||
|
||||
\note
|
||||
The Test Application is not available for Windows Mobile platform at the moment. We will fix this in next version of libzrtp.
|
||||
|
||||
****************************************************************************************************
|
||||
\section howto_symbian 9. Building for Symbian
|
||||
****************************************************************************************************
|
||||
<HR>
|
||||
|
||||
****************************************************************************************************
|
||||
\section howto_using 10. Using libzrtp with Applications
|
||||
****************************************************************************************************
|
||||
<HR>
|
||||
Regardless of the build system being used, the following tasks are normally needed to be done in order to build application to use libzrtp:
|
||||
-# Add following include directories in the include search path:
|
||||
- \c libzrtp/include
|
||||
- \c libzrtp/include/enterprise (if you are using Enterprise version of libzrtp)
|
||||
- \c libzrtp/third_party/bgaes
|
||||
- \c libzrtp/third_party/bnlib
|
||||
- \c libzrtp/projects/gnu/config (for GNU Autoconf targets)
|
||||
-# Put these library directories in the library search path:
|
||||
- \c libzrtp/third_party/bnlib
|
||||
- \c libzrtp/projects/gnu/build (for GNU Autoconf targets)
|
||||
- \c libzrtp/projects/xcode/build/Release (when building with Xcode)
|
||||
- \c libzrtp/projects/win/Release (when building with Visual Studio)
|
||||
-# Include \c libzrtp.h header file to the application.
|
||||
-# Link with \c libzrtp and \c bnlib.
|
||||
-# Link with system spesific libraries:
|
||||
- Windows: Add (among other things): ws2_32.lib.
|
||||
- Linux, *nix, *BSD: Add (among other things): '-lpthread'.
|
||||
- MacOS X: Add (among other things): '-lpthread'.
|
||||
|
||||
****************************************************************************************************
|
||||
\section howto_example 11. Quick Start Example
|
||||
****************************************************************************************************
|
||||
<HR>
|
||||
|
||||
An overview for creating an encrypted channel using libzrtp:
|
||||
|
||||
*** \subsection howto_example_init 11.1 Initialization
|
||||
|
||||
The library supports profiling and dictating different channel parameters, though the initialization can be performed by one function call with default parameters.
|
||||
|
||||
\code
|
||||
typedef struct testcon_t
|
||||
{
|
||||
zrtp_session_t *zrtp_session; // ZRTP Session structure
|
||||
zrtp_stream_t *zrtp_audio; // ZRTP stream for voice encryption
|
||||
zrtp_stream__t *zrtp_video; // ZRTP stream for video encryption
|
||||
} testcon_t;
|
||||
|
||||
testcon_t safe_connection; // Secure channel instance
|
||||
zrtp_global_t zrtp_global; // Persistent storage for libzrtp data
|
||||
\endcode
|
||||
|
||||
\code
|
||||
zrtp_status_t s = zrtp_status_ok;
|
||||
zrtp_config_t zrtp_config;
|
||||
|
||||
// Initialize zrtp config with default values
|
||||
zrtp_config_defaults(&zrtp_config);
|
||||
|
||||
// Make some adjustments:
|
||||
// - Set Client ID to identify ourself
|
||||
// - Set appropriate license mode
|
||||
// - We going to use default zrtp cache implementation, so let's specify cache file path
|
||||
strcpy(zrtp_config.client_id, TEST_CLIENT_ID);
|
||||
zrtp_config.lic_mode = ZRTP_LICENSE_MODE_ACTIVE;
|
||||
zrtp_zstrcpyc( ZSTR_GV(zrtp_config.def_cache_path), TEST_CACHE_PATH);
|
||||
|
||||
// Define interface callback functions
|
||||
zrtp_config.cb.misc_cb.on_send_packet = on_send_packet;
|
||||
zrtp_config.cb.event_cb.on_zrtp_secure = on_zrtp_secure;
|
||||
zrtp_config.cb.event_cb.on_zrtp_security_event = on_zrtp_event;
|
||||
|
||||
// Everything is ready - initialize libzrtp.
|
||||
s = zrtp_init(&zrtp_config, &zrtp_global);
|
||||
if (zrtp_status_ok != s) {
|
||||
// Check error code and debug logs
|
||||
}
|
||||
|
||||
// The library has been initialized and is ready to use
|
||||
. . .
|
||||
\endcode
|
||||
|
||||
*** \subsection howto_example_sessions 11.2 Sessions/Streams
|
||||
|
||||
The library operates with the ZRTP streams concept, where each packet is encrypted within this stream. The streams are created before the start of the encryption process.
|
||||
|
||||
\code
|
||||
//
|
||||
// Allocate zrtp session with default parameters
|
||||
//
|
||||
z = zrtp_session_init( zrtp_global,
|
||||
NULL,
|
||||
zid,
|
||||
is_initator,
|
||||
&safe_connection->zrtp_session);
|
||||
if (zrtp_status_ok != s) {
|
||||
// Check error code and debug logs
|
||||
}
|
||||
|
||||
// Set call-back pointer to our parent structure
|
||||
zrtp_session_set_userdata(safe_connection->zrtp_session, &safe_connection);
|
||||
|
||||
//
|
||||
// Attach Audio and Video Streams
|
||||
//
|
||||
s = zrtp_stream_attach(safe_connection->zrtp_session, &safe_connection->zrtp_audio);
|
||||
if (zrtp_status_ok != s) {
|
||||
// Check error code and debug logs
|
||||
}
|
||||
zrtp_stream_set_userdata(safe_connection->zrtp_audio, &safe_connection);
|
||||
|
||||
s = zrtp_stream_attach(safe_connection->zrtp_session, &safe_connection->zrtp_video);
|
||||
if (zrtp_status_ok != s) {
|
||||
// Check error code and debug logs
|
||||
}
|
||||
zrtp_stream_set_userdata(safe_connection->zrtp_video, &safe_connection);
|
||||
\endcode
|
||||
|
||||
|
||||
*** \subsection howto_example_protocol 11.3 Protocol Handling
|
||||
|
||||
To create an encrypted channel, run the ZRTP engine for each stream added to the session. In our case we have two streams. The library will notify when achieving safe mode through the feedback path interface.
|
||||
|
||||
\code
|
||||
//
|
||||
// Streams are ready - initiate ZRTP protocol
|
||||
//
|
||||
zrtp_stream_start(safe_connection->zrtp_audio, assrc);
|
||||
zrtp_stream_start(safe_connection->zrtp_video, vssrc);
|
||||
\endcode
|
||||
|
||||
The three steps above create the encrypted channel. After entering the "Secure" state, you provide a plain packet to the library and receive an encrypted packet ready to be sent. Decryption works in the analogous way.
|
||||
|
||||
\code
|
||||
zrtp_status_t s = zrtp_status_fail;
|
||||
char packet[MAX_RTP_SIZE];
|
||||
int size = 0;
|
||||
|
||||
// Some abstract function for packets receiving
|
||||
size = get_packet(packet);
|
||||
|
||||
//
|
||||
// Processing incoming packets.
|
||||
// You must determine media type and choose corresponding ZRTP stream
|
||||
//
|
||||
s = zrtp_process_srtp(safe_connection->zrtp_audio, packet, &size);
|
||||
switch (s) {
|
||||
case zrtp_status_ok:
|
||||
//
|
||||
// Packet was successfully decrypted. Dont forget that packet
|
||||
// size was changed during decryption. New size now in size
|
||||
//
|
||||
|
||||
case zrtp_status_drop:
|
||||
//
|
||||
// This is a protocol ZRTP packet or masked RTP media.
|
||||
// In either case the packet must be dropped to protect your
|
||||
// private data and media codec
|
||||
|
||||
case zrtp_status_fail:
|
||||
//
|
||||
// This is some kind of error - see logs for more information.
|
||||
// Don't put such packet to the network. It is not secure.
|
||||
//
|
||||
}
|
||||
\endcode
|
||||
|
||||
*** \subsection howto_example_callbacks 11.4 Callbacks
|
||||
|
||||
libzrtp informs the user application about all changes in protocol state through a system of callback functions. The developer's guide considers this question in detail in \ref XXX. In most cases we need to display the SAS string and some other stream options after switching to the Secure state. An example of doing this is follow:
|
||||
|
||||
\code
|
||||
static void on_zrtp_secure(zrtp_stream_t *stream, unsigned event)
|
||||
{
|
||||
test_options_t* info; // some user-defined stream options
|
||||
|
||||
switch (event) {
|
||||
case ZRTP_EVENT_IS_SECURE:
|
||||
{
|
||||
safe_connection_t* safe_connection = zrtp_stream_get_userdata(stream);
|
||||
zrtp_session_info_t zrtp_session_info;
|
||||
|
||||
zrtp_session_get(safe_connection->zrtp_session, &zrtp_session_info);
|
||||
//
|
||||
// Print out SAS there.
|
||||
//
|
||||
} break;
|
||||
|
||||
// ...
|
||||
// handle other events there
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
\endcode
|
||||
|
||||
An overview for closing an secure channel using libzrtp:
|
||||
|
||||
*** \subsection howto_example_utilization 11.5 Utilization
|
||||
|
||||
The uninstall session permits libzrtp to dispose of all engaged resources and release memory for session context storage. ZRTP streams will be also released, so you don't need to call separate functions.
|
||||
|
||||
\code
|
||||
zrtp_session_down(safe_connection->zrtp_session);
|
||||
\endcode
|
||||
|
||||
When you no longer need the library, dispose of all resources allocated before the beginning of the operation.
|
||||
|
||||
\code
|
||||
zrtp_down(&zrtp_global);
|
||||
\endcode
|
||||
|
||||
****************************************************************************************************
|
||||
\section howto_summary 12. Summary
|
||||
****************************************************************************************************
|
||||
<HR>
|
||||
Integration of libzrtp requires familiarity with the protocol and the library operation features. While the encryption of VoIP is not a trivial task, we have attempted to simplify as much as possible the work required to integrate libzrtp.
|
||||
|
||||
*/
|
|
@ -1,38 +0,0 @@
|
|||
#
|
||||
# Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
# Contact: http://philzimmermann.com
|
||||
# For licensing and other legal details, see the file zrtp_legal.c.
|
||||
#
|
||||
# Viktor Krykun <v.krikun at zfoneproject.com>
|
||||
|
||||
/**
|
||||
\mainpage ZRTP VoIP security
|
||||
|
||||
****************************************************************************************************
|
||||
\section intro Intro
|
||||
****************************************************************************************************
|
||||
|
||||
ZRTP Protocol finally goes RFC and we going to stabilize SDK as well. Libzrtp series 0.9X builds
|
||||
will contain bug-fixes, performance and stability improvements only.
|
||||
|
||||
So, please, be a patient with new API changes. We hope you will find them useful.
|
||||
|
||||
****************************************************************************************************
|
||||
\section aboutdoc About this Documentation
|
||||
****************************************************************************************************
|
||||
|
||||
Libzrtp, since v0.80 includes new, documentation. We have updated "How to Get Up and Running Quickly with libZRTP" and Public API documentation.
|
||||
|
||||
We working on new "Libzrtp Developers Guide" which will give more detail information about ZRTP protocol and libzrtp architecture. This document will be available in next versions of libzrtp. But even now, libzrtp contains enough documentation to start using it comfortable.
|
||||
|
||||
\note
|
||||
libzrtp private API may have outdated information from previous version (links like this: \ref XXX). We working hard on that part of the documentation and it will be published in next versions of libzrtp.
|
||||
|
||||
****************************************************************************************************
|
||||
\section zrtp Libzrtp Documents
|
||||
****************************************************************************************************
|
||||
-# \ref changelog
|
||||
-# \ref howto
|
||||
-# \ref rng
|
||||
|
||||
*/
|
|
@ -1,74 +0,0 @@
|
|||
#
|
||||
# Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
# Contact: http://philzimmermann.com
|
||||
# For licensing and other legal details, see the file zrtp_legal.c.
|
||||
#
|
||||
# Viktor Krykun <v.krikun at zfoneproject.com>
|
||||
|
||||
|
||||
/**
|
||||
* \file rng.dox
|
||||
* \brief Random Number Generation in libzrtp
|
||||
*/
|
||||
|
||||
/**
|
||||
\page rng Random Number Generation in libzrtp
|
||||
|
||||
\section rng Random number generation
|
||||
|
||||
The generation of cryptographic key material is a highly sensitive process. To do this, you need high entropy random numbers that an attacker cannot predict. This section discusses the random number generator used by libzrtp, and how suitable entropy can be collected on different hardware platforms.
|
||||
|
||||
Failure to use true entropy from the physical environment as a basis for generating random cryptographic key material would lead to a disastrous loss of security.
|
||||
|
||||
****************************************************************************************************
|
||||
\subsection rng_algorithm Deterministic Random Bit Generator
|
||||
****************************************************************************************************
|
||||
<HR>
|
||||
Libzrtp uses a cryptographically strong Deterministic Random Bit Generator (DRBG), based on running the AES-256 block cipher in counter mode. The output of this DRBG is used for key material by libzrtp for the Diffie-Hellman private keys, and other random protocol components such as nonces. The 256-bit AES key and 128-bit initialization vector for the DRBG are drawn from an entropy pool
|
||||
created by a SHA-512 hash of raw entropy sources. These raw entropy sources are highly platform dependent and thus are not included in libzrtp. The library provides only a set of interfaces for adding the entropy to the entropy pool. We will discuss the entropy collection in the next section.
|
||||
|
||||
When a random number is required by the ZRTP protocol, the library kernel calls the Deterministic Random Bit Generator interface function zrtp_randstr(). That function requires the existance of an entropy pool that has already been seeded with sufficient entropy. This entropy pool must be seeded by calling zrtp_entropy_add().
|
||||
|
||||
The zrtp_entropy_add() function takes a buffer of raw unprocessed entropy provided by the caller and adds it to the entropy pool via the SHA-512 hash function.
|
||||
|
||||
****************************************************************************************************
|
||||
\subsection rng_accumulation Entropy accumulation
|
||||
****************************************************************************************************
|
||||
<HR>
|
||||
Random numbers for cryptographic key material must be derived from a physical entropy source, such as RF noise, acoustic noise, thermal noise, high resolution timings of environmental events, or other unpredictable physical sources of entropy. For a detailed explanation of cryptographic grade random numbers and guidance for collecting suitable entropy, see <A
|
||||
HREF="http://tools.ietf.org/html/rfc4086">RFC 4086</A> and Chapter 10 of "Practical Cryptography" by Ferguson and Schneier. The raw entropy must be distilled and processed through a Deterministic Random Bit Generator (DRBG). We supply a suitable DRBG in libzrtp, which is accessed through the zrtp_randstr() function.
|
||||
|
||||
To add entropy to the entropy pool maintained by the libzrtp random number generator, the application calls the zrtp_entropy_add() function. This entropy accumulation function may be called whenever new entropy becomes available.
|
||||
|
||||
\warning
|
||||
The entropy pool builds up more precious entropy each time you call zrtp_entropy_add(). Once in a while, it is a good idea to save the entropy in nonvolatile storage, by calling zrtp_randstr() and writing the output to a file, or to flash memory, or to some nonvolatile system storage area. This can be done whenever the VoIP application shuts down, or perhaps at the end of each secure VoIP call. A minimum of 512 bits (64 bytes) of output from zrtp_randstr() should be stored this way, but there is no need to store more than 256 bytes. When the VoIP application starts back up again, the contents of this nonvolatile entropy file should be added back into the active entropy pool by passing it to the zrtp_entropy_add() function.
|
||||
|
||||
****************************************************************************************************
|
||||
\subsection rng_default Libzrtp built-in entropy sources
|
||||
****************************************************************************************************
|
||||
<HR>
|
||||
The SDK library provides a default implementation of entropy accumulation for <b>Windows Kernel</b> and <b>Unix based</b> platforms.
|
||||
|
||||
For the Windows kernel mode it gathers current system state information as an entropy source. Among them are the performance counter, the current value of the system interrupt-time count, the count of the interval timer interrupts, and the values of some CPU registers.
|
||||
|
||||
For Unix platforms, libzrtp calls \c /dev/urandom.
|
||||
|
||||
If you are running libzrtp on a Windows Kernel or a full-blown desktop *nix-like system - you need not do anything more to implement the RNG. If you are using some other platform - carefully read the next section.
|
||||
|
||||
****************************************************************************************************
|
||||
\subsection rng_guidelines Entropy sources for your platform.
|
||||
****************************************************************************************************
|
||||
<HR>
|
||||
On a desktop or laptop PC running Linux, FreeBSD, NetBSD, or OpenBSD, a good source of entropy may be found by reading from \c /dev/random or \c /dev/urandom. This is because \c /dev/random is seeded by entropy from keyboard timings, mouse movements, disk latency measurements, or other physical noise sources, some of them involving unpredictable human interaction.
|
||||
|
||||
However, some low cost embedded Linux systems have no keyboard, no mouse or trackpad, no disk drive, and are starving for high quality entropy. There are some low cost Asterisk PBX boxes that are built this way. Or hardware Analog Telephone Adapters. Or low cost consumer routers. Many of them have no \c /dev/random implemented, or worse, have only a stub for /dev/random that does not actually collect any environmental entropy. This creates a dangerous illusion that entropy is available, because \c /dev/urandom appears to work, but is not backed by true entropy. This is bad, and not only for ZRTP. Platforms like these might not be able to generate strong cryptographic key material for SSH or SSL.
|
||||
|
||||
If you are an OEM that builds hardware like this, and you wish to implement the ZRTP protocol with our libzrtp SDK, you really should provide a properly implemented \c /dev/random and \c /dev/urandom, properly supplied with true environmental entropy. If you are building a telephone, you can easily collect entropy from raw audio samples from the microphone. If the phone includes a video camera, you can collect entropy by sampling a few raw uncompressed video frames. If it's a mobile phone or a cordless phone, you can collect entropy from the RF noise in your wireless circuitry. If it's an embedded box like a router or low cost PBX, you can do high resolution timings of packet arrivals and use the timer readings as entropy sources. A PBX might include an analog interface to PSTN phone lines, and those interfaces usually include registers that measure analog voltage levels, which can serve as a source of entropy. The entropy sources do not need to produce much entropy, just a few bits at a time, but it can build up slowly until you have accumulated a few hundred bits of entropy. That's enough to generate cryptographically useful keys. Even if it takes some seconds or even minutes to accumulate this much entropy the first time your product is activated, it can be stored in nonvolatile storage so that it will be ready to reseed the entropy pool instantly the next time your product is powered up.
|
||||
|
||||
In the ideal case, if you are designing the embedded hardware yourself, you could provide a good source of entropy by including a simple <A HREF="http://en.wikipedia.org/wiki/Ring_oscillator">ring oscillator</A> in the hardware. A ring oscillator is a circular chain (a ring) of NOT gates, and has nothing whatsoever to do with a telephone ring generator. The oscillation frequency drifts from thermal noise, and sampling the output at some low sampling rate is a good way to get some entropy. However, most designers have to work with existing hardware designs, and don't have the luxury of adding special hardware to generate entropy, which means you have to improvise with whatever you can collect from the environment, using any of the methods described above.
|
||||
|
||||
If the library is used on another platform, the potential entropy sources should be thoroughly analyzed and a custom implementation must be developed for that platform. You can get your entropy collection ideas by looking at the default implementation of \c zrtp_add_system_state() provided in \c zrtp_rng.c. Again, microphone noise can be a good entropy source for VoIP clients. Raw, uncompressed, unfiltered audio samples should be used.
|
||||
|
||||
If you have entropy gathering schemes for platforms not already supported in libzrtp, or if you doubt the correctness of your entropy collection approach, contact us to discuss how it may be done. We will do our best to provide you with technical assistance.
|
||||
|
||||
*/
|
|
@ -1,968 +0,0 @@
|
|||
/*
|
||||
* libZRTP SDK library, implements the ZRTP secure VoIP protocol.
|
||||
* Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
* Contact: http://philzimmermann.com
|
||||
* For licensing and other legal details, see the file zrtp_legal.c.
|
||||
*
|
||||
* Viktor Krykun <v.krikun at zfoneproject.com>
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file zrtp.h
|
||||
* \brief Defines basic libzrtp functions and data types
|
||||
*/
|
||||
|
||||
#ifndef __ZRTP_H__
|
||||
#define __ZRTP_H__
|
||||
|
||||
#include "zrtp_config.h"
|
||||
#include "zrtp_base.h"
|
||||
#include "zrtp_error.h"
|
||||
#include "zrtp_types.h"
|
||||
#include "zrtp_protocol.h"
|
||||
#include "zrtp_engine.h"
|
||||
#include "zrtp_crypto.h"
|
||||
#include "zrtp_iface.h"
|
||||
#include "zrtp_iface_system.h"
|
||||
#include "zrtp_iface_scheduler.h"
|
||||
#include "zrtp_list.h"
|
||||
#include "zrtp_legal.h"
|
||||
#include "zrtp_log.h"
|
||||
#include "zrtp_srtp.h"
|
||||
#include "zrtp_srtp_builtin.h"
|
||||
#include "zrtp_string.h"
|
||||
#include "zrtp_pbx.h"
|
||||
#include "zrtp_legal.h"
|
||||
#include "zrtp_version.h"
|
||||
#include "zrtp_iface_cache.h"
|
||||
#include "zrtp_ec.h"
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \defgroup zrtp_api API
|
||||
*
|
||||
* In this section the basic functions for using the library are defined. They include
|
||||
* initialization and deinitialization functions, functions for session and stream management and
|
||||
* functions for RTP traffic management.
|
||||
*
|
||||
* In most cases this section is all you need to start working with libzrtp. The typical simplified
|
||||
* order of operations in using libzrtp is the following:
|
||||
* -# library configuration
|
||||
* -# library initialization;
|
||||
* -# ZRTP session creation and configuration;
|
||||
* -# ZRTP stream attaching and Protocol initiation;
|
||||
* -# RTP stream processing;
|
||||
* -# ZRTP protocol stopping and releasing resources.
|
||||
* For each of these actions there is a set of corresponding functions.
|
||||
* \sa
|
||||
* - \ref howto
|
||||
* - \ref XXX_GUIDE
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*======================================================================*/
|
||||
/* Public ZRTP libzrtp datatypes */
|
||||
/*======================================================================*/
|
||||
|
||||
|
||||
/**
|
||||
* \defgroup zrtp_types Types and Definitions
|
||||
* \ingroup zrtp_api
|
||||
* The data types used in libzrtp are defined in this section
|
||||
* \{
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* \typedef typedef uint32_t zrtp_id_t;
|
||||
* \brief libzrtp general identifier used to debug connections management.
|
||||
* \ingroup zrtp_main_init
|
||||
*/
|
||||
|
||||
/** Length of "zrtp-hash-value", RFC 6189 sec 8. @sa zrtp_signaling_hash_get(); */
|
||||
#define ZRTP_SIGN_ZRTP_HASH_LENGTH (ZRTP_MESSAGE_HASH_SIZE*2)
|
||||
|
||||
/**
|
||||
* \brief Enumeration for ZRTP Licensing modes
|
||||
* \ingroup zrtp_main_init
|
||||
*
|
||||
* A ZRTP endpoint that is Passive will never send a Commit message, which means that it cannot be
|
||||
* the initiator in the ZRTP exchange. Since at least one of the two parties must be the initiator,
|
||||
* two Passive endpoints cannot make a secure connection. However, a non-Passive ZRTP endpoint can
|
||||
* send a Commit message, enabling it to act as the initiator in a ZRTP exchange. This allows it to
|
||||
* make a secure connection to a Passive endpoint, or to another non-Passive endpoint.
|
||||
*
|
||||
* In addition, a Passive ZRTP endpoint declares that it is Passive by setting the passive flag in
|
||||
* the Hello message, which means the other party will recognize it as Passive. This allows for a
|
||||
* Passive mode and two forms of Active mode-- Active, or Unlimited. These three possible behaviors
|
||||
* for a ZRTP endpoint are defined as:
|
||||
* - \b Passive: Never send a Commit message, and thus can never be the initiator.
|
||||
* - \b Active: Will send a Commit message, but only to non-Passive ZRTP partners.
|
||||
* - \b Unlimited: Will send a Commit message to any ZRTP partner, Passive or non-Passive.
|
||||
*
|
||||
* This can be used to provide three classes of service, which can be licensed t different price
|
||||
* points. Passive can be used in freeware for widest possible deployment, Active can be used in
|
||||
* discount products that can only talk to non-freeware, and Unlimited can be used in full-price
|
||||
* products that will benefit from the network effect of widely deployed Passive freeware.
|
||||
*/
|
||||
typedef enum zrtp_license_mode_t
|
||||
{
|
||||
/** @brief Never send a Commit message, and thus can never be the initiator. */
|
||||
ZRTP_LICENSE_MODE_PASSIVE = 0,
|
||||
/** @brief Will initiate ZRTP exchange, but only to non-Passive ZRTP partners. */
|
||||
ZRTP_LICENSE_MODE_ACTIVE,
|
||||
/** @brief Will send a Commit message to any ZRTP partner, Passive or non-Passive. */
|
||||
ZRTP_LICENSE_MODE_UNLIMITED
|
||||
} zrtp_license_mode_t;
|
||||
|
||||
/**
|
||||
* @brief Enumeration to define Signaling initiator/responder roles.
|
||||
*
|
||||
* Used by libzrtp to optimize some internal processes and protocol handshake.
|
||||
*
|
||||
* @sas zrtp_stream_start().
|
||||
*/
|
||||
typedef enum zrtp_signaling_role_t
|
||||
{
|
||||
/** @brief Unknown Signaling role, should be used when the app can't determine the role. */
|
||||
ZRTP_SIGNALING_ROLE_UNKNOWN = 0,
|
||||
/** @brief Signaling Initiator. */
|
||||
ZRTP_SIGNALING_ROLE_INITIATOR,
|
||||
/** @brief Signaling Responder. */
|
||||
ZRTP_SIGNALING_ROLE_RESPONDER,
|
||||
ZRTP_SIGNALING_ROLE_COUNT
|
||||
} zrtp_signaling_role_t;
|
||||
|
||||
|
||||
/** @brief 12-byte ZID for unique ZRTP endpoint identification. */
|
||||
typedef unsigned char zrtp_zid_t[12];
|
||||
|
||||
/** \brief 16-byte ID for ZRTP endpoint's software identification. */
|
||||
typedef char zrtp_client_id_t[16];
|
||||
|
||||
/**
|
||||
* @brief ZRTP global configuration options
|
||||
* @ingroup zrtp_main_init
|
||||
* @warning Use \ref zrtp_config_defaults() before start configuring this structure.
|
||||
*/
|
||||
typedef struct zrtp_config_t
|
||||
{
|
||||
/** @brief Symbolic client identifier */
|
||||
zrtp_client_id_t client_id;
|
||||
|
||||
/** @brief libzrtp license mode defined protocol behavior */
|
||||
zrtp_license_mode_t lic_mode;
|
||||
|
||||
/** @brief Set this flag to 1 if you product is MiTM box */
|
||||
uint8_t is_mitm;
|
||||
|
||||
/** @brief Set of interfaces required to operate with libzrtp */
|
||||
zrtp_callback_t cb;
|
||||
|
||||
/** @brief Path to zrtp cache file (set if you use built-in realization) */
|
||||
zrtp_string256_t def_cache_path;
|
||||
|
||||
/**
|
||||
* @brief Flush the cache automatically
|
||||
* Set to 1 if you want libzrtp to flush the cache to the persistent storage
|
||||
* right after it is modified. If cache_auto_store is 0, libzrtp will flush
|
||||
* the cache on going down only and the app is responsible for storing the
|
||||
* cache in unexpected situations. Enabled by default.
|
||||
*
|
||||
* @sa zrtp_def_cache_store()
|
||||
*/
|
||||
unsigned cache_auto_store;
|
||||
} zrtp_config_t;
|
||||
|
||||
/**
|
||||
* \brief zrtp stream information structure
|
||||
* \ingroup zrtp_main_management
|
||||
*
|
||||
* libzrtp, since v0.80 takes data encapsulating approach and hides all private data inside
|
||||
* zrtp_stream_t structure. Developers shouldn't access them directly. \ref zrtp_stream_get() should
|
||||
* be used instead to fill zrtp_stream_info_t structure. zrtp_stream_info_t contains all needed
|
||||
* information in safe and easy to use form.
|
||||
*/
|
||||
struct zrtp_stream_info_t
|
||||
{
|
||||
/** \brief Stream unique identifier for debug purposes */
|
||||
zrtp_id_t id;
|
||||
|
||||
/** \brief Pointer to the parent zrtp session */
|
||||
zrtp_session_t* session;
|
||||
|
||||
/** \brief Stream mode. Defines libzrtp behavior related to specified contexts. */
|
||||
zrtp_stream_mode_t mode;
|
||||
|
||||
/** \brief Defines ZRTP Trusted mitm mode for the current session. */
|
||||
zrtp_mitm_mode_t mitm_mode;
|
||||
|
||||
/** \brief Reflects current state of ZRTP protocol */
|
||||
zrtp_state_t state;
|
||||
|
||||
/**
|
||||
* \brief Last protocol error code
|
||||
*
|
||||
* Available for reading in ERROR state on zrtp_security_event_t#ZRTP_EVENT_PROTOCOL_ERROR.
|
||||
*/
|
||||
zrtp_protocol_error_t last_error;
|
||||
|
||||
/**
|
||||
* \brief Remote passive flag
|
||||
*
|
||||
* This flag shows when remote side is "passive" (has license mode PASSIVE) available in CLEAR
|
||||
* state and later.
|
||||
*/
|
||||
uint8_t peer_passive;
|
||||
|
||||
/**
|
||||
* \brief Allowclear flag.
|
||||
*
|
||||
* Current value of "allowclear" option exchanged during ZRTP negotiation. Available in SECURE
|
||||
* state.
|
||||
*/
|
||||
uint8_t res_allowclear;
|
||||
|
||||
/**
|
||||
* \brief Peer disclose bit flag
|
||||
*
|
||||
* Indicates the ability of the remote side to disclose its session key. Specifies that the
|
||||
* remote side allows call monitoring. If this flag is set, the end user must be informed. It
|
||||
* can be read in the SECURE state.
|
||||
*/
|
||||
uint8_t peer_disclose;
|
||||
|
||||
/**
|
||||
* \brief Defines that remote party is ZRTP MiTM endpoint
|
||||
*
|
||||
* Enabled by (Asterisk PBX, UMLab SIP Firewall or etc.) Available for reading in CLEAR state
|
||||
* ande later.
|
||||
*/
|
||||
uint8_t peer_mitm;
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief zrtp session information structure
|
||||
* \ingroup zrtp_main_management
|
||||
* libzrtp, since v0.80 takes data incapsulating approach and hides all private date inside
|
||||
* zrtp_session_t structure. Developers shouldn't access them directly. \ref zrtp_session_get()
|
||||
* should be used instead to fill zrtp_session_info_t structure. zrtp_session_info_t contains all
|
||||
* needed information in safe and easy to use form.
|
||||
*/
|
||||
struct zrtp_session_info_t
|
||||
{
|
||||
/** \brief Session unique identifier for debug purposes */
|
||||
zrtp_id_t id;
|
||||
|
||||
/**
|
||||
* \brief Local ZID
|
||||
*
|
||||
The unique 12-characters string that identifies the local ZRTP endpoint.This ID allows remote
|
||||
* peers to recognize this ZRTP endpoint.
|
||||
*/
|
||||
zrtp_string16_t zid;
|
||||
|
||||
/**
|
||||
* \brief Remote ZID
|
||||
*
|
||||
* Extracted from the Hello packet of the very first ZRTP stream. Uniquely identifies the remote
|
||||
* ZRTP peer.
|
||||
*/
|
||||
zrtp_string16_t peer_zid;
|
||||
|
||||
/** \brief Character name identified remote ZRTP endpoint.*/
|
||||
zrtp_string16_t peer_clientid;
|
||||
|
||||
/** \brief ZRTP Protocol version supported by the remote endpoint. */
|
||||
zrtp_string16_t peer_version;
|
||||
|
||||
/**
|
||||
* \brief Indicates that SAS related data is available for reading.
|
||||
* \note
|
||||
* As SAS is computed in SECURE state only, it may contain unknown values in other states. Check
|
||||
* sas_is_ready before displaying SAS to the user.
|
||||
*/
|
||||
uint8_t sas_is_ready;
|
||||
|
||||
/** \brief First Short Authentication String */
|
||||
zrtp_string16_t sas1;
|
||||
|
||||
/**
|
||||
* \brief Second Short Authentication string.
|
||||
* \note
|
||||
* Second SAS is available for \c base256 authentication only (\c sas_is_base256 is set). In
|
||||
* other case, \c sas1 contains \c base32 value and \c sas2 is empty.
|
||||
*/
|
||||
zrtp_string16_t sas2;
|
||||
|
||||
/** \brief Binary SAS digest (ZRTP_SAS_DIGEST_LENGTH bytes) */
|
||||
zrtp_string32_t sasbin;
|
||||
|
||||
/**
|
||||
* \brief Bit-map to summarize shared secrets "Cached" flags.
|
||||
*
|
||||
* 1 at appropriate bit means that the secrets was found in the cache and restored successfully.
|
||||
* Value equal to 0 indicates that secret for the remote endpoint was not found in the cache
|
||||
* and was generated randomly.
|
||||
* Use ZRTP_BIT_RS1, ZRTP_BIT_RS2, ZRTP_BIT_AUX and ZRTP_BIT_PBX bit-masks to get "cached" value
|
||||
* for the appropriate secret.
|
||||
*/
|
||||
uint32_t cached_flags;
|
||||
|
||||
/**
|
||||
* \brief Bit-map to summarize shared secrets "Matched" flags.
|
||||
*
|
||||
* 1 at appropriate bit means that the secret, locally computed by your ZRTP endpoint is equal
|
||||
* to the secret, received from the remote endpoint. Secrets may not match if one of the
|
||||
* endpoints doesn't use cache of the shared secrets, if the cache was deleted or in case of
|
||||
* an attack.
|
||||
* Use ZRTP_BIT_RS1, ZRTP_BIT_RS2, ZRTP_BIT_AUX and ZRTP_BIT_PBX bit-masks to get "cached" value
|
||||
* for the appropriate secret.
|
||||
*/
|
||||
uint32_t matches_flags;
|
||||
|
||||
/**
|
||||
* \brief Bit-map to summarize shared secrets "Wrong" flags.
|
||||
*
|
||||
* 1 at appropriate bit means that the secret was restored from the cache, but doesn't match
|
||||
* to the remote endpoint's secret. Such situation may happen if the remote endpoint lost cache
|
||||
* or in case of attach.
|
||||
* Use ZRTP_BIT_RS1, ZRTP_BIT_RS2, ZRTP_BIT_AUX and ZRTP_BIT_PBX bit-masks to get "cached" value
|
||||
* for the appropriate secret.
|
||||
*/
|
||||
uint32_t wrongs_flags;
|
||||
|
||||
/**
|
||||
* \brief SAS Verification flag.
|
||||
*
|
||||
* The SAS Verified flag (V) is set based on the user indicating that SAS comparison has been
|
||||
* successfully performed. Each party sends the SAS Verified flag from the previous session in
|
||||
* the Confirm message of the current session.
|
||||
* \sa
|
||||
* - ZRTP RFC section. "7.1. SAS Verified Flag" for more information about Verification Flag.
|
||||
* - zrtp_verified_set()
|
||||
*/
|
||||
uint32_t sas_is_verified;
|
||||
|
||||
/** \brief Indicates base256 SAS encoding */
|
||||
uint8_t sas_is_base256;
|
||||
|
||||
/**
|
||||
* \brief actual lifetime of the secrets
|
||||
*
|
||||
* This variable contains the interval for retaining secrets within an established session. In
|
||||
* accordance with ZRTP RFC this value is calculated as the minimal of local and remote TTLs
|
||||
* after confirmation. Value is given in seconds and can be read in the SECURE state.
|
||||
*/
|
||||
uint32_t secrets_ttl;
|
||||
|
||||
/** \brief Hash crypto component name used in ZRTP calculations. */
|
||||
zrtp_string32_t hash_name;
|
||||
|
||||
/** \brief Cipher crypto component name used in ZRTP encryption. */
|
||||
zrtp_string32_t cipher_name;
|
||||
|
||||
/** \brief SRTP Authentication crypto component name used in ZRTP exchange. */
|
||||
zrtp_string32_t auth_name;
|
||||
|
||||
/** \brief SAS scheme crypto component name used in ZRTP exchange. */
|
||||
zrtp_string32_t sas_name;
|
||||
|
||||
/** \brief Publik Key Exchange name used in ZRTP exchange. */
|
||||
zrtp_string32_t pk_name;
|
||||
};
|
||||
|
||||
/* \} */
|
||||
|
||||
|
||||
/*======================================================================*/
|
||||
/* libzrtp Public API: Streams management */
|
||||
/*======================================================================*/
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \defgroup zrtp_main_init Initalization and Configuration
|
||||
* \ingroup zrtp_api
|
||||
* \{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Initializes libzrtp global config
|
||||
*
|
||||
* zrtp_config_defaults() prepares all fields of zrtp_config_t for further usage in zrtp_init().
|
||||
* This function allocates all necessary resources and initialize zrtp_config_t#cb with default
|
||||
* implementations.
|
||||
*
|
||||
* \param config - libzrtp config for initialization.
|
||||
* \warning this function must be used before start operating with the config.
|
||||
*/
|
||||
void zrtp_config_defaults(zrtp_config_t* config);
|
||||
|
||||
/**
|
||||
* \brief Initializing libzrtp
|
||||
*
|
||||
* This function initializes the library and all its components. zrtp_init() initialize global data
|
||||
* for all sessions and streams. Fields of the global zrtp context are initialized automatically and
|
||||
* shouldn't be modified. For correct memory management, global context should be released by
|
||||
* calling zrtp_down().
|
||||
*
|
||||
* \param config - libzrtp inital parameters
|
||||
* \param zrtp - out parameter, pointer to allocated zrtp global context structure;
|
||||
* \warning this function \b must be called before any operation with libzrtp.
|
||||
* \return
|
||||
* - zrtp_status_ok in successfully initialized or one of zrtp status errors in other case.
|
||||
* \sa zrtp_down()
|
||||
*/
|
||||
zrtp_status_t zrtp_init(zrtp_config_t* config, zrtp_global_t** zrtp);
|
||||
|
||||
/*!
|
||||
* \brief Shutting down the library
|
||||
*
|
||||
* Frees all allocated structures and resources. This function \b must be called at the end of use
|
||||
* to stop libzrtp correctly. zrtp_down() doesn't stop in-progress ZRTP streams. To avoid mistakes,
|
||||
* close all sessions before library deinitialization.
|
||||
*
|
||||
* \param zrtp - global ZRTP context previously allocated by zrtp_init();
|
||||
* \return
|
||||
* - zrtp_status_ok if successfully shut down;
|
||||
* - zrtp_status_fail if an error occurred.
|
||||
* \sa zrtp_init()
|
||||
*/
|
||||
zrtp_status_t zrtp_down(zrtp_global_t* zrtp);
|
||||
|
||||
/* \} */
|
||||
|
||||
/**
|
||||
* \defgroup zrtp_main_management ZRTP Connections
|
||||
* \ingroup zrtp_api
|
||||
* \{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief ZRTP Session Initialization.
|
||||
*
|
||||
* This function allocates and initializes the internal session context data. The given context is
|
||||
* associated with the specified ZRTP identifier. Only after initialization does the session contain
|
||||
* ZRTP_MAX_STREAMS_PER_SESSION streams ready to be used.
|
||||
*
|
||||
* After successfully initialization, configuration will be done according to the relevant profile
|
||||
* \c profile. Profile will be applyed to every stream allocated within this session. Before using
|
||||
* the profile, call zrtp_profile_check() function to make sure that the profile you are applying
|
||||
* is correct.
|
||||
*
|
||||
* \warning Don't call zrtp_session_init() in parallel with other operations on this session.
|
||||
* \param zrtp - global libzrtp context;
|
||||
* \param profile - the session configuration profile. If value of this parameter is NULL, default
|
||||
* profile will be used. NULL profile usage is equivalent to calling zrtp_profile_defaults().
|
||||
* \param zid - ZRTP peer identificator.
|
||||
* \param role - identifies if the endpoint was the signaling initiator of the call. Used to
|
||||
* provide Passive Mode options to the developer. If your application doesn't control signaling
|
||||
* or you don't want to support Passive Mode features - set it to ZRTP_SIGNALING_ROLE_UNKNOWN.
|
||||
* \param session - allocated session structure.
|
||||
* \return
|
||||
* - zrtp_status_ok if initialization is successful;
|
||||
* - zrtp_status_fail if an error occurs.
|
||||
* \sa zrtp_session_down()
|
||||
*/
|
||||
zrtp_status_t zrtp_session_init( zrtp_global_t* zrtp,
|
||||
zrtp_profile_t* profile,
|
||||
zrtp_zid_t zid,
|
||||
zrtp_signaling_role_t role,
|
||||
zrtp_session_t **session);
|
||||
/**
|
||||
* \brief ZRTP Session context deinitialization
|
||||
*
|
||||
* This function releases all resources allocated for internal context operations by zrtp_init().
|
||||
*
|
||||
* \warning Don't call zrtp_session_init() in parallel with other operations on this session.
|
||||
* \param session - session for deinitialization.
|
||||
* \sa zrtp_session_init()
|
||||
*/
|
||||
void zrtp_session_down(zrtp_session_t *session);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Obtain information about ZRTP session
|
||||
*
|
||||
* Function initialize and fills all fields of zrtp_session_info_t structure according to
|
||||
* the current state of ZRTP session.
|
||||
*
|
||||
* \param session - zrtp session which parameters should be extracted;
|
||||
* \param info - out structure to be initialized.
|
||||
* \return
|
||||
* - zrtp_status_ok in case of success.
|
||||
* - zrtp_status_fail if an error occurs.
|
||||
*/
|
||||
zrtp_status_t zrtp_session_get(zrtp_session_t *session, zrtp_session_info_t *info);
|
||||
|
||||
/**
|
||||
* \brief Allow user to associate some data with current zrtp session.
|
||||
* \param session - zrtp session to attach data to.
|
||||
* \param udata - pointer to the user-data context.
|
||||
* \sa zrtp_session_get_userdata()
|
||||
*/
|
||||
void zrtp_session_set_userdata(zrtp_session_t *session, void* udata);
|
||||
|
||||
/**
|
||||
* \brief Return user data associated with the zrtp session
|
||||
* \param session - zrtp session to extract user data.
|
||||
* \return
|
||||
* - pointer to the user-data context previously set by zrtp_session_set_userdata().
|
||||
* - NULL if the user data unavailable.
|
||||
* \sa zrtp_session_set_userdata()
|
||||
*/
|
||||
void* zrtp_session_get_userdata(zrtp_session_t *session);
|
||||
|
||||
/**
|
||||
* \brief Attaching a new stream to the session
|
||||
*
|
||||
* This function call initializes a ZRTP stream and prepares it for use within the specified
|
||||
* session. The maximum number of streams for one session is defined by the
|
||||
* ZRTP_MAX_STREAMS_PER_SESSION variable. All newly created streams are equivalent and have
|
||||
* ZRTP_STREAM_MODE_CLEAR mode and ZRTP_ACTIVE state. Only after attaching a stream, ZRTP protocol
|
||||
* can be initiated.
|
||||
*
|
||||
* \param session - the ZRTP session within which a new stream is to be
|
||||
* \param stream - out parameter, attached stream will be stored there
|
||||
* \return
|
||||
* - zrtp_status_ok if stream was attached successfully
|
||||
* - one of zrtp_status_t errors in case of failure
|
||||
* \sa zrtp_stream_start() zrtp_stream_stop()
|
||||
*/
|
||||
zrtp_status_t zrtp_stream_attach(zrtp_session_t *session, zrtp_stream_t** stream);
|
||||
|
||||
/**
|
||||
* \brief Starting a ZRTP stream
|
||||
*
|
||||
* ZRTP stream setup is initiated by calling this function. Exchange of command packets begins
|
||||
* immediately according to protocol. If the option "autosecure" is on, calling this function is the
|
||||
* only requirement for setting up the ZRTP connection within a stream. If "autosecure" mode is not
|
||||
* available, calling this function activates only connection within a ZRTP stream. A connection can
|
||||
* be established manually later by calling zrtp_stream_secure().
|
||||
*
|
||||
* Setup of the stream/connection takes a certain interval of time. This function just initiates
|
||||
* this process. The system of callbacks informs the user about the progress of libzrtp protocol.
|
||||
*
|
||||
* \param stream - ZRTP stream to be started.
|
||||
* \param ssrc - ssrc which will be used in ZRTP protocol messages. It should match with ssrc of
|
||||
* appropriate RTP stream which will be encrypted by this ZRTP stream.
|
||||
* \return
|
||||
* - zrtp_status_ok in case of success;
|
||||
* - one of zrtp_status_t errors in case of failure
|
||||
* \sa
|
||||
* - \ref XXX_GUIDE_CB \ref XXX_GUIDE_MANAGEMENT
|
||||
* - zrtp_stream_stop() zrtp_stream_secure() zrtp_stream_clear()
|
||||
*/
|
||||
zrtp_status_t zrtp_stream_start(zrtp_stream_t* stream,
|
||||
uint32_t ssrc);
|
||||
|
||||
/**
|
||||
* \brief ZRTP protocol stopping
|
||||
*
|
||||
* This function stops all protocol operations for the specified stream, releases resources
|
||||
* allocated on the zrtp_stream_start() and prepares the stream structure for the next use.
|
||||
*
|
||||
* This function will stop the protocol at any stage: all delayed tasks are canceled, and the
|
||||
* protocol packet exchange and encryption is stopped. After this function call it is necessary to
|
||||
* stop processing traffic using the zrtp_process_xxx() function.
|
||||
*
|
||||
* \param stream - the stream being shutdown.
|
||||
* \return
|
||||
* - zrtp_status_ok in case of success;
|
||||
* - one of zrtp_status_t errors in case of failure
|
||||
* \sa
|
||||
* - \ref XXX_GUIDE_CB \ref XXX_GUIDE_MANAGEMENT
|
||||
* - zrtp_stream_start() zrtp_stream_secure() zrtp_stream_clear()
|
||||
*/
|
||||
zrtp_status_t zrtp_stream_stop(zrtp_stream_t* stream);
|
||||
|
||||
/*!
|
||||
* \brief Initiating an interruption of the secure connection
|
||||
*
|
||||
* This function initiates the shutting down of the ZRTP connection within a stream. In other words,
|
||||
* after successfully switching to secure mode (\ref XXX SECURE state, fig. 1.5), calling this
|
||||
* function begins the exchange of packets switching back to insecure (CLEAR) mode.
|
||||
*
|
||||
* This function can only be implemented from the SECURE state. Attempt to call this function from
|
||||
* any other state will end in failure. The client application is informed about protocol
|
||||
* progress through a system of callbacks.
|
||||
*
|
||||
* \param stream - ZRTP stream .
|
||||
* \return
|
||||
* - zrtp_status_ok - if shutting down the connection is started successfully.
|
||||
* - zrtp_status_fail - if shutting down the connection is initiated from an incorrect state.
|
||||
* \sa
|
||||
* - \ref XXX_GUIDE_CB \ref XXX_GUIDE_MANAGEMENT
|
||||
* - zrtp_stream_start() zrtp_stream_secure() zrtp_stream_clear()
|
||||
*/
|
||||
zrtp_status_t zrtp_stream_clear(zrtp_stream_t *stream);
|
||||
|
||||
/**
|
||||
* \brief Initiating a secure connection setup
|
||||
*
|
||||
* The function initiates a ZRTP connection setup within a stream. In other words, after the
|
||||
* protocol has started and Discovery phase have been successfully accomplished, calling this
|
||||
* function will begin the exchange of packets for switching to SECURE mode.
|
||||
*
|
||||
* This function can be successfully performed only from the CLEAR state (\ref XXX Figure 1.6).
|
||||
* Attempting to call this function from any other state will result in failure. The client
|
||||
* application is informed about protocol progress through a system of callbacks.
|
||||
*
|
||||
* \param stream - ZRTP stream to be secured.
|
||||
* \return
|
||||
* - zrtp_status_ok - if switching to secure mode started successfully.
|
||||
* - zrtp_status_fail - if switching to secure mode is initiated from a state other than CLEAR.
|
||||
* \sa
|
||||
* - \ref XXX_GUIDE_CB \ref XXX_GUIDE_MANAGEMENT.
|
||||
* - zrtp_stream_start() zrtp_stream_clear().
|
||||
*/
|
||||
zrtp_status_t zrtp_stream_secure(zrtp_stream_t *stream);
|
||||
|
||||
/**
|
||||
* \brief Obtain information about zrtp stream
|
||||
*
|
||||
* Function initialize and fills all fields of zrtp_stream_info_t structure accordint to
|
||||
* current state of zrtp stream.
|
||||
*
|
||||
* \param stream - zrtp stream which parameters should be extracted
|
||||
* \param info - out structure to be initialized
|
||||
* \return
|
||||
* - zrtp_status_ok in case of success.
|
||||
* - zrtp_status_fail if an error occurs.
|
||||
*/
|
||||
zrtp_status_t zrtp_stream_get(zrtp_stream_t *stream, zrtp_stream_info_t *info);
|
||||
|
||||
/**
|
||||
* @brief Allow user to associate some data with zrtp stream.
|
||||
* @param stream - zrtp stream to attach data to.
|
||||
* @param udata - pointer to the user-data context.
|
||||
* @sa zrtp_stream_get_userdata()
|
||||
*/
|
||||
void zrtp_stream_set_userdata(zrtp_stream_t *stream, void* udata);
|
||||
|
||||
/**
|
||||
* \brief Return user data associated with the zrtp stream
|
||||
* \return
|
||||
* - pointer to the user-data context previously set by zrtp_stream_set_userdata()
|
||||
* - NULL if user data unavailable;
|
||||
* \sa zrtp_stream_set_userdata()
|
||||
*/
|
||||
void* zrtp_stream_get_userdata(const zrtp_stream_t *stream);
|
||||
|
||||
/* \} */
|
||||
|
||||
/*======================================================================*/
|
||||
/* libzrtp Public API: Encryption */
|
||||
/*======================================================================*/
|
||||
|
||||
/**
|
||||
* \defgroup zrtp_main_proto Traffic Processing
|
||||
* \ingroup zrtp_api
|
||||
* \{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Processing outgoing RTP packets
|
||||
*
|
||||
* This is the main function for processing outgoing RTP packets. As soon as the protocol is
|
||||
* started, each outgoing RTP packet (not encrypted) has to go through this function.
|
||||
*
|
||||
* It performs different actions depending on the connection state and packet type:
|
||||
* - In setup ZRTP connection mode, it encrypts outgoing RTP packets. The packet is encrypted right
|
||||
* in the transferred buffer;
|
||||
* - Protects codec and data privacy by deleting certain packets from the stream. In this case the
|
||||
* body and the length of the packet remain unchanged.
|
||||
*
|
||||
* \param stream - ZRTP stream to process RTP packet;
|
||||
* \param packet - buffer storing the RTP packet for encryption. After processing, the encrypted
|
||||
* packet is stored in the same buffer.
|
||||
* \param length - the length of the buffered packet. After processing, the length of encrypted
|
||||
* packet is stored here.
|
||||
* \warning During encryption, the data length increases in comparison to the source data. Because
|
||||
* the function uses the same buffer both for incoming and resulting values, the length of the
|
||||
* buffer must be larger than size of source packet.
|
||||
* \return
|
||||
* - zrtp_status_ok if encryption is successful. The packet should be sent to the recipient.
|
||||
* - zrtp_status_fail if there was an error during encryption. The packet should be rejected.
|
||||
* - zrtp_status_drop if there was interference in the VoIP client codec protection mechanism. The
|
||||
* packet should be rejected.
|
||||
* \sa zrtp_process_srtp() zrtp_process_rtcp() zrtp_process_srtcp()
|
||||
*/
|
||||
zrtp_status_t zrtp_process_rtp( zrtp_stream_t *stream,
|
||||
char* packet,
|
||||
unsigned int* length);
|
||||
|
||||
/**
|
||||
* \brief Processing incoming RTP packets
|
||||
*
|
||||
* This is the main function for incoming RTP packets processing. It is an analogue of
|
||||
* zrtp_process_rtp() but for an incoming stream. After the protocol is started, each (encrypted)
|
||||
* incoming RTP packet has to go through this function.
|
||||
*
|
||||
* It performs different actions depending on the connection state and packet type:
|
||||
* - during setup/interruption of ZRTP connection, processes incoming protocol packets. The body
|
||||
* and length of the packet remain unchanged;
|
||||
* - in setup ZRTP connection mode, decrypts incoming RTP packet. The packet is decrypted right in
|
||||
* the transferred buffer;
|
||||
* - protects codec and data privacy by deleting certain packets from the stream. In this case the
|
||||
* body and the length of the packet remain unchanged.
|
||||
*
|
||||
* \param stream - ZRTP stream for processing
|
||||
* \param packet - buffer storing the packet for decrypting. After processing, the decrypted packet
|
||||
* is stored in the same buffer;
|
||||
* \param length - the length of the buffered packet. After processing, the length of decrypted
|
||||
* packet is stored here;
|
||||
* \return
|
||||
* - zrtp_status_ok if decrypting is successful. Such a packet should be sent to the recipient;
|
||||
* - zrtp_status_fail if an error occurred during decrypting or command packet processing. The
|
||||
* packet should be rejected;
|
||||
* - zrtp_status_drop if the command packet processing is successful or if there was interference
|
||||
* in the VoIP client codec protection mechanism. The packet should be rejected in either case;
|
||||
* \sa zrtp_process_rtp() zrtp_process_rtcp() zrtp_process_srtcp()
|
||||
*/
|
||||
zrtp_status_t zrtp_process_srtp( zrtp_stream_t *stream,
|
||||
char* packet,
|
||||
unsigned int* length);
|
||||
|
||||
/*!
|
||||
* \brief Processing outgoing RTCP packets
|
||||
*
|
||||
* This is the main function for processing outgoing RTCP packets. The function behavior is similar
|
||||
* to that of zrtp_process_rtp():
|
||||
* - In SECURE mode, encrypts outgoing RTCP packets. The packet is encrypted right in the
|
||||
* transferred buffer. The length of encrypted packet is returned in the \c length variable;
|
||||
* - protects codec and data privacy by deleting certain packets from the stream. In this case the
|
||||
* body and the length of the packet remain unchanged.
|
||||
*
|
||||
* \param stream - ZRTP session for processing;
|
||||
* \param packet - buffer storing RTCP packet;
|
||||
* \param length - length of the buffered packet.
|
||||
* \return
|
||||
* - zrtp_status_ok if encryption is successful. The packet should be sent to the recipient.
|
||||
* - zrtp_status_fail if there was an error during encryption. The packet should be rejected.
|
||||
* - zrtp_status_drop if there was interference in the VoIP client codec protection mechanism. The
|
||||
* packet should be rejected.
|
||||
* \sa zrtp_process_srtp() zrtp_process_rtp() zrtp_process_srtcp()
|
||||
*/
|
||||
zrtp_status_t zrtp_process_rtcp( zrtp_stream_t *stream,
|
||||
char* packet,
|
||||
unsigned int* length);
|
||||
|
||||
/**
|
||||
* \brief Processing incoming RTCP packets
|
||||
*
|
||||
* This is the main function for processing incoming RTCP packets. The function behavior is similar
|
||||
* to that of zrtp_process_srtp():
|
||||
* - In SECURE mode, decrypts incoming RTCP packets. The packet is decrypted right in the
|
||||
* transferred buffer. The length of the encrypted packet is returned in the \c length variable;
|
||||
* - In transition states, drops all incoming RTCP traffic. In this case the body and the length of
|
||||
* the packet remain unchanged.
|
||||
*
|
||||
* \param stream - ZRTP stream for processing;
|
||||
* \param packet - buffer storing the RTCP packet;
|
||||
* \param length - length of the buffered packet.
|
||||
* \return
|
||||
* - zrtp_status_ok if decrypting is successful. Such a packet should be sent to the recipient;
|
||||
* - zrtp_status_drop if the command packet processing is successful or if there was interference
|
||||
* in the VoIP client codec protection mechanism. The packet should be rejected in either case;
|
||||
* - zrtp_status_fail if there was an error during encryption. The packet should be rejected.
|
||||
* \sa zrtp_process_srtp() zrtp_process_rtp() zrtp_process_rtcp()
|
||||
*/
|
||||
zrtp_status_t zrtp_process_srtcp( zrtp_stream_t *stream,
|
||||
char* packet,
|
||||
unsigned int* length);
|
||||
|
||||
/* \} */
|
||||
|
||||
/**
|
||||
* \defgroup zrtp_main_utils Utilities
|
||||
* \ingroup zrtp_api
|
||||
* \{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Specifies the hash of the peer Hello message for verification.
|
||||
*
|
||||
* In accordance with the ZRTP RFC sec. 9, this protocol can prevent DOS attacks by verification of
|
||||
* the Hello message hash sent through the signaling protocol.
|
||||
*
|
||||
* This function allows the user to specify the Hello hash for verification. If after the
|
||||
* discovering phase the Hello hashes don't match, libzrtp raises the
|
||||
* zrtp_event_t#ZRTP_EVENT_WRONG_SIGNALING_HASH event. This function should only be called before
|
||||
* starting the protocol from the ZRTP_STATE_ACTIVE state.
|
||||
*
|
||||
* \param stream - stream for operating with;
|
||||
* \param hash_buff - signaling hash buffer. Function accepts string, not a binary value!;
|
||||
* \param hash_buff_length - signaling hash length in bytes, must be ZRTP_SIGN_ZRTP_HASH_LENGTH bytes;
|
||||
* \return:
|
||||
* - zrtp_status_ok if the operation finished successfully
|
||||
* - one of the errors otherwise
|
||||
* \sa
|
||||
* - ZRTP RFC. sec 8;
|
||||
* - zrtp_signaling_hash_get()
|
||||
*/
|
||||
zrtp_status_t zrtp_signaling_hash_set( zrtp_stream_t* stream,
|
||||
const char *hash_buff,
|
||||
uint32_t hash_buff_length);
|
||||
|
||||
/**
|
||||
* \brief Returns the hash of the Hello message to be transferred in signaling.
|
||||
*
|
||||
* To prevent DOS attacks, the hash of the Hello message may be sent through signaling.
|
||||
* zrtp_signaling_hash_get() may be called after attaching the stream to receive the value of this
|
||||
* hash.
|
||||
*
|
||||
* \param stream - stream for operating with
|
||||
* \param hash_buff - buffer for storing signaling hash. Function returns already parsed hex string.
|
||||
* String is null-terminated. Buffer must be at least ZRTP_SIGN_ZRTP_HASH_LENGTH bytes length.
|
||||
* \param hash_buff_length - buffer length in bytes, non less than ZRTP_SIGN_ZRTP_HASH_LENGTH bytes.
|
||||
* \return:
|
||||
* - zrtp_status_ok if the operation finished successfully
|
||||
* - one of the errors otherwise
|
||||
* \sa
|
||||
* - ZRTP RFC. sec 8;
|
||||
* - zrtp_signaling_hash_set()
|
||||
*/
|
||||
zrtp_status_t zrtp_signaling_hash_get(zrtp_stream_t* stream,
|
||||
char* hash_buff,
|
||||
uint32_t hash_buff_length);
|
||||
|
||||
/**
|
||||
* \brief Changing the value of the secret's verification flag
|
||||
*
|
||||
* This function is used to change (set, unset) the secret's verification flag. zrtp_verified_set()
|
||||
* changes the relevant internal data and stores a flag in the cache.
|
||||
* \note
|
||||
* Special synchronization mechanisms are provided to protect the cache from race conditions. Don't
|
||||
* change the verified flag directly in the cache - use this function.
|
||||
*
|
||||
* \param zrtp - zrtp global data;
|
||||
* \param zid1 - ZID of the first party;
|
||||
* \param zid2 - ZID of the second party;
|
||||
* \param verified - Boolean value of the verified flag.
|
||||
* \return
|
||||
* - zrtp_status_ok - if successful;
|
||||
* - one of zrtp_status_t errors if fails.
|
||||
*/
|
||||
zrtp_status_t zrtp_verified_set( zrtp_global_t *zrtp,
|
||||
zrtp_string16_t *zid1,
|
||||
zrtp_string16_t *zid2,
|
||||
uint8_t verified);
|
||||
|
||||
/**
|
||||
* \brief Verifying the ZRTP profile
|
||||
*
|
||||
* zrtp_profile_check() checks the correctness of the values in the profile. The following checks
|
||||
* are performed:
|
||||
* - the number of components in each group does not exceed ZRTP_MAX_COMP_COUNT;
|
||||
* - the components declared are supported by the library kernel.
|
||||
* - presence of the set of obligatory components defined by ZRTP RFC.
|
||||
*
|
||||
* \param profile - ZRTP profile for validation;
|
||||
* \param zrtp - global ZRTP context.
|
||||
* \return
|
||||
* - zrtp_status_ok - if profile passed all available tests;
|
||||
* - one of ZRTP errors - if there are mistakes in the profile. See debug logging for additional
|
||||
* information.
|
||||
*/
|
||||
zrtp_status_t zrtp_profile_check(const zrtp_profile_t* profile, zrtp_global_t* zrtp);
|
||||
|
||||
/**
|
||||
* \brief Configure the default ZRTP profile
|
||||
*
|
||||
* These options are used:
|
||||
* \code
|
||||
* "active" is enabled;
|
||||
* "allowclear" is disabled by default and enabled for Zfone only;
|
||||
* "autosecure" is enabled;
|
||||
* "disclose_bit" is disabled;
|
||||
* cache_ttl = ZRTP_CACHE_DEFAULT_TTL defined by ZRTP RFC;
|
||||
*
|
||||
* [sas_schemes] = ZRTP_SAS_BASE256, ZRTP_SAS_BASE32;
|
||||
* [cipher_types] = ZRTP_CIPHER_AES128;
|
||||
* [pk_schemes] = ZRTP_PKTYPE_DH3072;
|
||||
* [auth_tag_lens] = ZRTP_ATL_HS32;
|
||||
* [hash_schemes] = ZRTP_HASH_SHA256;
|
||||
* \endcode
|
||||
*
|
||||
* \param profile - ZRTP stream profile for filling;
|
||||
* \param zrtp - libzrtp global context.
|
||||
*/
|
||||
void zrtp_profile_defaults(zrtp_profile_t* profile, zrtp_global_t* zrtp);
|
||||
|
||||
/**
|
||||
* \brief Search for a component in the profile by ID
|
||||
*
|
||||
* The utility function returning the position of an element of the specified type in the profile.
|
||||
* Used by libZRTP kernel and for external use.
|
||||
*
|
||||
* \param profile - ZRTP profile;
|
||||
* \param type - sought component type;
|
||||
* \param id - sought component ID.
|
||||
* \return
|
||||
* - component position - if component was found;
|
||||
* -1 - if the component with the specified ID can't be found in profile.
|
||||
*/
|
||||
int zrtp_profile_find(const zrtp_profile_t* profile, zrtp_crypto_comp_t type, uint8_t id);
|
||||
|
||||
/* \} */
|
||||
|
||||
/**
|
||||
* \defgroup zrtp_main_rng Random Number Generation
|
||||
* \ingroup zrtp_api
|
||||
* \{
|
||||
* The generation of cryptographic key material is a highly sensitive process. To do this, you need
|
||||
* high entropy random numbers that an attacker cannot predict. This section \ref rng gives basic
|
||||
* knowliges andbot the RNG and it's implementation in libzrtp.
|
||||
* \warning
|
||||
* \ref rng \c MUST be read by every developer using libzrtp.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Entropy accumulation routine
|
||||
*
|
||||
* The random number generation scheme is described in detail in chapter \ref XXX. This function
|
||||
* gets \c length bytes of entropy from \c buffer and hashes it into the special storage. This
|
||||
* function should be called periodically from the user's space to increase entropy quality.
|
||||
* \warning
|
||||
* RNG is a very important and sensitive component of the crypto-system. Please, pay attention to
|
||||
* \ref rng.
|
||||
* \param zrtp - libzrtp global context;
|
||||
* \param buffer - pointer to the buffer with entropy for accumulating;
|
||||
* \param length - entropy size in bytes.
|
||||
* \return: number of hashed bytes.
|
||||
*/
|
||||
int zrtp_entropy_add(zrtp_global_t* zrtp, const unsigned char *buffer, uint32_t length);
|
||||
|
||||
/**
|
||||
* \brief Random string generation
|
||||
*
|
||||
* zrtp_randstr() generates \c length bytes of "random" data. We say "random" because the
|
||||
* "randomness" of the generated sequence depends on the quality of the entropy passed to
|
||||
* zrtp_entropy_add(). If the user provides "good" entropy, zrtp_randstr() generates sufficiently
|
||||
* "random" data.
|
||||
*
|
||||
* \param zrtp - libzrtp global context;
|
||||
* \param buffer - buffer into which random data will be generated;
|
||||
* \param length - length of required sequence in bytes.
|
||||
* \return
|
||||
* - length of generated sequence in bytes or -1 in case of error
|
||||
* \sa \ref rng
|
||||
*/
|
||||
int zrtp_randstr(zrtp_global_t* zrtp, unsigned char *buffer, uint32_t length);
|
||||
|
||||
int zrtp_randstr2(unsigned char *buffer, uint32_t length);
|
||||
|
||||
/* \} */
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ZRTP_H__ */
|
|
@ -1,208 +0,0 @@
|
|||
/*
|
||||
* libZRTP SDK library, implements the ZRTP secure VoIP protocol.
|
||||
* Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
* Contact: http://philzimmermann.com
|
||||
* For licensing and other legal details, see the file zrtp_legal.c.
|
||||
*
|
||||
* Viktor Krykun <v.krikun at zfoneproject.com>
|
||||
*/
|
||||
|
||||
#ifndef __ZRTP_BASE_H__
|
||||
#define __ZRTP_BASE_H__
|
||||
|
||||
#include "zrtp_config.h"
|
||||
|
||||
typedef double uint64_t_;
|
||||
|
||||
typedef uint8_t zrtp_uchar4_t[4];
|
||||
typedef uint8_t zrtp_uchar8_t[8];
|
||||
typedef uint8_t zrtp_uchar12_t[12];
|
||||
typedef uint8_t zrtp_uchar16_t[16];
|
||||
typedef uint8_t zrtp_uchar32_t[32];
|
||||
typedef uint8_t zrtp_uchar64_t[64];
|
||||
typedef uint8_t zrtp_uchar128_t[128];
|
||||
typedef uint8_t zrtp_uchar256_t[256];
|
||||
typedef uint8_t zrtp_uchar1024_t[1024];
|
||||
|
||||
typedef uint32_t zrtp_id_t;
|
||||
|
||||
typedef struct zrtp_profile_t zrtp_profile_t;
|
||||
typedef struct zrtp_stream_t zrtp_stream_t;
|
||||
typedef struct zrtp_session_t zrtp_session_t;
|
||||
typedef struct zrtp_global_t zrtp_global_t;
|
||||
|
||||
typedef struct zrtp_protocol_t zrtp_protocol_t;
|
||||
typedef struct zrtp_srtp_ctx_t zrtp_srtp_ctx_t;
|
||||
typedef struct zrtp_shared_secret_t zrtp_shared_secret_t;
|
||||
typedef struct zrtp_retry_task_t zrtp_retry_task_t;
|
||||
|
||||
typedef struct zrtp_hash_t zrtp_hash_t;
|
||||
typedef struct zrtp_cipher_t zrtp_cipher_t;
|
||||
typedef struct zrtp_auth_tag_length_t zrtp_auth_tag_length_t;
|
||||
typedef struct zrtp_pk_scheme_t zrtp_pk_scheme_t;
|
||||
typedef struct zrtp_sas_scheme_t zrtp_sas_scheme_t;
|
||||
typedef struct zrtp_sig_scheme_t zrtp_sig_scheme_t;
|
||||
|
||||
typedef struct zrtp_mutex_t zrtp_mutex_t;
|
||||
typedef struct zrtp_sem_t zrtp_sem_t;
|
||||
|
||||
typedef struct zrtp_stream_info_t zrtp_stream_info_t;
|
||||
typedef struct zrtp_session_info_t zrtp_session_info_t;
|
||||
|
||||
#include "sha2.h"
|
||||
#define MD_CTX sha512_ctx
|
||||
#define MD_Update(a,b,c) sha512_hash((const unsigned char *)(b),c,a)
|
||||
|
||||
|
||||
/**
|
||||
* \brief Function computing minimum value
|
||||
*
|
||||
* This macro returns the lesser of two values. If the numbers are equal, either of them is returned.
|
||||
*
|
||||
* \param left - first value for comparison;
|
||||
* \param right - second value for comparison.
|
||||
* \return
|
||||
* - lesser of compared numbers.
|
||||
*/
|
||||
#define ZRTP_MIN(left, right) ((left < right) ? left : right)
|
||||
|
||||
|
||||
/*!
|
||||
* \brief zrtp_htonXX, zrtp_ntohXX - convert values between host and network
|
||||
* byte order
|
||||
*
|
||||
* To avoid ambiguities and difficulties with compilation on various platforms,
|
||||
* we designed our own swap functions. Byte order detection is based on zrtp_system.h.
|
||||
*
|
||||
* On the i80x86 the host byte order is little-endian (least significant byte
|
||||
* first), whereas the network byte order, as used on the Internet, is
|
||||
* big-endian (most significant byte first).
|
||||
*/
|
||||
|
||||
uint16_t zrtp_swap16(uint16_t x);
|
||||
uint32_t zrtp_swap32(uint32_t x);
|
||||
uint64_t zrtp_swap64(uint64_t x);
|
||||
|
||||
#if ZRTP_BYTE_ORDER == ZBO_BIG_ENDIAN
|
||||
/*! Converts 16 bit unsigned integer to network byte order */
|
||||
#define zrtp_hton16(x) (x)
|
||||
/*! Converts 32 bit unsigned integer to network byte order */
|
||||
#define zrtp_hton32(x) (x)
|
||||
/*! Converts 64 bit unsigned integer to network byte order */
|
||||
#define zrtp_hton64(x) (x)
|
||||
|
||||
/*! Converts 16 bit unsigned integer to host byte order */
|
||||
#define zrtp_ntoh16(x) (x)
|
||||
/*! Converts 32 bit unsigned integer to host byte order */
|
||||
#define zrtp_ntoh32(x) (x)
|
||||
/*! Converts 64 bit unsigned integer to host byte order */
|
||||
#define zrtp_ntoh64(x) (x)
|
||||
#else /* ZBO_BIG_ENDIAN */
|
||||
/*! Converts 16 bit unsigned integer to network byte order */
|
||||
#define zrtp_hton16(x) (zrtp_swap16(x))
|
||||
/*! Converts 32 bit unsigned integer to network byte order */
|
||||
#define zrtp_hton32(x) (zrtp_swap32(x))
|
||||
/*! Converts 64 bit unsigned integer to network byte order */
|
||||
#define zrtp_hton64(x) (zrtp_swap64(x))
|
||||
|
||||
/*! Converts 16 bit unsigned integer to host byte order */
|
||||
#define zrtp_ntoh16(x) (zrtp_swap16(x))
|
||||
/*! Converts 32 bit unsigned integer to host byte order */
|
||||
#define zrtp_ntoh32(x) (zrtp_swap32(x))
|
||||
/*! Converts 64 bit unsigned integer to host byte order */
|
||||
#define zrtp_ntoh64(x) (zrtp_swap64(x))
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* 128 and 256-bit structures used in Ciphers and SRTP module
|
||||
*/
|
||||
typedef union
|
||||
{
|
||||
uint8_t v8[16];
|
||||
uint16_t v16[8];
|
||||
uint32_t v32[4];
|
||||
uint64_t v64[2];
|
||||
} zrtp_v128_t;
|
||||
|
||||
typedef union
|
||||
{
|
||||
uint8_t v8[32];
|
||||
uint16_t v16[16];
|
||||
uint32_t v32[8];
|
||||
uint64_t v64[4];
|
||||
} zrtp_v256_t;
|
||||
|
||||
/*
|
||||
* The following macros define the data manipulation functions.
|
||||
*
|
||||
* If DATATYPES_USE_MACROS is defined, then these macros are used directly (and
|
||||
* function-call overhead is avoided). Otherwise, the macros are used through
|
||||
* the functions defined in datatypes.c (and the compiler provides better
|
||||
* warnings).
|
||||
*/
|
||||
|
||||
#define _zrtp_v128_xor(z, x, y) \
|
||||
( \
|
||||
(z)->v32[0] = (x)->v32[0] ^ (y)->v32[0], \
|
||||
(z)->v32[1] = (x)->v32[1] ^ (y)->v32[1], \
|
||||
(z)->v32[2] = (x)->v32[2] ^ (y)->v32[2], \
|
||||
(z)->v32[3] = (x)->v32[3] ^ (y)->v32[3] \
|
||||
)
|
||||
|
||||
#define _zrtp_v128_get_bit(x, bit) \
|
||||
( \
|
||||
( (((x)->v32[(bit) >> 5]) >> ((bit) & 31)) & 1) \
|
||||
)
|
||||
|
||||
#define zrtp_bitmap_get_bit(x, bit) \
|
||||
( \
|
||||
( (((x)[(bit) >> 3]) >> ((bit) & 7) ) & 1) \
|
||||
)
|
||||
|
||||
#define zrtp_bitmap_set_bit(x, bit) \
|
||||
( \
|
||||
( (((x)[(bit) >> 3])) |= ((uint8_t)1 << ((bit) & 7)) ) \
|
||||
)
|
||||
|
||||
#define zrtp_bitmap_clear_bit(x, bit) \
|
||||
( \
|
||||
( (((x)[(bit) >> 3])) &= ~((uint8_t)1 << ((bit) & 7)) ) \
|
||||
)
|
||||
|
||||
void zrtp_bitmap_left_shift(uint8_t *x, int width_bytes, int index);
|
||||
|
||||
void zrtp_v128_xor(zrtp_v128_t *z, zrtp_v128_t *x, zrtp_v128_t *y);
|
||||
|
||||
|
||||
|
||||
//WIN64 {
|
||||
#if (ZRTP_PLATFORM == ZP_WIN32_KERNEL)
|
||||
|
||||
#ifdef WIN64 // For 64-bit apps
|
||||
|
||||
unsigned __int64 __rdtsc(void);
|
||||
#pragma intrinsic(__rdtsc)
|
||||
#define _RDTSC __rdtsc
|
||||
|
||||
#else // For 32-bit apps
|
||||
|
||||
#define _RDTSC_STACK(ts) \
|
||||
__asm rdtsc \
|
||||
__asm mov DWORD PTR [ts], eax \
|
||||
__asm mov DWORD PTR [ts+4], edx
|
||||
|
||||
__inline unsigned __int64 _inl_rdtsc32() {
|
||||
unsigned __int64 t;
|
||||
_RDTSC_STACK(t);
|
||||
return t;
|
||||
}
|
||||
#define _RDTSC _inl_rdtsc32
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
//WIN64 }
|
||||
|
||||
|
||||
#endif /*__ZRTP_BASE_H__*/
|
|
@ -1,271 +0,0 @@
|
|||
/*
|
||||
* libZRTP SDK library, implements the ZRTP secure VoIP protocol.
|
||||
* Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
* Contact: http://philzimmermann.com
|
||||
* For licensing and other legal details, see the file zrtp_legal.c.
|
||||
*
|
||||
* Viktor Krykun <v.krikun at zfoneproject.com>
|
||||
*/
|
||||
|
||||
#ifndef __ZRTP_CONFIG_H__
|
||||
#define __ZRTP_CONFIG_H__
|
||||
|
||||
#include "zrtp_config_user.h"
|
||||
|
||||
/*
|
||||
* ZRTP PLATFORM DETECTION
|
||||
* If platworm is not specified manually in zrtp_config_user.h - try to detect it aytomatically
|
||||
*/
|
||||
#if !defined(ZRTP_PLATFORM)
|
||||
# if defined(ANDROID_NDK)
|
||||
# define ZRTP_PLATFORM ZP_ANDROID
|
||||
# elif defined(__FreeBSD__)
|
||||
# define ZRTP_PLATFORM ZP_BSD
|
||||
# elif defined(linux) || defined(__linux__) || defined(__linux)
|
||||
# include <linux/version.h>
|
||||
# define ZRTP_PLATFORM ZP_LINUX
|
||||
# elif defined(__MACOSX__) || defined (__APPLE__) || defined (__MACH__)
|
||||
# define ZRTP_PLATFORM ZP_DARWIN
|
||||
# elif defined(_WIN32_WCE) || defined(UNDER_CE)
|
||||
# include <windef.h>
|
||||
# define ZRTP_PLATFORM ZP_WINCE
|
||||
# elif defined(__SYMBIAN32__)
|
||||
# define ZRTP_PLATFORM ZP_SYMBIAN
|
||||
# elif defined(_WIN32) || defined(__WIN32__) || defined(_WIN64) || defined(WIN32) || defined(__TOS_WIN__)
|
||||
# if defined(__BUILDMACHINE__) && (__BUILDMACHINE__ == WinDDK)
|
||||
# define ZRTP_PLATFORM ZP_WIN32_KERNEL
|
||||
# elif defined(_WIN64)
|
||||
# define ZRTP_PLATFORM ZP_WIN32
|
||||
# else
|
||||
# define ZRTP_PLATFORM ZP_WIN32
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if ZRTP_PLATFORM == ZP_ANDROID
|
||||
# include "zrtp_config_android.h"
|
||||
#elif (ZRTP_PLATFORM == ZP_LINUX) || (ZRTP_PLATFORM == ZP_DARWIN) || (ZRTP_PLATFORM == ZP_BSD) || defined(ZRTP_AUTOMAKE)
|
||||
# include "zrtp_config_unix.h"
|
||||
#elif (ZRTP_PLATFORM == ZP_WIN32) || (ZRTP_PLATFORM == ZP_WIN32_KERNEL) || (ZRTP_PLATFORM == ZP_WINCE)
|
||||
# include "zrtp_config_win.h"
|
||||
#elif (ZRTP_PLATFORM == ZP_SYMBIAN)
|
||||
# include "zrtp_config_symbian.h"
|
||||
#endif
|
||||
|
||||
#if !defined(ZRTP_PLATFORM)
|
||||
# error "Libzrtp can't detect software platform: use manual setup in zrtp_config_user.h"
|
||||
#endif
|
||||
|
||||
#if ZRTP_HAVE_LINUX_VERSION_H == 1
|
||||
#include <linux/version.h>
|
||||
#endif
|
||||
#if ZRTP_HAVE_ASM_TYPES_H == 1
|
||||
#include <asm/types.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* ZRTP BYTEORDER DETECTION
|
||||
* If the byte order is not specified manually in zrtp_config_user.h - try to detect it automatically
|
||||
*/
|
||||
#if !defined(ZRTP_BYTE_ORDER)
|
||||
|
||||
#if defined(_i386_) || defined(i_386_) || defined(_X86_) || defined(x86) || defined(__i386__) || \
|
||||
defined(__i386) || defined(_M_IX86) || defined(__I86__)
|
||||
/*
|
||||
* Generic i386 processor family, little-endian
|
||||
*/
|
||||
#define ZRTP_BYTE_ORDER ZBO_LITTLE_ENDIAN
|
||||
|
||||
#elif defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) || defined(_AMD64_)
|
||||
/*
|
||||
* AMD 64bit processor, little endian
|
||||
*/
|
||||
#define ZRTP_BYTE_ORDER ZBO_LITTLE_ENDIAN
|
||||
|
||||
#elif defined( __sparc__) || defined(__sparc)
|
||||
/*
|
||||
* Sun Sparc, big endian
|
||||
*/
|
||||
#define ZRTP_BYTE_ORDER ZBO_BIG_ENDIAN
|
||||
|
||||
#elif defined(__AARCH64EB__)
|
||||
/*
|
||||
* aarch64, big endian
|
||||
*/
|
||||
#define ZRTP_BYTE_ORDER ZBO_BIG_ENDIAN
|
||||
|
||||
#elif defined(ARM) || defined(_ARM_) || defined(ARMV4) || defined(__arm__) || defined(__AARCH64EL__)
|
||||
/*
|
||||
* ARM, default to little endian
|
||||
*/
|
||||
#define ZRTP_BYTE_ORDER ZBO_LITTLE_ENDIAN
|
||||
|
||||
#elif defined(__powerpc) || defined(__powerpc__) || defined(__POWERPC__) || defined(__ppc__) || \
|
||||
defined(_M_PPC) || defined(_ARCH_PPC)
|
||||
/*
|
||||
* PowerPC, big endian
|
||||
*/
|
||||
#define ZRTP_BYTE_ORDER ZBO_BIG_ENDIAN
|
||||
|
||||
#elif defined(__MIPSEB__)
|
||||
/*
|
||||
* mips, big endian
|
||||
*/
|
||||
#define ZRTP_BYTE_ORDER ZBO_BIG_ENDIAN
|
||||
|
||||
#elif defined(__MIPSEL__)
|
||||
/*
|
||||
* mips, little endian
|
||||
*/
|
||||
#define ZRTP_BYTE_ORDER ZBO_LITTLE_ENDIAN
|
||||
|
||||
#elif defined(__e2k__)
|
||||
/*
|
||||
* Elbrus, little endian
|
||||
*/
|
||||
#define ZRTP_BYTE_ORDER ZBO_LITTLE_ENDIAN
|
||||
|
||||
#endif /* Automatic byte order detection */
|
||||
|
||||
#endif
|
||||
|
||||
#if !defined(ZRTP_BYTE_ORDER)
|
||||
# error "Libzrtp can't detect byte order: use manual setup in zrtp_config_user.h"
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Define Unaligned structure for target platform
|
||||
*/
|
||||
#if (ZRTP_PLATFORM == ZP_WINCE)
|
||||
# define ZRTP_UNALIGNED(type) UNALIGNED type
|
||||
#else
|
||||
# define ZRTP_UNALIGNED(type) type
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Define basic literal types for libzrtp
|
||||
* We use this definitions in SRTP, AES and Hash implementation
|
||||
*/
|
||||
#if (ZRTP_PLATFORM != ZP_WIN32_KERNEL)
|
||||
# if ZRTP_HAVE_STDLIB_H == 1
|
||||
# include <stdlib.h>
|
||||
# endif
|
||||
# if ZRTP_HAVE_STDINT_H == 1
|
||||
# include <stdint.h>
|
||||
# endif
|
||||
# if ZRTP_HAVE_INTTYPES_H == 1
|
||||
# include <inttypes.h>
|
||||
# endif
|
||||
# if ZRTP_HAVE_SYS_TYPES_H == 1
|
||||
# include <sys/types.h>
|
||||
# endif
|
||||
# if ZRTP_HAVE_SYS_INT_TYPES_H == 1
|
||||
# include <sys/int_types.h>
|
||||
# endif
|
||||
# if ZRTP_HAVE_MACHINE_TYPES_H == 1
|
||||
# include <machine/types.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if (ZRTP_PLATFORM == ZP_WINCE) || (ZRTP_PLATFORM == ZP_SYMBIAN) || (ZRTP_PLATFORM == ZP_ANDROID)
|
||||
# define ALIGNMENT_32BIT_REQUIRED
|
||||
#endif
|
||||
|
||||
#ifdef ZRTP_HAVE_UINT64_T
|
||||
# if ZRTP_HAVE_UINT64_T == 0
|
||||
# if defined(WIN32) || defined(WIN64)
|
||||
# if defined(_MSC_VER) && (_MSC_VER < 1310)
|
||||
typedef __int64 uint64_t;
|
||||
# else
|
||||
typedef unsigned long long uint64_t;
|
||||
# endif
|
||||
# else
|
||||
# if SIZEOF_UNSIGNED_LONG == 8
|
||||
typedef unsigned long uint64_t;
|
||||
# elif SIZEOF_UNSIGNED_LONG_LONG == 8
|
||||
typedef unsigned long long uint64_t;
|
||||
# else
|
||||
# define ZRTP_NO_64BIT_MATH 1
|
||||
# endif
|
||||
# endif /* WIN32 */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef ZRTP_HAVE_INT64_T
|
||||
# if ZRTP_HAVE_INT64_T == 0
|
||||
# if defined(WIN32) || defined(WIN64)
|
||||
# if defined(_MSC_VER) && (_MSC_VER < 1310)
|
||||
typedef __int64 int64_t;
|
||||
# else
|
||||
typedef long long int64_t;
|
||||
# endif
|
||||
# else
|
||||
# if SIZEOF_UNSIGNED_LONG == 8
|
||||
typedef long int64_t;
|
||||
# elif SIZEOF_UNSIGNED_LONG_LONG == 8
|
||||
typedef long long int64_t;
|
||||
# else
|
||||
# define ZRTP_NO_64BIT_MATH 1
|
||||
# endif
|
||||
# endif /* WIN32 */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define SIZEOF_UNSIGNED_LONG_LONG 8
|
||||
|
||||
#if defined(WIN32) || defined(WIN64)
|
||||
# if defined(_MSC_VER) && (_MSC_VER < 1310)
|
||||
# define li_64(h) 0x##h##ui64
|
||||
# else
|
||||
# define li_64(h) 0x##h##ull
|
||||
# endif
|
||||
#else
|
||||
# if SIZEOF_UNSIGNED_LONG == 8
|
||||
# define li_64(h) 0x##h##ul
|
||||
# elif SIZEOF_UNSIGNED_LONG_LONG == 8
|
||||
# define li_64(h) 0x##h##ull
|
||||
# else
|
||||
# define ZRTP_NO_64BIT_MATH 1
|
||||
# endif
|
||||
#endif /* WIN32 */
|
||||
|
||||
|
||||
#ifdef ZRTP_HAVE_UINT8_T
|
||||
# if ZRTP_HAVE_UINT8_T == 0
|
||||
typedef unsigned char uint8_t;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef ZRTP_HAVE_UINT16_T
|
||||
# if ZRTP_HAVE_UINT16_T == 0
|
||||
typedef unsigned short int uint16_t;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef ZRTP_HAVE_UINT32_T
|
||||
# if ZRTP_HAVE_UINT32_T == 0
|
||||
typedef unsigned int uint32_t;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef ZRTP_HAVE_INT8_T
|
||||
# if ZRTP_HAVE_INT8_T == 0
|
||||
typedef char int8_t;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef ZRTP_HAVE_INT16_T
|
||||
# if ZRTP_HAVE_INT16_T == 0
|
||||
typedef short int int16_t;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef ZRTP_HAVE_INT32_T
|
||||
# if ZRTP_HAVE_INT32_T == 0
|
||||
typedef int int32_t;
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /*__ZRTP_CONFIG_H__ */
|
|
@ -1,99 +0,0 @@
|
|||
/*
|
||||
* libZRTP SDK library, implements the ZRTP secure VoIP protocol.
|
||||
* Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
* Contact: http://philzimmermann.com
|
||||
* For licensing and other legal details, see the file zrtp_legal.c.
|
||||
*
|
||||
* Viktor Krykun <v.krikun at zfoneproject.com>
|
||||
*/
|
||||
|
||||
#ifndef ZRTP_SYMB_CONFIG_H__
|
||||
#define ZRTP_SYMB_CONFIG_H__
|
||||
|
||||
#ifndef ZRTP_HAVE_STDIO_H
|
||||
# define ZRTP_HAVE_STDIO_H 1
|
||||
#endif
|
||||
|
||||
#ifndef ZRTP_HAVE_STDARG_H
|
||||
# define ZRTP_HAVE_STDARG_H 1
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef NO_ASSERT_H
|
||||
# define NO_ASSERT_H 1
|
||||
#endif
|
||||
|
||||
#ifndef NO_STDLIB_H
|
||||
# define NO_STDLIB_H 0
|
||||
#endif
|
||||
//#define ZRTP_HAVE_INTTYPES_H 1
|
||||
#ifndef ZRTP_HAVE_UNISTD_H
|
||||
# define ZRTP_HAVE_UNISTD_H 1
|
||||
#endif
|
||||
|
||||
#ifndef ZRTP_HAVE_PTHREAD_H
|
||||
# define ZRTP_HAVE_PTHREAD_H 1
|
||||
#endif
|
||||
|
||||
#ifndef ZRTP_HAVE_SEMAPHORE_H
|
||||
#define ZRTP_HAVE_SEMAPHORE_H 1
|
||||
#endif
|
||||
|
||||
#ifndef ZRTP_HAVE_ERRNO_H
|
||||
#define ZRTP_HAVE_ERRNO_H 1
|
||||
#endif
|
||||
|
||||
#ifndef ZRTP_HAVE_FCNTL_H
|
||||
#define ZRTP_HAVE_FCNTL_H 1
|
||||
#endif
|
||||
|
||||
#ifndef ZRTP_HAVE_SYS_TIME_H
|
||||
# define ZRTP_HAVE_SYS_TIME_H 1
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef ZRTP_HAVE_SYS_TYPES_H
|
||||
# define ZRTP_HAVE_SYS_TYPES_H 1
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef ZRTP_HAVE_INTTYPES_H
|
||||
# define ZRTP_HAVE_INTTYPES_H 1
|
||||
#endif
|
||||
|
||||
#ifndef ZRTP_HAVE_STDINT_H
|
||||
# define ZRTP_HAVE_STDINT_H 1
|
||||
#endif
|
||||
|
||||
#ifndef ZRTP_HAVE_LINUX_VERSION_H
|
||||
# define ZRTP_HAVE_LINUX_VERSION_H 0
|
||||
#endif
|
||||
|
||||
|
||||
// (ZRTP_PLATFORM == ZP_ANDROID)
|
||||
|
||||
|
||||
#define ZRTP_HAVE_INT64_T 1
|
||||
#define ZRTP_HAVE_INT32_T 1
|
||||
#define ZRTP_HAVE_INT16_T 1
|
||||
#define ZRTP_HAVE_INT8_T 1
|
||||
|
||||
#define ZRTP_HAVE_UINT64_T 1
|
||||
#define ZRTP_HAVE_UINT32_T 1
|
||||
#define ZRTP_HAVE_UINT16_T 1
|
||||
#define ZRTP_HAVE_UINT8_T 1
|
||||
|
||||
#define ZRTP_BYTE_ORDER ZBO_LITTLE_ENDIAN
|
||||
|
||||
#define SIZEOF_UNSIGNED_LONG 4
|
||||
#define SIZEOF_UNSIGNED_LONG_LONG 8
|
||||
|
||||
#define ZRTP_INLINE inline
|
||||
|
||||
#define ZRTP_USE_BUILTIN_CACHE 1
|
||||
#define ZRTP_USE_BUILTIN_SCEHDULER 1
|
||||
#undef ZRTP_USE_STACK_MINIM
|
||||
#define ZRTP_USE_STACK_MINIM 1
|
||||
#define ALIGNMENT_32BIT_REQUIRED
|
||||
|
||||
#endif /* ZRTP_WIN_CONFIG_H__ */
|
|
@ -1,69 +0,0 @@
|
|||
/*
|
||||
* libZRTP SDK library, implements the ZRTP secure VoIP protocol.
|
||||
* Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
* Contact: http://philzimmermann.com
|
||||
* For licensing and other legal details, see the file zrtp_legal.c.
|
||||
*
|
||||
* Viktor Krykun <v.krikun at zfoneproject.com>
|
||||
*/
|
||||
|
||||
#ifndef ZRTP_SYMB_CONFIG_H__
|
||||
#define ZRTP_SYMB_CONFIG_H__
|
||||
|
||||
|
||||
/*
|
||||
* Used to map system integer types to zrtp integer definitions.
|
||||
* Define to 1 if you have the <inttypes.h> header file.
|
||||
*/
|
||||
#undef ZRTP_HAVE_INTTYPES_H
|
||||
|
||||
/*
|
||||
* This header is needed for operations with binary file in deefault realization
|
||||
* of the secrets' cache. Can be eliminated if default cache isn't used.
|
||||
* Define to 1 if you have the <stdio.h> header file.
|
||||
*/
|
||||
#ifndef ZRTP_HAVE_STDIO_H
|
||||
# define ZRTP_HAVE_STDIO_H 1
|
||||
#endif
|
||||
|
||||
#ifndef ZRTP_HAVE_STDARG_H
|
||||
# define ZRTP_HAVE_STDARG_H 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Used by bnlib, but we don't need this on Symbian platform.
|
||||
*/
|
||||
#ifndef NO_ASSERT_H
|
||||
# define NO_ASSERT_H 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Used by bnlib. We have stdlib in Symbian platform - set it to 1.
|
||||
*/
|
||||
#ifndef NO_STDLIB_H
|
||||
# define NO_STDLIB_H 0
|
||||
#endif
|
||||
|
||||
#ifndef ZRTP_HAVE_SYS_TIME_H
|
||||
# define ZRTP_HAVE_SYS_TIME_H 1
|
||||
#endif
|
||||
|
||||
|
||||
#define ZRTP_HAVE_INT64_T 0
|
||||
#define ZRTP_HAVE_INT32_T 0
|
||||
#define ZRTP_HAVE_INT16_T 0
|
||||
#define ZRTP_HAVE_INT8_T 0
|
||||
|
||||
#define ZRTP_HAVE_UINT64_T 0
|
||||
#define ZRTP_HAVE_UINT32_T 0
|
||||
#define ZRTP_HAVE_UINT16_T 0
|
||||
#define ZRTP_HAVE_UINT8_T 0
|
||||
|
||||
#define ZRTP_BYTE_ORDER ZBO_BIG_ENDIAN
|
||||
|
||||
#define SIZEOF_UNSIGNED_LONG 4
|
||||
#define SIZEOF_UNSIGNED_LONG_LONG 8
|
||||
|
||||
#define ZRTP_INLINE static __inline
|
||||
|
||||
#endif /* ZRTP_WIN_CONFIG_H__ */
|
|
@ -1,187 +0,0 @@
|
|||
/*
|
||||
* libZRTP SDK library, implements the ZRTP secure VoIP protocol.
|
||||
* Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
* Contact: http://philzimmermann.com
|
||||
* For licensing and other legal details, see the file zrtp_legal.c.
|
||||
*
|
||||
* Viktor Krykun <v.krikun at zfoneproject.com>
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file zrtp_config_user.h
|
||||
* @brief libzrtp user configuration routine
|
||||
*/
|
||||
|
||||
#ifndef __ZRTP_CONFIG_USER_H__
|
||||
#define __ZRTP_CONFIG_USER_H__
|
||||
|
||||
/**
|
||||
* \defgroup zrtp_config Build Configuration
|
||||
* \{
|
||||
*
|
||||
* As libzrtp based on few OS dependent components, target platform and byte-order must be defined
|
||||
* on compilation level. libzrtp provides automatic platform and byte-order detection. Developer
|
||||
* needs to define these parameters manually in very specific cases only.
|
||||
*
|
||||
* libzrtp originaly supports folowwing platforms:
|
||||
* - 32/64-bit Windows platform;
|
||||
* - Windows kernel mode;
|
||||
* - Apple Mac OS X and iPhone;
|
||||
* - Linux and *nix platforms;
|
||||
* - Symbian OS.
|
||||
*
|
||||
* In order to specify platform manually, developer should define ZRTP_PLATFORM value. If
|
||||
* ZRTP_PLATFORM is not defined - libzrtp will try to detect it automatically (see zrtp_config.h).
|
||||
*
|
||||
* In order to specify platform byte-order manually, developer should define ZRTP_BYTE_ORDER value.
|
||||
* If ZRTP_BYTE_ORDER is not defined - libzrtp will try to detect it automatically.
|
||||
*/
|
||||
|
||||
/** \brief Constant to define ZRTP Windows 32-bit platform */
|
||||
#define ZP_WIN32 100
|
||||
/** \brief Constant to define ZRTP Windows 64-bit platform */
|
||||
#define ZP_WIN64 106
|
||||
/** \brief Constant to define ZRTP Windows Kernel mode */
|
||||
#define ZP_WIN32_KERNEL 101
|
||||
/** \brief Constant to define ZRTP Windows CE platform */
|
||||
#define ZP_WINCE 102
|
||||
/** \brief Constant to define Linux and *nux platforms */
|
||||
#define ZP_LINUX 103
|
||||
/** \brief Constant to define Mac OS X Platform */
|
||||
#define ZP_DARWIN 104
|
||||
/** \brief Constant to define Symbian OS */
|
||||
#define ZP_SYMBIAN 105
|
||||
/** \brief Constant to define ZRTP BSD platform */
|
||||
#define ZP_BSD 107
|
||||
/** \brief Constant to define ZRTP Android platform */
|
||||
#define ZP_ANDROID 108
|
||||
|
||||
/** \brief Define Platform manually there */
|
||||
//#undefine ZRTP_PLATFORM
|
||||
|
||||
|
||||
/** \brief Constant to define Big Endian Platform */
|
||||
#define ZBO_BIG_ENDIAN 0x4321
|
||||
/** \brief Constant to define Little Endian Platform */
|
||||
#define ZBO_LITTLE_ENDIAN 0x1234
|
||||
|
||||
/** \brief Define Platform Byte Order manually there */
|
||||
//#define ZRTP_BYTE_ORDER
|
||||
|
||||
/** \brief Defines the max length in bytes of a binary SAS digest */
|
||||
#ifndef ZRTP_SAS_DIGEST_LENGTH
|
||||
#define ZRTP_SAS_DIGEST_LENGTH 32
|
||||
#endif
|
||||
|
||||
/** \brief Defines maximum number of ZRTP streams within one session */
|
||||
#ifndef ZRTP_MAX_STREAMS_PER_SESSION
|
||||
#define ZRTP_MAX_STREAMS_PER_SESSION 2
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Allows to build libzrtp against external srtp encryption library
|
||||
*
|
||||
* The latest version of libzrtp, starting with 0.3.9, supplies a built-in mechanism for SRTP
|
||||
* encryption. However, if for some reason during development it is neccesary to use an external
|
||||
* library, this flag must be set.
|
||||
*/
|
||||
#ifndef ZRTP_USE_EXTERN_SRTP
|
||||
#define ZRTP_USE_EXTERN_SRTP 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Build libzrtp with minimum stack usage
|
||||
*
|
||||
* Set to 1 you build libzrtp in environment with strong limitation of stack size (Mobile platforms
|
||||
* or in kernel mode). When this flag is set, some static data allocation will be changed to
|
||||
* dynamic. The size of these data doesn't matter in "regular" PC applications, but on mobile
|
||||
* platforms and in kernel mode, where the stack size is critical, libzrtp must work with optimized
|
||||
* data.
|
||||
*/
|
||||
#ifndef ZRTP_USE_STACK_MINIM
|
||||
#define ZRTP_USE_STACK_MINIM 0
|
||||
#endif
|
||||
|
||||
#ifndef ZRTP_USE_BUILTIN
|
||||
#define ZRTP_USE_BUILTIN 1
|
||||
#endif
|
||||
|
||||
#ifndef ZRTP_USE_BUILTIN_SCEHDULER
|
||||
#define ZRTP_USE_BUILTIN_SCEHDULER 1
|
||||
#endif
|
||||
|
||||
#ifndef ZRTP_USE_BUILTIN_CACHE
|
||||
# if defined(_WIN32) || defined(__WIN32__) || defined(_WIN64) || defined(WIN32) || defined(__TOS_WIN__)
|
||||
# if defined(__BUILDMACHINE__) && (__BUILDMACHINE__ == WinDDK)
|
||||
# define ZRTP_USE_BUILTIN_CACHE 1
|
||||
# else
|
||||
# define ZRTP_USE_BUILTIN_CACHE 0
|
||||
# endif
|
||||
# else
|
||||
# define ZRTP_USE_BUILTIN_CACHE 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef ZRTP_DEBUG_WITH_PJSIP
|
||||
#define ZRTP_DEBUG_WITH_PJSIP 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Set to 1 if you build libzrtp against libzrtp-s.
|
||||
*
|
||||
* CSD-mode was implemented to support new ZRTP/S protocol designed by KHAMSA SA, Via Giacometti 1,
|
||||
* CH-6900, Lugano - info@khamsa.ch. and Phil Zimmermann. ZRTP/S allows to make secure ZRTP calls
|
||||
* over CSD channels. This option affect enterprise version of the library only.
|
||||
*/
|
||||
#ifndef ZRTP_BUILD_FOR_CSD
|
||||
#define ZRTP_BUILD_FOR_CSD 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Maximum number of Preshared exchanges allowed since last retain secret update
|
||||
*
|
||||
* Preshared key exchange mode has lot of weaknesses comparing to DH. And one of them - lack of key
|
||||
* continuity. Preshared mode is not recommended unless there is a strong necessity in using it
|
||||
* (slow CPU device, low-latency channel).
|
||||
*
|
||||
* To minimize risk of using Preshared exchanges, libzrtp automatically limits number for preshared
|
||||
* connection available for the same instance of RS value. In other words, libzrtp forces DH exchange
|
||||
* every \c ZRTP_PRESHARED_MAX_ALLOWED calls.
|
||||
*/
|
||||
#define ZRTP_PRESHARED_MAX_ALLOWED 20
|
||||
|
||||
/**
|
||||
* \brief Defines libzrtp log-level
|
||||
*
|
||||
* Defines maximum log level for libzrtp: log-level 3 contains debug messages, 2 - warnings and
|
||||
* software errors, 1 - security issues. If you set this option to 0 - libzrtp will not debug
|
||||
* output and will not even make a log function calls.
|
||||
*/
|
||||
#ifndef ZRTP_LOG_MAX_LEVEL
|
||||
#define ZRTP_LOG_MAX_LEVEL 3
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Enables SRTP debug output
|
||||
*
|
||||
* \warning! ZRTP crypto debug logs may include security sensitive information and cause security
|
||||
* weakness in the system. Enable SRTP debug logging only when it necessary.
|
||||
*/
|
||||
#ifndef ZRTP_DEBUG_SRTP_KEYS
|
||||
#define ZRTP_DEBUG_SRTP_KEYS 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Enables ZRTP Crypto debug logging.
|
||||
*
|
||||
* \warning! ZRTP crypto debug logs may include security sensitive information and cause security
|
||||
* weakness in the system. Enable ZRTP Protocol debug logging only when it necessary.
|
||||
*/
|
||||
#ifndef ZRTP_DEBUG_ZRTP_KEYS
|
||||
#define ZRTP_DEBUG_ZRTP_KEYS 0
|
||||
#endif
|
||||
|
||||
|
||||
/* \} */
|
||||
|
||||
#endif /*__ZRTP_CONFIG_USER_H__*/
|
|
@ -1,74 +0,0 @@
|
|||
/*
|
||||
* libZRTP SDK library, implements the ZRTP secure VoIP protocol.
|
||||
* Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
* Contact: http://philzimmermann.com
|
||||
* For licensing and other legal details, see the file zrtp_legal.c.
|
||||
*
|
||||
* Viktor Krykun <v.krikun at zfoneproject.com>
|
||||
*/
|
||||
|
||||
#ifndef ZRTP_WIN_CONFIG_H__
|
||||
#define ZRTP_WIN_CONFIG_H__
|
||||
|
||||
#define _CRT_SECURE_NO_WARNINGS 1
|
||||
#pragma warning(disable: 4068)
|
||||
|
||||
#if !(defined(__BUILDMACHINE__) && __BUILDMACHINE__ == WinDDK)
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Used to map system integer types to zrtp integer definitions.
|
||||
* Define to 1 if you have the <inttypes.h> header file.
|
||||
*/
|
||||
#undef ZRTP_HAVE_INTTYPES_H
|
||||
|
||||
#define ZRTP_HAVE_STRING_H 1
|
||||
|
||||
/*
|
||||
* This header is needed for operations with binary file in deefault realization
|
||||
* of the secrets' cache. Can be eliminated if default cache isn't used.
|
||||
* Define to 1 if you have the <stdio.h> header file.
|
||||
*/
|
||||
#ifndef ZRTP_HAVE_STDIO_H
|
||||
# define ZRTP_HAVE_STDIO_H 1
|
||||
#endif
|
||||
|
||||
#ifndef ZRTP_HAVE_STDARG_H
|
||||
# define ZRTP_HAVE_STDARG_H 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Used by bnlib, but we don't need this on Windows platform.
|
||||
*/
|
||||
#ifndef NO_ASSERT_H
|
||||
#define NO_ASSERT_H 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Used by bnlib. We have stdlib in any Windows platform - set it to 1.
|
||||
*/
|
||||
#ifndef NO_STDLIB_H
|
||||
#define NO_STDLIB_H 0
|
||||
#endif
|
||||
|
||||
|
||||
#define ZRTP_HAVE_INT64_T 0
|
||||
#define ZRTP_HAVE_INT32_T 0
|
||||
#define ZRTP_HAVE_INT16_T 0
|
||||
#define ZRTP_HAVE_INT8_T 0
|
||||
|
||||
#define ZRTP_HAVE_UINT64_T 0
|
||||
#define ZRTP_HAVE_UINT32_T 0
|
||||
#define ZRTP_HAVE_UINT16_T 0
|
||||
#define ZRTP_HAVE_UINT8_T 0
|
||||
|
||||
#define SIZEOF_UNSIGNED_LONG 4
|
||||
#define SIZEOF_UNSIGNED_LONG_LONG 8
|
||||
|
||||
#define ZRTP_INLINE static __inline
|
||||
|
||||
#define ZRTP_VERSION "0.90"
|
||||
|
||||
|
||||
#endif /* ZRTP_WIN_CONFIG_H__ */
|
|
@ -1,656 +0,0 @@
|
|||
/*
|
||||
* libZRTP SDK library, implements the ZRTP secure VoIP protocol.
|
||||
* Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
* Contact: http://philzimmermann.com
|
||||
* For licensing and other legal details, see the file zrtp_legal.c.
|
||||
*
|
||||
* Viktor Krykun <v.krikun at zfoneproject.com>
|
||||
*/
|
||||
|
||||
#ifndef __ZRTP_CRYPTO_H__
|
||||
#define __ZRTP_CRYPTO_H__
|
||||
|
||||
#include "bn.h"
|
||||
#include "zrtp_types.h"
|
||||
#include "zrtp_error.h"
|
||||
#include "zrtp_engine.h"
|
||||
#include "zrtp_config_user.h"
|
||||
#include "zrtp_ec.h"
|
||||
|
||||
|
||||
|
||||
/*!
|
||||
* \defgroup crypto Library crypto-components
|
||||
* \ingroup zrtp_dev
|
||||
*
|
||||
* This section describes functions and data types for managing crypto-components.
|
||||
* All these functions and structures are used by the libZRTP kernel for the
|
||||
* built-in crypt-components management. The developer has the option of
|
||||
* implementing and integrating her own components into the library. This is not
|
||||
* a full manual on creating crypto-components. Its purpose is only to elucidate
|
||||
* the library functionality.
|
||||
*
|
||||
* The concept behind crypto components is similar to that of classes in object
|
||||
* oriented programming. The components are defined as structures and
|
||||
* manipulated by functions. Component attributes are stored in 'contexts', and
|
||||
* are defined during initialization. Resources allocated at initialization are
|
||||
* freed with the 'free' function.
|
||||
*
|
||||
* Components are divided into 5 functional groups (component types):
|
||||
* - ciphers;
|
||||
* - hash/hmac components;
|
||||
* - public key exchange schemes;
|
||||
* - components defined SRTP authentication scheme;
|
||||
* - SAS calculation schemes.
|
||||
* Within a group, components are distinguished by integer identifiers and by
|
||||
* their defined functionality. So to fully identify a component, you need to
|
||||
* know its type and its identifier. (For example an AES cipher with a 128 bit
|
||||
* key is defined as: ZRTP_CC_CIPHER, zrtp_cipher_id_t::ZRTP_CIPHER_AES128).
|
||||
* The high number of components means that every component must have a minimal
|
||||
* set of attributes and functions: type identifier, and function initialization
|
||||
* and deinitialization. The base type of all components is zrtp_comp_t. Every
|
||||
* new component MUST start with definitions of this structure strictly in the
|
||||
* given order.
|
||||
* \warning
|
||||
* Every crypto-component included in libZRTP was developed and tested by
|
||||
* professionals. Its presence is functionally based. Using only the built-in
|
||||
* components gives you 100% crypto-strength and the guarantee of the fully
|
||||
* tested code. Never use your own components without strong reasons. If you
|
||||
* have noticed the absence of any important component in the library, contact
|
||||
* the developers. Reasonable offers will be considered for implementation in
|
||||
* the following versions.
|
||||
* \{
|
||||
*/
|
||||
|
||||
|
||||
/*============================================================================*/
|
||||
/* Types of libZRTP crypto-components definitions */
|
||||
/*============================================================================*/
|
||||
|
||||
/*!
|
||||
* \brief Enumeration for crypto-components types definition
|
||||
*/
|
||||
typedef enum zrtp_crypto_comp_t
|
||||
{
|
||||
ZRTP_CC_HASH = 1, /*!< hash calculation schemes */
|
||||
ZRTP_CC_SAS = 2, /*!< short autentification scheme components */
|
||||
ZRTP_CC_CIPHER = 3, /*!< ciphers */
|
||||
ZRTP_CC_PKT = 4, /*!< public key exchange scheme */
|
||||
ZRTP_CC_ATL = 5,
|
||||
}zrtp_crypto_comp_t;
|
||||
|
||||
|
||||
/*!
|
||||
* This ID with code 0 is used as an error signal by all crypto-components
|
||||
* groups to indicate a wrongly defined component identifier.
|
||||
*/
|
||||
#define ZRTP_COMP_UNKN 0
|
||||
|
||||
/*! Defines types of hash functions */
|
||||
typedef enum zrtp_hash_id_t
|
||||
{
|
||||
ZRTP_HASH_SHA256 = 1,
|
||||
ZRTP_HASH_SHA384 = 2
|
||||
} zrtp_hash_id_t;
|
||||
|
||||
/*! Defines types of ciphers */
|
||||
typedef enum zrtp_cipher_id_t
|
||||
{
|
||||
ZRTP_CIPHER_AES128 = 1,
|
||||
ZRTP_CIPHER_AES256 = 2
|
||||
} zrtp_cipher_id_t;
|
||||
|
||||
/*! Defines SRTP authentication schemes */
|
||||
typedef enum zrtp_atl_id_t
|
||||
{
|
||||
ZRTP_ATL_HS32 = 1,
|
||||
ZRTP_ATL_HS80 = 2
|
||||
} zrtp_atl_id_t;
|
||||
|
||||
/*! Defines public key exchange schemes */
|
||||
/* WARNING! don't change order of the PK components definitions! */
|
||||
typedef enum zrtp_pktype_id_t
|
||||
{
|
||||
ZRTP_PKTYPE_PRESH = 1,
|
||||
ZRTP_PKTYPE_MULT = 2,
|
||||
ZRTP_PKTYPE_DH2048 = 3,
|
||||
ZRTP_PKTYPE_EC256P = 4,
|
||||
ZRTP_PKTYPE_DH3072 = 5,
|
||||
ZRTP_PKTYPE_EC384P = 6,
|
||||
ZRTP_PKTYPE_EC521P = 7,
|
||||
ZRTP_PKTYPE_DH4096 = 8
|
||||
} zrtp_pktype_id_t;
|
||||
|
||||
/*! Defines modes of short authentication scheme calculation */
|
||||
typedef enum zrtp_sas_id
|
||||
{
|
||||
ZRTP_SAS_BASE32 = 1,
|
||||
ZRTP_SAS_BASE256 = 2
|
||||
} zrtp_sas_id_t;
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Global structure for all crypto-component types.
|
||||
* \warning All developed components must have these 4 fields at the beginning.
|
||||
*/
|
||||
typedef struct zrtp_comp_t
|
||||
{
|
||||
zrtp_uchar4_t type; /*!< 4-character symbolic name defined by ZRTP Draft */
|
||||
uint8_t id; /*!< Integer component identifier */
|
||||
zrtp_global_t* zrtp;/*!< ZRTP global context */
|
||||
|
||||
/*!
|
||||
* \brief Component initiation function.
|
||||
* This function body is for holding component initialization code. libzrtp
|
||||
* calls the function before using a component, at its registration. If the
|
||||
* component does not require additional actions for initialization, the
|
||||
* value of this field can be NULL.
|
||||
* \param self - self-pointer for fast access to structure data.
|
||||
* \return
|
||||
* - zrtp_status_ok - if initialized successfully;
|
||||
* - one of \ref zrtp_status_t errors - if initialization failed.
|
||||
*/
|
||||
zrtp_status_t (*init)(void* self);
|
||||
|
||||
/*!
|
||||
* \brief Component deinitializtion function.
|
||||
* This function body is for holding component deinitialization code and
|
||||
* all code for releasing allocated resources. libzrtp calls the function
|
||||
* at the end of component use, at context deinitialization. If the component
|
||||
* does not require additional actions for deinitialization, the value of
|
||||
* this field can be NULL.
|
||||
* \param self - pointer to component structure for deinitialization.
|
||||
* \return
|
||||
* - zrtp_status_ok - if deinitialized successfully;
|
||||
* - one of \ref zrtp_status_t errors - if deinitialization failed.
|
||||
*/
|
||||
zrtp_status_t (*free)(void* self);
|
||||
} zrtp_comp_t;
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Structure for defining the hash-value computing scheme
|
||||
* The ZRTP context field zrtp_stream#_hash is initialized by the given type
|
||||
* value and used for all hash calculations within the ZRTP sessions. Having
|
||||
* implemented a structure of this type, it is possible to integrate new hash
|
||||
* calculation schemes into libzrtp.
|
||||
*/
|
||||
struct zrtp_hash_t
|
||||
{
|
||||
zrtp_comp_t base;
|
||||
|
||||
/*!
|
||||
* \brief Begin hash computation with update support.
|
||||
* The following set of functions ( zrtp_hash#hash_begin, zrtp_hash#hash_update,
|
||||
* zrtp_hash#hash_end) implements a standard hash calculation scheme with
|
||||
* accumulation. The functions perform the required actions to start
|
||||
* calculations and to allocate hash-contexts for preserving intermediate
|
||||
* results and other required information. The allocated context will be
|
||||
* passed-to by the subsequent calls zrtp_hash#hash_update and zrtp_hash#hash_end.
|
||||
* \param self - self-pointer for fast access to structure data
|
||||
* \return
|
||||
* - pointer to allocated hash-context if successful;
|
||||
* - NULL if error.
|
||||
*/
|
||||
void* (*hash_begin)(zrtp_hash_t *self);
|
||||
|
||||
/*!
|
||||
* \brief Process more input data for hash calculation
|
||||
* This function is called in the hash-building chain to obtain additional
|
||||
* data that it then processes and recalculates intermediate values.
|
||||
* \param self - self-pointer for fast access to structure data;
|
||||
* \param ctx - hash-context for current hash-value calculation;
|
||||
* \param msg - additional source data for processing;
|
||||
* \param length - length of additional data in bytes.
|
||||
* \return
|
||||
* - zrtp_status_ok - if successfully processed;
|
||||
* - one of \ref zrtp_status_t errors - if error.
|
||||
*/
|
||||
zrtp_status_t (*hash_update)( zrtp_hash_t *self,
|
||||
void *ctx,
|
||||
const int8_t*msg,
|
||||
uint32_t length );
|
||||
|
||||
/*!
|
||||
* \brief Completes the computation of the current hash-value
|
||||
* This function completes the computation of the hash-value with accumul.
|
||||
* After completion, the hash-context previously allocated by the call to
|
||||
* zrtp_hash#hash_begin, must be destroyed. The size of the calculated
|
||||
* value must be kept in the parameter digest field zrtp_string#length.
|
||||
* \param self - self-pointer for fast access to structure data;
|
||||
* \param ctx - hash-context for current hash-value calculation;
|
||||
* \param digest - buffer for storing result.
|
||||
* \return
|
||||
* - zrtp_status_ok - if computing finished successfully;
|
||||
* - one of \ref zrtp_status_t errors - if error.
|
||||
*/
|
||||
zrtp_status_t (*hash_end)( zrtp_hash_t *self,
|
||||
void *ctx,
|
||||
zrtp_stringn_t *digest );
|
||||
|
||||
/*!
|
||||
* \brief Calculate hash-value for current message
|
||||
* This function implicitly calls the previous 3 functions. The only
|
||||
* difference is that initial data for hash value construction is gathered
|
||||
* in a single buffer and is passed to the function in the \c msg argument.
|
||||
* The calculated value size must be stored in the digest zrtp_string#length
|
||||
* parameter
|
||||
* \param self - self-pointer for fast access to structure data;
|
||||
* \param msg - source data buffer for hash computing;
|
||||
* \param digest - buffer for storing result.
|
||||
* \return
|
||||
* - zrtp_status_ok - if computing finished successfully;
|
||||
* - one of \ref zrtp_status_t errors - if error.
|
||||
*/
|
||||
zrtp_status_t (*hash)( zrtp_hash_t *self,
|
||||
const zrtp_stringn_t *msg,
|
||||
zrtp_stringn_t *digest );
|
||||
|
||||
/*! \brief Analogue of zrtp_hash::hash for C-string */
|
||||
zrtp_status_t (*hash_c)( zrtp_hash_t *self,
|
||||
const char* msg,
|
||||
uint32_t msg_len,
|
||||
zrtp_stringn_t *digest );
|
||||
|
||||
/*!
|
||||
* \brief HASH self-test.
|
||||
* This function implements hmac self-tests using pre-defined test vectors.
|
||||
* \param self - self-pointer for fast access to structure data;
|
||||
* \return
|
||||
* - zrtp_status_ok - if tests have been passed successfully;
|
||||
* - one of \ref zrtp_status_t errors - if one or more tests have
|
||||
* failed.
|
||||
*/
|
||||
zrtp_status_t (*hash_self_test)(zrtp_hash_t *self);
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Begin HMAC computation with update support.
|
||||
* The zrtp_hash#hmac_begin, zrtp_hash#hmac_update and zrtp_hash#hmac_end
|
||||
* functions implement the HMAC calculation scheme with accumulation. The
|
||||
* function performs all actions required before beginning the calculation
|
||||
* and allocates a hash-context to store intermediate values. The allocated
|
||||
* hash-context will be passed to successive hash_update and hash_end calls
|
||||
* \param self - self-pointer for fast access to structure data;
|
||||
* \param key - secret key for hmac-value protection.
|
||||
* \return
|
||||
* - pointer to allocated hmac-context if successful;
|
||||
* - NULL - if error.
|
||||
*/
|
||||
void* (*hmac_begin)(zrtp_hash_t *self, const zrtp_stringn_t *key);
|
||||
|
||||
/*! \brief Analogue of zrtp_hash::hmac_begin for C-string */
|
||||
void* (*hmac_begin_c)(zrtp_hash_t *self, const char *key, uint32_t length);
|
||||
|
||||
/*!
|
||||
* \brief Process more input data for HMAC calculation
|
||||
* This function is called to transfer additional data to the HMAC hash-
|
||||
* calculation. Processes new data and recalculates intermediate values.
|
||||
* \param self - self-pointer for fast access to structure data;
|
||||
* \param ctx - hmac-context for current hmac-value calculation;
|
||||
* \param msg - additional source data for processing;
|
||||
* \param length - additional data length in bytes.
|
||||
* \return
|
||||
* - zrtp_status_ok - if successfully processed;
|
||||
* - one of \ref zrtp_status_t errors - if error.
|
||||
*/
|
||||
zrtp_status_t (*hmac_update)( zrtp_hash_t *self,
|
||||
void *ctx,
|
||||
const char *msg,
|
||||
uint32_t length );
|
||||
|
||||
/*!
|
||||
* \brief Complete current HMAC-value computation
|
||||
* This function completes the hmac calculation. After the final iteration
|
||||
* \a the hash_context allocated by zrtp_hash#hmac_begin is destroyed. The
|
||||
* argument \c len holds the HMAC size. If the buffer contains more than \c
|
||||
* length characters then only the first \c length are copied to \c digest.
|
||||
* The calculated value size is stored in the digest parameter length.
|
||||
* \param self - self-pointer for fast access to structure data;
|
||||
* \param ctx - hmac-context for current hmac-value calculation;
|
||||
* \param digest - buffer for storing result;
|
||||
* \param len - required hmac-value size.
|
||||
* \return
|
||||
* - zrtp_status_ok - if computing finished successfully;
|
||||
* - one of \ref zrtp_status_t errors - if error.
|
||||
*/
|
||||
zrtp_status_t (*hmac_end)( zrtp_hash_t *self,
|
||||
void *ctx,
|
||||
zrtp_stringn_t *digest,
|
||||
uint32_t len);
|
||||
|
||||
/*!
|
||||
* \brief Calculate hmac-value for current message
|
||||
* The function implicitly calls the previous 3 functions
|
||||
* (zrtp_hash#hmac_begin, zrtp_hash#hmac_update and zrtp_hash#hmac_end). The
|
||||
* difference is that the initial data for hash value construction is
|
||||
* gathered in a single buffer and is passed to the function in the \a msg
|
||||
* argument. The calculated value size must be stored in the \a digest
|
||||
* zrtp_string#length parameter
|
||||
* \param self - self-pointer for fast access to structure data;
|
||||
* \param key - key for protecting hmac;
|
||||
* \param msg - source data buffer for hash computing;
|
||||
* \param digest - buffer for storing result.
|
||||
* \return
|
||||
* - zrtp_status_ok - if computing finished successfully;
|
||||
* - one of \ref zrtp_status_t errors - if error.
|
||||
*/
|
||||
zrtp_status_t (*hmac)( zrtp_hash_t *self,
|
||||
const zrtp_stringn_t *key,
|
||||
const zrtp_stringn_t *msg,
|
||||
zrtp_stringn_t *digest );
|
||||
|
||||
/*! \brief Analogue of zrtp_hash::hmac for C-string */
|
||||
zrtp_status_t (*hmac_c)( zrtp_hash_t *self,
|
||||
const char *key,
|
||||
const uint32_t key_len,
|
||||
const char *msg,
|
||||
const uint32_t msg_len,
|
||||
zrtp_stringn_t *digest );
|
||||
|
||||
/*!
|
||||
* \brief Truncated Hmac-calculation version
|
||||
* This function acts just like the previous \a hmac except it returns the
|
||||
* first \a length bytes of the calculated value in the digest.
|
||||
* \param self - self-pointer for fast access to structure data;
|
||||
* \param key - key for hmac protection;
|
||||
* \param msg - source data buffer for hash computing;
|
||||
* \param digest - buffer for storing result;
|
||||
* \param len - required hmac-value size.
|
||||
* \return
|
||||
* - zrtp_status_ok - if computed successfully;
|
||||
* - one of \ref zrtp_status_t errors - if error.
|
||||
*/
|
||||
zrtp_status_t (*hmac_truncated)( zrtp_hash_t *self,
|
||||
const zrtp_stringn_t *key,
|
||||
const zrtp_stringn_t *msg,
|
||||
uint32_t len,
|
||||
zrtp_stringn_t *digest );
|
||||
|
||||
/*! \brief Analogue of zrtp_hash::hmac_truncated for C-string */
|
||||
zrtp_status_t (*hmac_truncated_c)( zrtp_hash_t *self,
|
||||
const char *key,
|
||||
const uint32_t key_len,
|
||||
const char *msg,
|
||||
const uint32_t msg_len,
|
||||
uint32_t necessary_len,
|
||||
zrtp_stringn_t *digest );
|
||||
|
||||
/*!
|
||||
* \brief HMAC self-test.
|
||||
* This function implements the hmac self-tests using pre-defined test vectors.
|
||||
* \param self - self-pointer for fast access to structure data; .
|
||||
* \return
|
||||
* - zrtp_status_ok - if tests have passed successfully;
|
||||
* - one of \ref zrtp_status_t errors - if one or more tests have failed.
|
||||
*/
|
||||
zrtp_status_t (*hmac_self_test)( zrtp_hash_t *self);
|
||||
|
||||
uint32_t digest_length;
|
||||
uint32_t block_length;
|
||||
mlist_t mlist;
|
||||
};
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Structure for defining the SRTP authentication scheme
|
||||
* The ZRTP context field zrtp_stream#_authtaglength is initialized by the
|
||||
* given type value and used for SRTP encryption configuration.
|
||||
*/
|
||||
struct zrtp_auth_tag_length_t
|
||||
{
|
||||
zrtp_comp_t base;
|
||||
uint32_t tag_length;
|
||||
mlist_t mlist;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @brief Structure for describing the public key scheme
|
||||
* The ZRTP context field zrtp_stream#_pubkeyscheme is initialized by the given
|
||||
* type value and used by libzrtp in public key exchange.
|
||||
*/
|
||||
struct zrtp_pk_scheme_t
|
||||
{
|
||||
zrtp_comp_t base;
|
||||
|
||||
/** Generate Diffie-Hellman secret value and Calculate public value */
|
||||
zrtp_status_t (*initialize)( zrtp_pk_scheme_t *self,
|
||||
zrtp_dh_crypto_context_t *dh_cc );
|
||||
|
||||
/** Calculate Diffie-Hellman result (ZRTP Internet Draft) */
|
||||
zrtp_status_t (*compute)( zrtp_pk_scheme_t *self,
|
||||
zrtp_dh_crypto_context_t *dh_cc,
|
||||
struct BigNum *dhresult,
|
||||
struct BigNum *pv);
|
||||
|
||||
/** Validate Diffie-Hellman public value */
|
||||
zrtp_status_t (*validate)(zrtp_pk_scheme_t *self, struct BigNum *pv);
|
||||
|
||||
/** Diffie-Hellman self-test routine. */
|
||||
zrtp_status_t (*self_test)(zrtp_pk_scheme_t *self);
|
||||
|
||||
/** Diffie-Hellman secret value size in bytes */
|
||||
uint32_t sv_length;
|
||||
|
||||
/** Diffie-Hellman public value size in bytes */
|
||||
uint32_t pv_length;
|
||||
|
||||
mlist_t mlist;
|
||||
};
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Structure for defining SAS generation scheme
|
||||
* The type of the ZRTP context's field zrtp_stream#_sasscheme. It is used
|
||||
* to generate short authentication strings. LibZRTP functionality can be augmented
|
||||
* with a new SAS scheme by supplying your own instance of zrtp_sas_scheme.
|
||||
*/
|
||||
struct zrtp_sas_scheme_t
|
||||
{
|
||||
zrtp_comp_t base;
|
||||
|
||||
/*!
|
||||
* \brief Generate short authentication strings
|
||||
* This function computes SAS values according to the specified scheme. It
|
||||
* can use base32 or base256 algorithms. It stores the generated SAS values
|
||||
* as a zrtp_sas_values_t structure (string and binary representation).
|
||||
* \param self - self-pointer for fast access to structure data;
|
||||
* \param session - ZRTP session context for additional data;
|
||||
* \param hash - hmac component to be used for SAS calculation;
|
||||
* \param is_transferred - if this flag is equal to 1 new SAS value should
|
||||
* not be computed. It is already in sas->bin buffer and rendering only
|
||||
* is required.
|
||||
* \return
|
||||
* - zrtp_status_ok - if generation successful;
|
||||
* - one of zrtp_status_t errors - if generation failed.
|
||||
*/
|
||||
zrtp_status_t (*compute)( zrtp_sas_scheme_t *self,
|
||||
zrtp_stream_t *stream,
|
||||
zrtp_hash_t *hash,
|
||||
uint8_t is_transferred );
|
||||
|
||||
mlist_t mlist;
|
||||
};
|
||||
|
||||
|
||||
#include "aes.h"
|
||||
|
||||
/*! Defines block cipher modes. */
|
||||
typedef enum zrtp_cipher_mode_values_t
|
||||
{
|
||||
ZRTP_CIPHER_MODE_CTR = 1,
|
||||
ZRTP_CIPHER_MODE_CFB = 2
|
||||
} zrtp_cipher_mode_values_t;
|
||||
|
||||
typedef struct zrtp_cipher_mode_t
|
||||
{
|
||||
uint8_t mode;
|
||||
} zrtp_cipher_mode_t;
|
||||
|
||||
|
||||
/* \brief Structure for cipher definition */
|
||||
struct zrtp_cipher_t
|
||||
{
|
||||
zrtp_comp_t base;
|
||||
|
||||
/*!
|
||||
* \brief Start cipher.
|
||||
* This function performs all actions necessary to allocate the cipher context
|
||||
* for holding intermediate results and other required information. The allocated
|
||||
* context should be related to the given key. It will be passed to the
|
||||
* zrtp_cipher#set_iv, zrtp_cipher#encrypt and zrtp_cipher#decrypt functions.
|
||||
* \param self - self-pointer for fast access to structure data;
|
||||
* \param key - cipher key;
|
||||
* \param extra_data - additional data necessary for cipher initialization;
|
||||
* \param mode - cipher mode (one of \ref zrtp_cipher_mode_values_t values).
|
||||
* \return
|
||||
* - pointer to allocated cipher context;
|
||||
* - NULL if error.
|
||||
*/
|
||||
void* (*start)( zrtp_cipher_t *self,
|
||||
void *key,
|
||||
void *extra_data, uint8_t mode );
|
||||
|
||||
/*!
|
||||
* \brief Set Initialization Vector.
|
||||
* Function resets the previous state of the cipher context and sets the new IV.
|
||||
* \param self - self-pointer for fast access to structure data;
|
||||
* \param cipher_ctx - cipher context for current key value;
|
||||
* \param iv - new initialization vector value.
|
||||
* \return
|
||||
* - zrtp_status_ok - if vector has been set successfully;
|
||||
* - one of \ref zrtp_status_t errors - if operation failed.
|
||||
*/
|
||||
zrtp_status_t (*set_iv)( zrtp_cipher_t *self,
|
||||
void *cipher_ctx,
|
||||
zrtp_v128_t *iv );
|
||||
|
||||
/*!
|
||||
* \brief Encrypt data.
|
||||
* Implements the encryption engine.
|
||||
* \param self - self-pointer for fast access to structure data;
|
||||
* \param cipher_ctx - cipher context for current key value;
|
||||
* \param buf - buffer with data for encryption. If successful this
|
||||
* buffer contains the resulting encrypted text;
|
||||
* \param len - length of plain/encrypted data.
|
||||
* \return
|
||||
* - zrtp_status_ok - if data has been encrypted successfully;
|
||||
* - one of \ref zrtp_status_t errors - if encryption failed.
|
||||
*/
|
||||
zrtp_status_t (*encrypt)( zrtp_cipher_t *self,
|
||||
void *cipher_ctx,
|
||||
unsigned char *buf,
|
||||
int len );
|
||||
|
||||
/*!
|
||||
* \brief Decrypt data.
|
||||
* Implements the decryption engine.
|
||||
* \param self - self-pointer for fast access to structure data;
|
||||
* \param cipher_ctx - cipher context for current key value;
|
||||
* \param buf - buffer with data for decryption. If successful this buffer
|
||||
* contains the resulting plain text;
|
||||
* \param len - length of encrypted/plain data.
|
||||
* \return
|
||||
* - zrtp_status_ok - if data has been decrypted successfully;
|
||||
* - one of \ref zrtp_status_t errors - if decryption failed.
|
||||
*/
|
||||
zrtp_status_t (*decrypt)( zrtp_cipher_t *self,
|
||||
void *cipher_ctx,
|
||||
unsigned char *buf,
|
||||
int len );
|
||||
|
||||
/*!
|
||||
* \brief Cipher self-test.
|
||||
* Implements cipher self-tests using pre-defined test vectors.
|
||||
* \param self - self-pointer for fast access to structure data;
|
||||
* \param mode - cipher mode (one of \ref zrtp_cipher_mode_values_t values).
|
||||
* \return
|
||||
* - zrtp_status_ok - if tests have passed successfully;
|
||||
* - one of \ref zrtp_status_t errors - if one or more tests have failed.
|
||||
*/
|
||||
zrtp_status_t (*self_test)(zrtp_cipher_t *self, uint8_t mode);
|
||||
|
||||
/*!
|
||||
* \brief Destroy cipher context.
|
||||
* Deallocs the cipher context previously allocated by a call to zrtp_cipher#start.
|
||||
* \param self - self-pointer for fast access to structure data;
|
||||
* \param cipher_ctx - cipher context for current key value.
|
||||
* \return
|
||||
* - zrtp_status_ok - if the context has been deallocated
|
||||
* successfully;
|
||||
* - one of \ref zrtp_status_t errors - if deallocation failed.
|
||||
*/
|
||||
zrtp_status_t (*stop)(zrtp_cipher_t *self, void* cipher_ctx);
|
||||
|
||||
mlist_t mlist;
|
||||
};
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
|
||||
/*============================================================================*/
|
||||
/* Crypto-components management Private part */
|
||||
/*============================================================================*/
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Destroy components buffer
|
||||
* This function clears the list of components of the specified type, destroys
|
||||
* all components and releases all allocated resources. It is used on libzrtp
|
||||
* down. zrtp_comp_done calls zrtp_comp_t#free() if it isn't NULL.
|
||||
* \param zrtp - the ZRTP global context where components are stored;
|
||||
* \param type - specifies the component pool type for destroying.
|
||||
* \return
|
||||
* - zrtp_status_ok - if clearing successful;
|
||||
* - zrtp_status_fail - if error.
|
||||
*/
|
||||
zrtp_status_t zrtp_comp_done(zrtp_crypto_comp_t type, zrtp_global_t* zrtp);
|
||||
|
||||
/*!
|
||||
* \brief Registering a new crypto-component
|
||||
* Correctness of values in the necessary structure is the developer's
|
||||
* responsibility. zrtp_comp_register calls zrtp_comp_t#init() if it isn't NULL.
|
||||
* \param type - type of registred component;
|
||||
* \param comp - registered crypto-component;
|
||||
* \param zrtp - the ZRTP global context where components are stored.
|
||||
* \return
|
||||
* - zrtp_status_ok if registration successful;
|
||||
* - zrtp_status_fail if error (conflicts with other components).
|
||||
*/
|
||||
zrtp_status_t zrtp_comp_register( zrtp_crypto_comp_t type,
|
||||
void *comp,
|
||||
zrtp_global_t* zrtp);
|
||||
|
||||
/*!
|
||||
* \brief Search component by ID
|
||||
* \param type - type of sought component;
|
||||
* \param zrtp - the ZRTP global context where components are stored;
|
||||
* \param id - integer identifier of the necessary element.
|
||||
* \return
|
||||
* - the found structure if successful;
|
||||
* - NULL if the element with the specified ID can't be found or
|
||||
* other error.
|
||||
*/
|
||||
void* zrtp_comp_find( zrtp_crypto_comp_t type,
|
||||
uint8_t id,
|
||||
zrtp_global_t* zrtp);
|
||||
|
||||
|
||||
/*! Converts a component's integer ID to a symbolic ZRTP name */
|
||||
char* zrtp_comp_id2type(zrtp_crypto_comp_t type, uint8_t id);
|
||||
|
||||
/*! Converts a component's ZRTP symbolic name to an integer ID */
|
||||
uint8_t zrtp_comp_type2id(zrtp_crypto_comp_t type, char* name);
|
||||
|
||||
|
||||
/*! \} */
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /*__ZRTP_CRYPTO_H__ */
|
|
@ -1,81 +0,0 @@
|
|||
/*
|
||||
* libZRTP SDK library, implements the ZRTP secure VoIP protocol.
|
||||
* Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
* Contact: http://philzimmermann.com
|
||||
* For licensing and other legal details, see the file zrtp_legal.c.
|
||||
*/
|
||||
|
||||
#ifndef __ZRTP_CRYPTO_EC_H__
|
||||
#define __ZRTP_CRYPTO_EC_H__
|
||||
|
||||
#include "bn.h"
|
||||
|
||||
#include "zrtp_config.h"
|
||||
#include "zrtp_types.h"
|
||||
#include "zrtp_error.h"
|
||||
|
||||
#define ZRTP_MAXECBITS 521
|
||||
#define ZRTP_MAXECWORDS ((ZRTP_MAXECBITS+7)/8)
|
||||
|
||||
typedef struct zrtp_ec_params
|
||||
{
|
||||
unsigned ec_bits; /* # EC bits: 256, 384, 521 */
|
||||
uint8_t P_data[ZRTP_MAXECWORDS]; /* curve field prime */
|
||||
uint8_t n_data[ZRTP_MAXECWORDS]; /* curve order (# points) */
|
||||
uint8_t b_data[ZRTP_MAXECWORDS]; /* curve param, y^3 = x^2 -3x + b */
|
||||
uint8_t Gx_data[ZRTP_MAXECWORDS]; /* curve point, x coordinate */
|
||||
uint8_t Gy_data[ZRTP_MAXECWORDS]; /* curve point, y coordinate */
|
||||
} zrtp_ec_params_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*============================================================================*/
|
||||
/* Elliptic Curve library */
|
||||
/*============================================================================*/
|
||||
|
||||
int zrtp_ecAdd ( struct BigNum *rsltx,
|
||||
struct BigNum *rslty,
|
||||
struct BigNum *p1x,
|
||||
struct BigNum *p1y,
|
||||
struct BigNum *p2x,
|
||||
struct BigNum *p2y,
|
||||
struct BigNum *mod);
|
||||
|
||||
int zrtp_ecMul ( struct BigNum *rsltx,
|
||||
struct BigNum *rslty,
|
||||
struct BigNum *mult,
|
||||
struct BigNum *basex,
|
||||
struct BigNum *basey,
|
||||
struct BigNum *mod);
|
||||
|
||||
zrtp_status_t zrtp_ec_random_point( zrtp_global_t *zrtp,
|
||||
struct BigNum *P,
|
||||
struct BigNum *n,
|
||||
struct BigNum *Gx,
|
||||
struct BigNum *Gy,
|
||||
struct BigNum *pkx,
|
||||
struct BigNum *pky,
|
||||
struct BigNum *sv,
|
||||
uint8_t *test_sv_data,
|
||||
size_t test_sv_data_len);
|
||||
|
||||
extern zrtp_status_t zrtp_ec_init_params(struct zrtp_ec_params *params, uint32_t bits );
|
||||
|
||||
|
||||
/* Useful bignum utility functions not defined in bignum library */
|
||||
int bnAddMod_ (struct BigNum *rslt, struct BigNum *n1, struct BigNum *mod);
|
||||
int bnAddQMod_ (struct BigNum *rslt, unsigned n1, struct BigNum *mod);
|
||||
int bnSubMod_ (struct BigNum *rslt, struct BigNum *n1, struct BigNum *mod);
|
||||
int bnSubQMod_ (struct BigNum *rslt, unsigned n1, struct BigNum *mod);
|
||||
int bnMulMod_ (struct BigNum *rslt, struct BigNum *n1, struct BigNum *n2, struct BigNum *mod);
|
||||
int bnMulQMod_ (struct BigNum *rslt, struct BigNum *n1, unsigned n2, struct BigNum *mod);
|
||||
int bnSquareMod_ (struct BigNum *rslt, struct BigNum *n1, struct BigNum *mod);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ZRTP_CRYPTO_EC_H__ */
|
|
@ -1,387 +0,0 @@
|
|||
/*
|
||||
* libZRTP SDK library, implements the ZRTP secure VoIP protocol.
|
||||
* Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
* Contact: http://philzimmermann.com
|
||||
* For licensing and other legal details, see the file zrtp_legal.c.
|
||||
*
|
||||
* Viktor Krykun <v.krikun at zfoneproject.com>
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __ZRTP_ENGINE_H__
|
||||
#define __ZRTP_ENGINE_H__
|
||||
|
||||
#include "zrtp_config.h"
|
||||
#include "zrtp_types.h"
|
||||
#include "zrtp_crypto.h"
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @defgroup engine_dev ZRTP Engine related types and functions
|
||||
* @ingroup zrtp_dev
|
||||
* \{
|
||||
*/
|
||||
|
||||
#define ZRTP_IS_STREAM_DH(stream) \
|
||||
(stream->mode == ZRTP_STREAM_MODE_DH)
|
||||
|
||||
#define ZRTP_IS_STREAM_FAST(stream) \
|
||||
(stream->mode != ZRTP_STREAM_MODE_DH)
|
||||
|
||||
#define ZRTP_IS_STREAM_MULT(stream) \
|
||||
(stream->mode == ZRTP_STREAM_MODE_MULT)
|
||||
|
||||
#define ZRTP_IS_STREAM_PRESH(stream) \
|
||||
(stream->mode == ZRTP_STREAM_MODE_PRESHARED)
|
||||
|
||||
|
||||
/**
|
||||
* @brief Test Passive Rule N1
|
||||
* A passive endpoint never sends a Commit message. Semi-active endpoint does
|
||||
* not send a commit to a passive endpoint.
|
||||
* Return 1 if the tast have been passed successfully and 0 in other case.
|
||||
*/
|
||||
#define ZRTP_PASSIVE1_TEST(stream) \
|
||||
( (ZRTP_LICENSE_MODE_UNLIMITED == stream->zrtp->lic_mode) || \
|
||||
((ZRTP_LICENSE_MODE_ACTIVE == stream->zrtp->lic_mode) && (!stream->messages.peer_hello.pasive)) )
|
||||
|
||||
/**
|
||||
* @brief Test Passive Rule N2
|
||||
* A passive phone, if acting as a SIP initiator (meaning it initiated the call),
|
||||
* rejects all commit packets from everyone.
|
||||
* Return 1 if the tast have been passed successfully and 0 in other case
|
||||
*/
|
||||
#define ZRTP_PASSIVE2_TEST(stream) \
|
||||
( !((ZRTP_LICENSE_MODE_PASSIVE == stream->zrtp->lic_mode) && \
|
||||
(stream->session->signaling_role == ZRTP_SIGNALING_ROLE_INITIATOR)) )
|
||||
|
||||
/**
|
||||
* @brief Test Passive Rule N3
|
||||
* A passive phone rejects all commit messages from a PBX.
|
||||
* Return 1 if the tast have been passed successfully and 0 in other case
|
||||
*/
|
||||
#define ZRTP_PASSIVE3_TEST(stream) \
|
||||
( !(!stream->zrtp->is_mitm && stream->peer_mitm_flag && \
|
||||
(ZRTP_LICENSE_MODE_PASSIVE == stream->zrtp->lic_mode)) )
|
||||
|
||||
|
||||
/*===========================================================================*/
|
||||
/* PROTOCOL Logic */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* @brief Allocate ZRTP protocol structure
|
||||
* Allocates and initializes all necessary data according to the protocol mode.
|
||||
* Initializes required DH crypto context info and generates secret IDs.
|
||||
* @param stream - stream context in which protocol should be allocated;
|
||||
* @param is_initiator - defines protocol type (1 - initiator, 0 - responder).
|
||||
* @exception SOFTWARE exceptions.
|
||||
*/
|
||||
zrtp_status_t _zrtp_protocol_init( zrtp_stream_t *stream,
|
||||
uint8_t is_initiator,
|
||||
zrtp_protocol_t **proto);
|
||||
|
||||
/**
|
||||
* @brief Release protocol structure
|
||||
* Stops all replay tasks, clears all crypto sources and SRTP engine, and
|
||||
* releases memory. The protocol should be destroyed on: stream closing, or
|
||||
* switching to CLEAR or ERROR states.
|
||||
*/
|
||||
void _zrtp_protocol_destroy(zrtp_protocol_t *proto);
|
||||
|
||||
/**
|
||||
* @brief Encrypts RTP/RTCP media
|
||||
* After switching to Secure, the protocol structure is able to encrypt
|
||||
* media using the SRTP crypto-engine.
|
||||
* @param self - self-pointer to protocol instance;
|
||||
* @param packet - media packet for encryption;
|
||||
* @param is_rtp - defines type of media for encryption; value equal to 1
|
||||
* means RTP packet, 0 - RTCP.
|
||||
* @return
|
||||
* - zrtp_status_ok - if successfully encrypted;
|
||||
* - one of zrtp_status_t errors otherwise.
|
||||
*/
|
||||
zrtp_status_t _zrtp_protocol_encrypt( zrtp_protocol_t *proto,
|
||||
zrtp_rtp_info_t *packet,
|
||||
uint8_t is_rtp);
|
||||
|
||||
/**
|
||||
* @brief Decrypts RTP/RTCP media
|
||||
* After switching to Secure, the protocol structure is able to decrypt
|
||||
* media using the SRTP crypto-engine.
|
||||
* @param self - self-pointer to protocol instance;
|
||||
* @param packet - media packet for decryption;
|
||||
* @param is_rtp - defines type of media for decryption; value equal to 1
|
||||
* means RTP packet, 0 - RTCP.
|
||||
* @return
|
||||
* - zrtp_status_ok - if successfully decrypted;
|
||||
* - one of zrtp_status_t errors otherwise.
|
||||
*/
|
||||
zrtp_status_t _zrtp_protocol_decrypt( zrtp_protocol_t *self,
|
||||
zrtp_rtp_info_t *packet,
|
||||
uint8_t is_rtp);
|
||||
|
||||
|
||||
/*===========================================================================*/
|
||||
/* CRTPTO Utilities */
|
||||
/*===========================================================================*/
|
||||
|
||||
/**
|
||||
* ZRTP KDF function.
|
||||
* KDF(KI, Label, Context, L) = HMAC(KI, i | Label | 0x00 | Context | L). See
|
||||
* Section "4.5.1. The ZRTP Key Derivation Function" in ZRTP RFC for more info.
|
||||
* @param stream - used to obtain negotiated HMAC function and other parameters;
|
||||
* @param ki- secret key derivation key that is unknown to the wiretapper
|
||||
* (for example, s0);
|
||||
* @param label - string of nonzero octets that identifies the purpose for the
|
||||
* derived keying material;
|
||||
* @param context - includes ZIDi, ZIDr, and some optional nonce material;
|
||||
* @param length - needed digest length. (The output of the KDF is truncated to
|
||||
* the leftmost length bits);
|
||||
* @param digest - destination buffer.
|
||||
*/
|
||||
zrtp_status_t _zrtp_kdf( zrtp_stream_t* stream,
|
||||
zrtp_stringn_t* ki,
|
||||
zrtp_stringn_t* label,
|
||||
zrtp_stringn_t* context,
|
||||
uint32_t length,
|
||||
zrtp_stringn_t* digest);
|
||||
|
||||
/*!
|
||||
* \brief Allocate shared secret structure
|
||||
* This function allocates memory for a zrtp_shared_secret_t and initializes
|
||||
* the secret value using a zrtp_fill_shared_secret() function call. Used in
|
||||
* protocol allocating.
|
||||
* \param session - ZRTP session for access to global data.
|
||||
* \return
|
||||
* - allocated secrets - on success;
|
||||
* - NULL - if allocation fails.
|
||||
*/
|
||||
zrtp_shared_secret_t *_zrtp_alloc_shared_secret(zrtp_session_t* session);
|
||||
|
||||
/*!
|
||||
* \brief Restores secrets from the cache
|
||||
* Uploads retained secrets from the cache and initializes secret flags. If
|
||||
* the secret has expired (is_expired flag is set), its value will be randomly
|
||||
* regenerated. _zrtp_prepare_secrets() is called after the discovery phase on
|
||||
* the setting up the very first stream. After secrets are uploaded the
|
||||
* zrtp_secrets_t#_is_ready flag is enabled to prevent secrets from reinitialization
|
||||
* on setting up the next stream.
|
||||
* \param session - ZRTP session in which secrets should be restored.
|
||||
* - zrtp_status_ok - if secrets were restored successfully;
|
||||
* - one of zrtp_status_t errors in case of failure.
|
||||
*/
|
||||
zrtp_status_t _zrtp_prepare_secrets(zrtp_session_t* session);
|
||||
|
||||
/**
|
||||
* @brief Validate confirm chmac message.
|
||||
* In case of chmac failure it switches to Initiating Error state and generate
|
||||
* ZRTP_EVENT_WRONG_MESSAGE_HMAC security event.
|
||||
* @return
|
||||
* -1 - in case of error and 0 - on success.
|
||||
*/
|
||||
int _zrtp_validate_message_hmac(zrtp_stream_t *stream, zrtp_msg_hdr_t* msg2check, char* hmackey);
|
||||
|
||||
/**
|
||||
* @brief Computes preshared key using available secrets.
|
||||
* hash(len(rs1) | rs1 | len(auxsecret) | auxsecret | len(pbxsecret) | pbxsecret)
|
||||
* Result key stored in key variable, if key_id not NULL - hmac
|
||||
* of the preshared_key will be stored.
|
||||
* return
|
||||
* - zrtp_status_ok on success and one of libzrtp errors in case of failure
|
||||
*/
|
||||
zrtp_status_t _zrtp_compute_preshared_key( zrtp_session_t *session,
|
||||
zrtp_stringn_t* rs1,
|
||||
zrtp_stringn_t* auxs,
|
||||
zrtp_stringn_t* pbxs,
|
||||
zrtp_stringn_t* key,
|
||||
zrtp_stringn_t* key_id);
|
||||
|
||||
/** @brief Perform Key generation according to ZRTp RFC sec. 5.6 */
|
||||
zrtp_status_t _zrtp_set_public_value(zrtp_stream_t *stream, int is_initiator);
|
||||
|
||||
|
||||
/*===========================================================================*/
|
||||
/* PROTOCOL Utilites */
|
||||
/*===========================================================================*/
|
||||
|
||||
/*!
|
||||
* \brief Check availability to start stream (DH or Preshared)
|
||||
* The ZRTP specification says that only one DH stream can be run at a time between
|
||||
* two ZRTP endpoints. So _zrtp_can_start_stream(DH) looks over all sessions
|
||||
* between two ZIDs and if any other stream is running it denies the start of
|
||||
* another DH stream in parallel. Although the ZRTP standard says that Preshared
|
||||
* or Multistream stream can't be run in parallel with DH streams between two
|
||||
* ZRTP endpoints. So _zrtp_can_start_stream(PRESH) looks over all sessions between
|
||||
* two ZIDs and if any other DH stream is running it denies the start of
|
||||
* Preshared/Multistream stream in parallel. All operations with sessions and
|
||||
* streams are protected by mutexes. Call this function every time before starting
|
||||
* "initiating secure" process. For internal use only.
|
||||
* \sa "break the tie schemes" internal document.
|
||||
* \param stream - ZRTP stream which going to be started;
|
||||
* \param conc - in this variable _zrtp_can_start_stream() returns pointer to the
|
||||
* concurrent DH stream if it's in progress. It's used in "breaking the tie"
|
||||
* scheme.
|
||||
* \param mode - stream mode.
|
||||
* \return
|
||||
* - 1 if stream can be started;
|
||||
* - 0 - if stream can't be started and should wait for concurrent stream
|
||||
* establishment.
|
||||
*/
|
||||
int _zrtp_can_start_stream( zrtp_stream_t* stream,
|
||||
zrtp_stream_t** conc,
|
||||
zrtp_stream_mode_t mode);
|
||||
|
||||
/** Return ZRTP Stream mode which should be used for current stream. */
|
||||
zrtp_stream_mode_t _zrtp_define_stream_mode(zrtp_stream_t* stream);
|
||||
|
||||
/*!
|
||||
* \brief Chooses the best crypto component of the given type
|
||||
* Selects the crypto component according to the local initiator's profile and
|
||||
* the remote responder's Hello.
|
||||
* \param profile - local profile;
|
||||
* \param peer_hello - Hello packet, received from the remote peer;
|
||||
* \param type - type of the crypto component to be chosen.
|
||||
* \return:
|
||||
* - identifier of the chosen component (according to type);
|
||||
* - ZRTP_COMP_UNKN in case of error.
|
||||
*/
|
||||
uint8_t _zrtp_choose_best_comp( zrtp_profile_t* profile,
|
||||
zrtp_packet_Hello_t* peer_hello,
|
||||
zrtp_crypto_comp_t type);
|
||||
|
||||
/*!
|
||||
* \brief Computes replay timeouts
|
||||
* This function computes messages replays schedule. There are some recommended
|
||||
* values by ZRTP specification, but in some network environments values may be
|
||||
* sligh different
|
||||
*/
|
||||
uint32_t _zrtp_get_timeout(uint32_t curr_timeout, zrtp_msg_type_t msg);
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Terminates retransmission task
|
||||
* This function is a wrapper around zrtp_cancele_send_packet_later() which
|
||||
* unsets the zrtp_retry_task_t#_is_enabled flag to prevent the scheduler from
|
||||
* re-adding tasks after their termination.
|
||||
*/
|
||||
void _zrtp_cancel_send_packet_later( zrtp_stream_t* stream,
|
||||
zrtp_msg_type_t type);
|
||||
|
||||
/*!
|
||||
* \brief state switcher
|
||||
* This function changes stream state to \c state, makes a backup of the previous
|
||||
* state at zrtp_stream_t#_prev_state and prints debug information.
|
||||
* \warning Don't change the stream state directly. Use this function.
|
||||
* \param stream - ZRTP stream to be changed;
|
||||
* \param state - new state.
|
||||
*/
|
||||
void _zrtp_change_state( zrtp_stream_t* stream, zrtp_state_t state);
|
||||
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Shared STATE-MACHINE Routine */
|
||||
/*===========================================================================*/
|
||||
|
||||
// TODO: clean this up
|
||||
zrtp_status_t _zrtp_machine_enter_pendingsecure(zrtp_stream_t* stream, zrtp_rtp_info_t* commit);
|
||||
zrtp_status_t _zrtp_machine_enter_initiatingsecure(zrtp_stream_t* stream);
|
||||
zrtp_status_t _zrtp_machine_enter_secure(zrtp_stream_t* stream);
|
||||
zrtp_status_t _zrtp_machine_enter_pendingclear(zrtp_stream_t* stream);
|
||||
zrtp_status_t _zrtp_machine_enter_initiatingerror( zrtp_stream_t *stream,
|
||||
zrtp_protocol_error_t code,
|
||||
uint8_t notif);
|
||||
|
||||
zrtp_status_t _zrtp_machine_create_confirm(zrtp_stream_t *stream, zrtp_packet_Confirm_t* confirm);
|
||||
zrtp_status_t _zrtp_machine_process_confirm(zrtp_stream_t *stream, zrtp_packet_Confirm_t *confirm);
|
||||
zrtp_status_t _zrtp_machine_process_goclear(zrtp_stream_t* stream, zrtp_rtp_info_t* packet);
|
||||
|
||||
zrtp_status_t _zrtp_machine_start_initiating_secure(zrtp_stream_t *stream);
|
||||
zrtp_statemachine_type_t _zrtp_machine_preparse_commit(zrtp_stream_t *stream, zrtp_rtp_info_t* packet);
|
||||
|
||||
|
||||
/*===========================================================================*/
|
||||
/* PARSERS */
|
||||
/*===========================================================================*/
|
||||
|
||||
/*!
|
||||
* \brief Prepare RTP/ZRTP media packet for the further processing.
|
||||
* This function defines the packet type, parses SSRC and makes the sequence
|
||||
* number implicit. If it is a ZRTP message, packet length correctness and CRC
|
||||
* are checked as well.
|
||||
* \param stream - ZRTP stream associated with this packet;
|
||||
* \param packet - packet for preparing;
|
||||
* \param length - packet length;
|
||||
* \param info - resulting packet structure;
|
||||
* \param is_input - 1 - assumes incoming and 0 - outgoing packet direction.
|
||||
*/
|
||||
zrtp_status_t _zrtp_packet_preparse( zrtp_stream_t* stream,
|
||||
char* packet,
|
||||
uint32_t *length,
|
||||
zrtp_rtp_info_t* info,
|
||||
uint8_t is_input);
|
||||
|
||||
/*!
|
||||
* \brief Fills ZRTP message header and computes messages HMAC
|
||||
* _zrtp_packet_fill_msg_hdr() prepares a ZRTP message header for sending. It calculates
|
||||
* the total message length in 4-byte words and fills the message type block.
|
||||
* \param stream - stream within in the operation will be performed
|
||||
* \param type - ZRTP message type;
|
||||
* \param body_length - message body length (without header);
|
||||
* \param hdr - message ZRTP header
|
||||
* \return
|
||||
* - zrtp_status_ok - if success;
|
||||
* - zrtp_status_bad_param - if message \c type is unknown.
|
||||
*/
|
||||
zrtp_status_t _zrtp_packet_fill_msg_hdr( zrtp_stream_t *stream,
|
||||
zrtp_msg_type_t type,
|
||||
uint16_t body_length,
|
||||
zrtp_msg_hdr_t *hdr);
|
||||
|
||||
/**
|
||||
* @brief Sends ZRTP message onto the network
|
||||
* _zrtp_packet_send_message constructs a ZRTP header and prepares packet for sending,
|
||||
* computes CRC and injects the packet into the network using the interface
|
||||
* function zrtp_send_rtp().
|
||||
* @param ctx - ZRTP stream context;
|
||||
* @param type - packet type to construct primitive ZRTP messages;
|
||||
* @param message - ZRTP message for sending.
|
||||
* @return
|
||||
* - 0 - if sent successfully;
|
||||
* - -1 - if error.
|
||||
*/
|
||||
int _zrtp_packet_send_message( zrtp_stream_t *stream,
|
||||
zrtp_msg_type_t type,
|
||||
const void *message);
|
||||
|
||||
/** @brief Returns ZRTP message type by symbolic name in header. */
|
||||
zrtp_msg_type_t _zrtp_packet_get_type(ZRTP_UNALIGNED(zrtp_rtp_hdr_t)*hdr, uint32_t length);
|
||||
|
||||
/**
|
||||
* @brief Insert CRC32 to ZRTP packets
|
||||
* This function computes the 32 bit ZRTP packet checksum according to RFC 3309.
|
||||
* As specified at ZRTP RFC, CRC32 is appended to the end of the extension for every ZRTP packet.
|
||||
* @param packet - zrtp packet wrapper structure.
|
||||
*/
|
||||
void _zrtp_packet_insert_crc(char* packet, uint32_t length);
|
||||
|
||||
/**
|
||||
* @brief Validate ZRTP packet CRC
|
||||
* @return
|
||||
* - 0 if correct CRC;
|
||||
* - -1 if CRC validation failed.
|
||||
*/
|
||||
int8_t _zrtp_packet_validate_crc(const char* packet, uint32_t length);
|
||||
|
||||
/* \} */
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ZRTP_ENGINE_H__ */
|
|
@ -1,136 +0,0 @@
|
|||
/*
|
||||
* libZRTP SDK library, implements the ZRTP secure VoIP protocol.
|
||||
* Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
* Contact: http://philzimmermann.com
|
||||
* For licensing and other legal details, see the file zrtp_legal.c.
|
||||
*
|
||||
* Viktor Krykun <v.krikun at zfoneproject.com>
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* \file zrtp_error.h
|
||||
* \brief libzrtp errors definitions
|
||||
*/
|
||||
|
||||
#ifndef __ZRTP_ERROR_H__
|
||||
#define __ZRTP_ERROR_H__
|
||||
|
||||
#include "zrtp_config.h"
|
||||
|
||||
/**
|
||||
* \defgroup zrtp_errors Libzrtp Error Definitions
|
||||
*
|
||||
* In this section the ZRTP protocol error codes and the library internal errors are defined.
|
||||
*
|
||||
* When ZRTP Protocl error detected, zrtp_callback_event_t#on_zrtp_security_event is called and
|
||||
* zrtp_session_info_t#last_error contains error code.
|
||||
* \{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Define protocol error codes according to ZRTP RFC sec. 5.9
|
||||
*/
|
||||
typedef enum zrtp_protocol_error_t
|
||||
{
|
||||
zrtp_error_unknown = 0,
|
||||
zrtp_error_timeout = 1,
|
||||
|
||||
zrtp_error_invalid_packet = 0x10, /** Malformed packet (CRC OK, but wrong structure) */
|
||||
zrtp_error_software = 0x20, /** Critical software error */
|
||||
zrtp_error_version = 0x30, /** Unsupported ZRTP version */
|
||||
zrtp_error_hello_mistmatch = 0x40, /** Hello components mismatch */
|
||||
|
||||
zrtp_error_hash_unsp = 0x51, /** Hash type not supported */
|
||||
zrtp_error_cipher_unsp = 0x52, /** Cipher type not supported */
|
||||
zrtp_error_pktype_unsp = 0x53, /** Public key exchange not supported */
|
||||
zrtp_error_auth_unsp = 0x54, /** SRTP auth. tag not supported */
|
||||
zrtp_error_sas_unsp = 0x55, /** SAS scheme not supported */
|
||||
zrtp_error_no_secret = 0x56, /** No shared secret available, Preshared mode required */
|
||||
|
||||
zrtp_error_possible_mitm1 = 0x61, /** DH Error: bad pvi or pvr ( == 1, 0, or p-1) */
|
||||
zrtp_error_possible_mitm2 = 0x62, /** DH Error: hvi != hashed data */
|
||||
zrtp_error_possible_mitm3 = 0x63, /** Received relayed SAS from untrusted MiTM */
|
||||
|
||||
zrtp_error_auth_decrypt = 0x70, /** Auth. Error: Bad Confirm pkt HMAC */
|
||||
zrtp_error_nonse_reuse = 0x80, /** Nonce reuse */
|
||||
zrtp_error_equal_zid = 0x90, /** Equal ZIDs in Hello */
|
||||
zrtp_error_service_unavail = 0xA0, /** Service unavailable */
|
||||
zrtp_error_goclear_unsp = 0x100,/** GoClear packet received, but not allowed */
|
||||
|
||||
zrtp_error_wrong_zid = 0x202, /** ZID received in new Hello doesn't equal to ZID from the previous stream */
|
||||
zrtp_error_wrong_meshmac = 0x203, /** Message HMAC doesn't match with pre-received one */
|
||||
zrtp_error_count
|
||||
} zrtp_protocol_error_t;
|
||||
|
||||
/**
|
||||
* \brief libzrtp functions statuses.
|
||||
*
|
||||
* Note that the value of zrtp_status_ok is equal to zero. This can simplify error checking
|
||||
* somewhat.
|
||||
*/
|
||||
typedef enum zrtp_status_t
|
||||
{
|
||||
zrtp_status_ok = 0, /** OK status */
|
||||
zrtp_status_fail = 1, /** General, unspecified failure */
|
||||
zrtp_status_bad_param = 2, /** Wrong, unsupported parameter */
|
||||
zrtp_status_alloc_fail = 3, /** Fail allocate memory */
|
||||
zrtp_status_auth_fail = 4, /** SRTP authentication failure */
|
||||
zrtp_status_cipher_fail = 5, /** Cipher failure on RTP encrypt/decrypt */
|
||||
zrtp_status_algo_fail = 6, /** General Crypto Algorithm failure */
|
||||
zrtp_status_key_expired = 7, /** SRTP can't use key any longer */
|
||||
zrtp_status_buffer_size = 8, /** Input buffer too small */
|
||||
zrtp_status_drop = 9, /** Packet process DROP status */
|
||||
zrtp_status_open_fail = 10, /** Failed to open file/device */
|
||||
zrtp_status_read_fail = 11, /** Unable to read data from the file/stream */
|
||||
zrtp_status_write_fail = 12, /** Unable to write to the file/stream */
|
||||
zrtp_status_old_pkt = 13, /** SRTP packet is out of sliding window */
|
||||
zrtp_status_rp_fail = 14, /** RTP replay protection failed */
|
||||
zrtp_status_zrp_fail = 15, /** ZRTP replay protection failed */
|
||||
zrtp_status_crc_fail = 16, /** ZRTP packet CRC is wrong */
|
||||
zrtp_status_rng_fail = 17, /** Can't generate random value */
|
||||
zrtp_status_wrong_state = 18, /** Illegal operation in current state */
|
||||
zrtp_status_attack = 19, /** Attack detected */
|
||||
zrtp_status_notavailable = 20, /** Function is not available in current configuration */
|
||||
zrtp_status_count = 21
|
||||
} zrtp_status_t;
|
||||
|
||||
/** \} */
|
||||
|
||||
/** \manonly */
|
||||
|
||||
#define ZRTP_MIM2_WARNING_STR \
|
||||
"Possible Man-In-The-Middle-Attack! Switching to state Error\n"\
|
||||
"because a packet arrived that was ZRTP_DHPART2, but contained\n"\
|
||||
"a g^y that didn't match the previous ZRTP_COMMIT.\n"
|
||||
|
||||
#define ZRTP_MITM1_WARNING_STR "DH validating failed. (pvi is 1 or p-1), aborted\n"
|
||||
|
||||
#define ZRTP_VERIFIED_INIT_WARNING_STR \
|
||||
"Falling back to cleartext because a packet arrived that was\n"\
|
||||
"ZRTP_CONFIRM1, but which couldn't be verified - the sender must have a different\n"\
|
||||
"shared secret than we have.\n"
|
||||
|
||||
#define ZRTP_VERIFIED_RESP_WARNING_STR \
|
||||
"Falling back to cleartext because a packet arrived that was ZRTP_CONFIRM2,\n"\
|
||||
" but which couldn't be verified - the sender must have a different shared secret than we have.\n"
|
||||
|
||||
#define ZRTP_EQUAL_ZID_WARNING_STR \
|
||||
"Received a ZRTP_HELLO packet with the same ZRTP ID that we have.\n"\
|
||||
" This is likely due to a bug in the software. Ignoring the ZRTP_HELLO\n"\
|
||||
" packet, therefore this call cannot be encrypted.\n"
|
||||
|
||||
#define ZRTP_UNSUPPORTED_COMP_WARNING_STR \
|
||||
" Received ZRTP_HELLO packet with an algorithms field which had a\n"\
|
||||
" list of hashes that didn't include any of our supported hashes. Ignoring\n"\
|
||||
" the ZRTP_HELLO packet, therefore this call cannot be encrypted.\n"
|
||||
|
||||
#define ZRTP_NOT_UNIQUE_NONCE_WARNING_STR \
|
||||
" Received COMMIT with hash value already used in another stream within this ZRTP session\n"
|
||||
|
||||
#define ZRTP_RELAYED_SAS_FROM_NONMITM_STR \
|
||||
" Received SAS Relaying message from endpoint which haven't introduced as MiTM.\n"
|
||||
|
||||
/** \endmanonly */
|
||||
|
||||
#endif /* __ZRTP_ERROR_H__ */
|
|
@ -1,692 +0,0 @@
|
|||
/*
|
||||
* libZRTP SDK library, implements the ZRTP secure VoIP protocol.
|
||||
* Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
* Contact: http://philzimmermann.com
|
||||
* For licensing and other legal details, see the file zrtp_legal.c.
|
||||
*
|
||||
* Viktor Krykun <v.krikun at zfoneproject.com>
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \file zrtp_iface.h
|
||||
* \brief libzrtp product-dependent functions
|
||||
*/
|
||||
|
||||
#ifndef __ZRTP_IFACE_H__
|
||||
#define __ZRTP_IFACE_H__
|
||||
|
||||
#include "zrtp_config.h"
|
||||
#include "zrtp_base.h"
|
||||
#include "zrtp_string.h"
|
||||
#include "zrtp_error.h"
|
||||
#include "zrtp_iface_system.h"
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*======================================================================*/
|
||||
/* libzrtp interface: Cache */
|
||||
/*======================================================================*/
|
||||
|
||||
/*!
|
||||
* \defgroup zrtp_iface_cache ZRTP Cache
|
||||
* \ingroup zrtp_iface
|
||||
*
|
||||
* The secret cache implementation should have a two-layer structure: each pair of ZIDs should have
|
||||
* a relevant pair of secrets (current and previous). In addition to the value of the secret, the
|
||||
* cache should contain: verification flag, last usage time-stamp and cache TTL value.
|
||||
*
|
||||
* The simplest secret cache scheme implementation is:
|
||||
* \code
|
||||
* [local_ZID][remote_ZID][curr_cache][prev_cache][verified][used at][cache ttl]
|
||||
* \endcode
|
||||
* \warning
|
||||
* Libzrtp doen't provide synchronization for cache read/write operation. Cache is not thread safe
|
||||
* by default. Implementor must take care of synchronization inside his implementation.
|
||||
*
|
||||
* For more information see corresponding section \ref XXX. Samples can be found at \ref XXX
|
||||
* (\c zrtp_iface_builtin.h, \c zrtp_iface_cache.c)
|
||||
* \{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Data types and functions related to shared secrets.
|
||||
*/
|
||||
typedef struct zrtp_callback_cache_t
|
||||
{
|
||||
/**
|
||||
* \brief Cache initialization.
|
||||
*
|
||||
* libzrtp calls this function before start using cache routine at zrtp_init().
|
||||
*
|
||||
* \param zrtp - libzrtp global context;
|
||||
* \sa zrtp_callback_cache_t#on_down()
|
||||
*/
|
||||
zrtp_status_t (*on_init)(zrtp_global_t* zrtp);
|
||||
|
||||
/**
|
||||
* \brief Cache deinitialization.
|
||||
*
|
||||
* libzrtp calls this function when zrtp cache is no longer needed at zrtp_down().
|
||||
* \sa zrtp_callback_cache_t#on_init()
|
||||
*/
|
||||
void (*on_down)();
|
||||
|
||||
/**
|
||||
* \brief Add/Update cache value
|
||||
*
|
||||
* Interface function for entering the retained secret to the cache. This function should
|
||||
* guarantee permanent storage in the cache. The implementation algorithm is the following:
|
||||
* - if the entry associated with a given pair of ZIDs does not exist, the value should be
|
||||
* stored in cache.
|
||||
* - if the entry already exists, the current secret value becomes stored as the previous one.
|
||||
* The new value becomes stored as the current one. Besides rss->value a timestamp
|
||||
* (rss->lastused_at) and cache TTL(rss->ttl) should be updated.
|
||||
*
|
||||
* \param one_zid - ZID of one side;
|
||||
* \param another_zid - ZID of the other side;
|
||||
* \param rss - a structure storing the value of the secret that needs to be saved.
|
||||
* \return
|
||||
* - zrtp_status_ok if operation is successful;
|
||||
* - some error code from \ref zrtp_status_t in case of error.
|
||||
* \sa zrtp_callback_cache_t#on_get
|
||||
*/
|
||||
zrtp_status_t (*on_put)( const zrtp_stringn_t* one_zid,
|
||||
const zrtp_stringn_t* another_zid,
|
||||
zrtp_shared_secret_t *rss);
|
||||
|
||||
/**
|
||||
* \brief Return secret cache associated with specified pair of ZIDs.
|
||||
*
|
||||
* This function should return the secret associated with the specified pair of ZIDs. In
|
||||
* addition to the secret value, TTL (rss->ttl) and cache timestamp (rss->lastused_at) value
|
||||
* should be also returned.
|
||||
*
|
||||
* \param one_zid - one side's ZID;
|
||||
* \param another_zid - the other side's ZID;
|
||||
* \param prev_requested - if this parameter value is 1, the function should return the previous
|
||||
* secret's value. If this parameter value is 0, the function should return the current
|
||||
* secret's value;
|
||||
* \param rss - structure that needs to be filled in.
|
||||
* \return
|
||||
* - zrtp_status_ok - if operation is successful;
|
||||
* - zrtp_status_fail - if the secret cannot be found;
|
||||
* - some error code from zrtp_status_t if an error occurred.
|
||||
* \sa zrtp_callback_cache_t#on_put
|
||||
*/
|
||||
zrtp_status_t (*on_get)( const zrtp_stringn_t* one_zid,
|
||||
const zrtp_stringn_t* another_zid,
|
||||
zrtp_shared_secret_t *rss,
|
||||
int prev_requested);
|
||||
|
||||
/**
|
||||
* \brief Set/clear cache verification flag
|
||||
*
|
||||
* This function should set the secret verification flag associated with a pair of ZIDs.
|
||||
* \warning
|
||||
* For internal use only. To change the verification flag from the user space use the
|
||||
* zrtp_verified_set() function.
|
||||
*
|
||||
* \param one_zid - first ZID for cache identification;
|
||||
* \param another_zid - second ZID for cache identification;
|
||||
* \param verified - verification flag (value can be 0 or 1).
|
||||
* \return
|
||||
* - zrtp_status_ok if flag is successfully modified;
|
||||
* - zrtp_status_fail if the secret cannot be found;
|
||||
* - some other error code from \ref zrtp_status_t if another error occurred.
|
||||
*/
|
||||
zrtp_status_t (*on_set_verified)( const zrtp_stringn_t* one_zid,
|
||||
const zrtp_stringn_t* another_zid,
|
||||
uint32_t verified);
|
||||
|
||||
/**
|
||||
* \brief Return cache verification flag
|
||||
*
|
||||
* This function return the secret verification flag associated with a pair of ZIDs.
|
||||
*
|
||||
* \param one_zid - first ZID for cache identification;
|
||||
* \param another_zid - second ZID for cache identification;
|
||||
* \param verified - verification flag to be filled in
|
||||
* \return
|
||||
* - zrtp_status_ok if flag is successfully returned;
|
||||
* - zrtp_status_fail if the secret cannot be found;
|
||||
* - some other error code from \ref zrtp_status_t if another error occurred.
|
||||
*/
|
||||
zrtp_status_t (*on_get_verified)( const zrtp_stringn_t* one_zid,
|
||||
const zrtp_stringn_t* another_zid,
|
||||
uint32_t* verified);
|
||||
|
||||
/**
|
||||
* \brief Should set Secure Since cache aparemeter to current date and time
|
||||
*
|
||||
* This function is optional and may be ommited.
|
||||
*
|
||||
* \param one_zid - first ZID for cache identification;
|
||||
* \param another_zid - second ZID for cache identification;
|
||||
* \return
|
||||
* - zrtp_status_ok if the oprtation finished sucessfully.
|
||||
* - some other error code from \ref zrtp_status_t if another error occurred.
|
||||
*/
|
||||
zrtp_status_t (*on_reset_since)( const zrtp_stringn_t* one_zid,
|
||||
const zrtp_stringn_t* another_zid);
|
||||
|
||||
/**
|
||||
* \brief Add/Update cache value for MiTM endpoint
|
||||
*
|
||||
* This function is analogy to zrtp_callback_cache_t#on_put but for MiTM endpoint.
|
||||
* \todo Add more detail description
|
||||
* \sa zrtp_callback_cache_t#on_put zrtp_callback_cache_t#on_get_mitm
|
||||
*/
|
||||
zrtp_status_t (*on_put_mitm)( const zrtp_stringn_t* one_zid,
|
||||
const zrtp_stringn_t* another_zid,
|
||||
zrtp_shared_secret_t *rss);
|
||||
|
||||
/**
|
||||
* \brief Return secret cache for MiTM endpoint
|
||||
*
|
||||
* This function is analogy to zrtp_callback_cache_t#on_get but for MiTM endpoint.
|
||||
* \todo Add more detail description
|
||||
* \sa zrtp_callback_cache_t#on_get zrtp_callback_cache_t#on_put_mitm
|
||||
*/
|
||||
zrtp_status_t (*on_get_mitm)( const zrtp_stringn_t* one_zid,
|
||||
const zrtp_stringn_t* another_zid,
|
||||
zrtp_shared_secret_t *rss);
|
||||
|
||||
/**
|
||||
* \brief Return Preshared calls counter
|
||||
*
|
||||
* This function should return the preshared calls counter associated with a pair of ZIDs.
|
||||
*
|
||||
* \param one_zid - first ZID for cache identification;
|
||||
* \param another_zid - second ZID for cache identification;
|
||||
* \param counter - preshared calls counter to be filled in
|
||||
* \return
|
||||
* - zrtp_status_ok if counter is successfully returned;
|
||||
* - zrtp_status_fail if the secret cannot be found;
|
||||
* - some other error code from \ref zrtp_status_t if another error occurred.
|
||||
*/
|
||||
zrtp_status_t (*on_presh_counter_get)( const zrtp_stringn_t* one_zid,
|
||||
const zrtp_stringn_t* another_zid,
|
||||
uint32_t* counter);
|
||||
|
||||
/**
|
||||
* \brief Increase/reset Preshared streams counter made between two endpoints (ZIDs)
|
||||
*
|
||||
* This function should set the preshared calls counter associated with a pair of ZIDs.
|
||||
* Function is optional and should be implemented if your prodict uses Preshared keys exchange.
|
||||
*
|
||||
* \param one_zid - first ZID for;
|
||||
* \param another_zid - second ZID;
|
||||
* \param counter - Preshared calls counter.
|
||||
* \return
|
||||
* - zrtp_status_ok if the counter is successfully modified;
|
||||
* - zrtp_status_fail if the secret cannot be found;
|
||||
* - some other error code from \ref zrtp_status_t if another error occurred.
|
||||
*/
|
||||
zrtp_status_t (*on_presh_counter_set)( const zrtp_stringn_t* one_zid,
|
||||
const zrtp_stringn_t* another_zid,
|
||||
uint32_t counter);
|
||||
} zrtp_callback_cache_t;
|
||||
|
||||
|
||||
/** \} */
|
||||
|
||||
/*======================================================================*/
|
||||
/* libzrtp interface: Scheduler */
|
||||
/*======================================================================*/
|
||||
|
||||
/**
|
||||
* \defgroup zrtp_iface_scheduler ZRTP Delay Calls
|
||||
* \ingroup zrtp_iface
|
||||
*
|
||||
* Algorithm used in the scheduled call module is described in detail in section \ref XXX of the
|
||||
* developer's guide documentation. Technical details of this function's implementation follows.
|
||||
*
|
||||
* For more information see corresponding section \ref XXX. Samples can be found at \ref XXX
|
||||
* (\c zrtp_iface_builtin.h, \c zrtp_iface_scheduler.c)
|
||||
* \{
|
||||
*/
|
||||
|
||||
/** \brief ZRTP Delays Calls signature. */
|
||||
typedef void (*zrtp_call_callback_t)(zrtp_stream_t*, zrtp_retry_task_t*);
|
||||
|
||||
/**
|
||||
* @brief Delay Call wrapper
|
||||
*/
|
||||
struct zrtp_retry_task_t
|
||||
{
|
||||
/** \brief Task action callback */
|
||||
zrtp_call_callback_t callback;
|
||||
|
||||
/** \brief Timeout before call in milliseconds */
|
||||
zrtp_time_t timeout;
|
||||
|
||||
/**
|
||||
* \brief User data pointer.
|
||||
*
|
||||
* Pointer to the user data. This pointer can be used for fast access to some additional data
|
||||
* attached to this task by the user application.
|
||||
*/
|
||||
void* usr_data;
|
||||
|
||||
|
||||
// TODO: hide these elements
|
||||
/**
|
||||
* \brief Task activity flag.
|
||||
*
|
||||
* Libzrtp unsets this flag on task canceling. It prevents the scheduler engine from re-adding
|
||||
* an already canceled task. Callback handlers skip passive tasks.
|
||||
* \note
|
||||
* For internal use only. Don't' modify this field in implementation.
|
||||
*/
|
||||
uint8_t _is_enabled;
|
||||
|
||||
/**
|
||||
* \brief Number of task retries.
|
||||
*
|
||||
* Every handler that attempts the task increases it by one. When the limit is reached the
|
||||
* scheduler should stop retries and performs a specified action - generally raises an error.
|
||||
* \note
|
||||
* For internal use only. Don't' modify this field in implementation.
|
||||
*/
|
||||
uint32_t _retrys;
|
||||
|
||||
/**
|
||||
* \brief Task Busy flag.
|
||||
*
|
||||
* Built-in cache implementation uses this flag to protect task from being removed during the
|
||||
* callback.
|
||||
*
|
||||
* Default cache implementation "locks" this flag before call zrtp_retry_task#callback
|
||||
* and "unlocks" when the call is performed. zrtp_callback_scheduler_t#on_wait_call_later exits
|
||||
* when there are no callbacks in progress - no tasks with \c _is_busy enabled.
|
||||
*/
|
||||
uint8_t _is_busy;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Delay Calls callbacks
|
||||
*/
|
||||
typedef struct zrtp_callback_scheduler_t
|
||||
{
|
||||
/**
|
||||
* \brief Delay Calls initialization.
|
||||
*
|
||||
* libzrtp calls this function before start using scheduler routine at zrtp_init().
|
||||
*
|
||||
* \param zrtp - libzrtp global context;
|
||||
* \sa zrtp_callback_scheduler_t#on_down()
|
||||
*/
|
||||
zrtp_status_t (*on_init)(zrtp_global_t* zrtp);
|
||||
|
||||
/**
|
||||
* \brief Delay Calls deinitialization.
|
||||
*
|
||||
* libzrtp calls this function when zrtp scheduler is no longer needed at zrtp_down().
|
||||
* \sa zrtp_callback_scheduler_t#on_init()
|
||||
*/
|
||||
void (*on_down)();
|
||||
|
||||
/**
|
||||
* \brief Interface for performing delay call
|
||||
*
|
||||
* This function should add delay call request (\c task) to the processing queue. When the
|
||||
* zrtp_retry_task_t#timeout is expired, scheduler should call zrtp_retry_task_t#callback and
|
||||
* remove tasks from the processing queue.
|
||||
*
|
||||
* \param stream - stream context for processing the callback function;
|
||||
* \param task - task structure that should be processed.
|
||||
* \sa zrtp_callback_scheduler_t#on_cancel_call_later
|
||||
*/
|
||||
void (*on_call_later)(zrtp_stream_t *stream, zrtp_retry_task_t* task);
|
||||
|
||||
/**
|
||||
* \brief Interface for canceling a delay calls
|
||||
*
|
||||
* This function cancels delay call if it still in the processing queue. The algorithm is the
|
||||
* following:
|
||||
* - If there is a specified task for a specified stream, this task should be deleted.
|
||||
* - If the \c task parameter is equal to NULL - ALL tasks for the specified stream must be
|
||||
* terminated and removed from the queue.
|
||||
*
|
||||
* \param ctx - stream context for the operation;
|
||||
* \param task - delayed call wrapper structure.
|
||||
* \sa zrtp_callback_scheduler_t#on_call_later
|
||||
*/
|
||||
void (*on_cancel_call_later)(zrtp_stream_t* ctx, zrtp_retry_task_t* task);
|
||||
|
||||
/**
|
||||
* \brief Interface for waiting for scheduling tasks is finished
|
||||
*
|
||||
* This function is called by libzrtp when the state-mamchine is in a position to destroy ZRTP
|
||||
* session and all incapsulated streams. Allocated for the stream memory may be cleared and
|
||||
* released. If after this operation, scheduler perform time-out call it will bring system to
|
||||
* crash.
|
||||
*
|
||||
* The scheduler implementation must guarantee that any delay call for the \c stream will not be
|
||||
* performed after on_wait_call_later().
|
||||
*
|
||||
* \param stream - stream context for the operation;
|
||||
* \sa zrtp_callback_scheduler_t#on_call_later.
|
||||
*/
|
||||
void (*on_wait_call_later)(zrtp_stream_t* stream);
|
||||
} zrtp_callback_scheduler_t;
|
||||
|
||||
/** \} */
|
||||
|
||||
/*======================================================================*/
|
||||
/* libzrtp interface: Protocol */
|
||||
/*======================================================================*/
|
||||
|
||||
/**
|
||||
* \defgroup zrtp_iface_proto ZRTP Protocol Feedback
|
||||
* \ingroup zrtp_iface
|
||||
*
|
||||
* This section defines ZRTP protcol events. Detail description of ZRTP state-machine is defined in
|
||||
* \ref XXX.
|
||||
* \{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief ZRTP Protocol events
|
||||
*
|
||||
* For additional information see \ref XXX
|
||||
*/
|
||||
typedef enum zrtp_protocol_event_t
|
||||
{
|
||||
/** \brief Just a stub for error detection. */
|
||||
ZRTP_EVENT_UNSUPPORTED = 0,
|
||||
|
||||
/** \brief Switching to CLEAR state */
|
||||
ZRTP_EVENT_IS_CLEAR,
|
||||
|
||||
/** \brief Switching to INITIATING_SECURE state */
|
||||
ZRTP_EVENT_IS_INITIATINGSECURE,
|
||||
|
||||
/** \brief Switching to PENDING_SECURE state */
|
||||
ZRTP_EVENT_IS_PENDINGSECURE,
|
||||
|
||||
/** \brief Switching to PENDING_CLEAR state */
|
||||
ZRTP_EVENT_IS_PENDINGCLEAR,
|
||||
|
||||
/**
|
||||
* \brief Switching to NO_ZRTP state.
|
||||
*
|
||||
* Hello packet undelivered - no ZRTP endpoint and other end
|
||||
*/
|
||||
ZRTP_EVENT_NO_ZRTP,
|
||||
|
||||
/**
|
||||
* \brief First N Hello packet undelivered - probably, no ZRTP endpoint and other end
|
||||
*
|
||||
* Libzrtp raises this event after few Hello have been send without receiving response from the
|
||||
* remote endpoint. User application may use this event to stop Securing ritual if connection
|
||||
* lag is important.
|
||||
*
|
||||
* Developer should take into account that delays in Hello receiving may be conditioned by
|
||||
* interruptions in media channel
|
||||
*
|
||||
* \warning Don't handle this event unless necessary
|
||||
*/
|
||||
ZRTP_EVENT_NO_ZRTP_QUICK,
|
||||
|
||||
/**
|
||||
* \brief MiTM Enrollment with MiTM endpoint
|
||||
*
|
||||
* Informs the Client-side endpoint of receiving a registration invitation from the MiTM.
|
||||
* Libzrtp raises this event after switching to the Secure state (ZRTP_EVENT_IS_SECURE). The
|
||||
* user may accept the invitation using a zrtp_register_with_trusted_mitm() call.
|
||||
*/
|
||||
ZRTP_EVENT_IS_CLIENT_ENROLLMENT,
|
||||
|
||||
/**
|
||||
* \brief New user has registered to the MitM
|
||||
*
|
||||
* Informs MitM of the registration of a new user. Libzrtp raises this event when a user calls
|
||||
* the special registration number and has switched to the secure state.
|
||||
*/
|
||||
ZRTP_EVENT_NEW_USER_ENROLLED,
|
||||
|
||||
/**
|
||||
* \brief New user has already registered with the MiTM
|
||||
*
|
||||
* Notifies the MiTM of an attempt to register from a user that is already registered. In this
|
||||
* case a new MiTM secret will not be generated and the user may be informed by voice prompt.
|
||||
* Libzrtp raises this event from the SECURE state.
|
||||
*/
|
||||
ZRTP_EVENT_USER_ALREADY_ENROLLED,
|
||||
|
||||
/**
|
||||
* \brief User has cancelled registration
|
||||
*
|
||||
* Libzrtp may raise this event during regular calls when it discovers that the user has removed
|
||||
* its MiTM secret. This event informs the MiTM that the SAS can no longer be transferred to
|
||||
* this user.
|
||||
*/
|
||||
ZRTP_EVENT_USER_UNENROLLED,
|
||||
|
||||
/**
|
||||
* \brief SAS value and/or rendering scheme was updated
|
||||
*
|
||||
* LibZRTP raises this event when the SAS value is transferred from the trusted MiTM. The value
|
||||
* is rendered automatically according to the rendering scheme specified by the trusted MiTM.
|
||||
* (it may be different than that of the previous one).
|
||||
*
|
||||
* On receiving this event, the Client application should replace the old SAS with the new one
|
||||
* and ask the user to verify it. This event is called from the Secure state only.
|
||||
*/
|
||||
ZRTP_EVENT_LOCAL_SAS_UPDATED,
|
||||
|
||||
/**
|
||||
* \brief SAS transfer was accepted by the remote side
|
||||
*
|
||||
* Libzrtp raises this event to inform the Server-side about accepting the change of SAS value
|
||||
* and/or rendering scheme by the remote client. This event is called from the Secure state
|
||||
* only.
|
||||
*/
|
||||
ZRTP_EVENT_REMOTE_SAS_UPDATED,
|
||||
|
||||
/**
|
||||
* \brief Swishing to SECURE state
|
||||
*
|
||||
* Duplicates zrtp_callback_event_t#on_zrtp_secure for more thin adjustments.
|
||||
*/
|
||||
ZRTP_EVENT_IS_SECURE,
|
||||
|
||||
/**
|
||||
* \brief Swishing to SECURE state is finished.
|
||||
*
|
||||
* Equal to ZRTP_EVENT_IS_SECURE but called when the Securing process is completely finished:
|
||||
* new RS secret is generate, cache flags updated and etc. Can be used in extended application
|
||||
* for more thin adjustments.
|
||||
*/
|
||||
ZRTP_EVENT_IS_SECURE_DONE,
|
||||
|
||||
/**
|
||||
* \brief Indicates DRM restriction. Stream can't go Secure.
|
||||
*
|
||||
* Libzrtp generate this event if DRM rules don't allow to switch to Secure mode:
|
||||
* - A passive endpoint never sends a Commit message. Semi-active endpoint does not send a
|
||||
* Commit to a passive endpoint
|
||||
* - A passive phone, if acting as a SIP initiator r ejects all commit packets from everyone.
|
||||
* - A passive phone rejects all commit messages from a PBX.
|
||||
*/
|
||||
ZRTP_EVENT_IS_PASSIVE_RESTRICTION,
|
||||
|
||||
ZRTP_EVENT_COUNT
|
||||
|
||||
} zrtp_protocol_event_t;
|
||||
|
||||
/**
|
||||
* \brief ZRTP Protocol Errors and Warnings
|
||||
*
|
||||
* For additional information see \ref XXX
|
||||
*/
|
||||
typedef enum zrtp_security_event_t
|
||||
{
|
||||
/**
|
||||
* \brief Switching to ERROR state
|
||||
*
|
||||
* The exact error code can be found at zrtp_stream_info_t#last_error. Use zrtp_log_error2str()
|
||||
* to get error description in text mode.
|
||||
*/
|
||||
ZRTP_EVENT_PROTOCOL_ERROR = ZRTP_EVENT_COUNT,
|
||||
|
||||
/**
|
||||
* \brief Hello Hash is different from that received in signaling.
|
||||
*
|
||||
* In accordance with sec. 8.1 of the ZRTP RFC, libzrtp provides the ability to prevent DOS
|
||||
* attacks. libzrtp can detect an attack in which the hash of the remote Hello was received
|
||||
* through signaling and added to the ZRTP context (zrtp_signaling_hash_set()).
|
||||
*
|
||||
* When the hash of the incoming Hello doesn't match the hash from signaling, the
|
||||
* ZRTP_EVENT_WRONG_SIGNALING_HASH event is raised and the connection MAY be terminated
|
||||
* manually.
|
||||
*/
|
||||
ZRTP_EVENT_WRONG_SIGNALING_HASH,
|
||||
|
||||
/**
|
||||
* \brief Hmac of the received packet is different from the hmac value earlier received.
|
||||
*
|
||||
* If the Hello hash is sent through protected signaling, libzrtp provides the ability to
|
||||
* prevent protocol packets from modification and even eliminates comparing the SAS. To do this,
|
||||
* libzrtp compares the message Hmac with the Hmac received in the previous message.
|
||||
*
|
||||
* If the Hmacs don't match, the ZRTP_EVENT_WRONG_MESSAGE_HMAC event is raised and the
|
||||
* connection MAY be terminated manually.
|
||||
*/
|
||||
ZRTP_EVENT_WRONG_MESSAGE_HMAC,
|
||||
|
||||
/**
|
||||
* \brief Retain secret was found in the cache but it doesn't match with the remote one
|
||||
*
|
||||
* The library rises this event when non-expired secret have been found in the cache but
|
||||
* value of the secret doesn't match with the remote side secret. Such situation may happen
|
||||
* in case of MiTM attack or when remote side lost it's cache.
|
||||
*
|
||||
* Recommended behavior: the application should notify user about the situation and ask him to
|
||||
* verify the SAS. If SAS is different - it indicates the attack.
|
||||
*/
|
||||
ZRTP_EVENT_MITM_WARNING
|
||||
} zrtp_security_event_t;
|
||||
|
||||
/**
|
||||
* \brief Callbacks definitions
|
||||
*
|
||||
* This section lists callback functions informing the user about the protocol status. These
|
||||
* callbacks must be defined in the user application.
|
||||
*/
|
||||
typedef struct zrtp_callback_event_t
|
||||
{
|
||||
/**
|
||||
* \brief ZRTP Protocol events notification.
|
||||
*
|
||||
* Informs about switching between the protocol states and other events. Provides more flexible
|
||||
* control over the protocol then on_zrtp_secure and on_zrtp_not_secure.
|
||||
*
|
||||
* \param event - type of event;
|
||||
* \param stream - ZRTP stream context.
|
||||
*/
|
||||
void (*on_zrtp_protocol_event)(zrtp_stream_t *stream, zrtp_protocol_event_t event);
|
||||
|
||||
/**
|
||||
* \brief ZRTP Security events notification
|
||||
*
|
||||
* Informs about ZRTP security events: MiTM attacks, cache desynchronization and
|
||||
* others.
|
||||
* \warning MUST be handled in the target application to provide high security level.
|
||||
*
|
||||
* \param event - type of event;
|
||||
* \param stream - ZRTP stream context.
|
||||
*/
|
||||
void (*on_zrtp_security_event)(zrtp_stream_t *stream, zrtp_security_event_t event);
|
||||
|
||||
/**
|
||||
* \brief Indicates switching to SECURE state.
|
||||
*
|
||||
* Pair of events: \c on_zrtp_secure and \c on_zrtp_not_secure represent simplified event
|
||||
* handling mechanism comparing to \c on_zrtp_protocol_event. libzrtp calls this event when the
|
||||
* call is SECURE and media is encrypted.
|
||||
*
|
||||
* SAS Verification is required on this event.
|
||||
*
|
||||
* \param stream - ZRTP stream context.
|
||||
*/
|
||||
void (*on_zrtp_secure)(zrtp_stream_t *stream);
|
||||
|
||||
/**
|
||||
* \brief Indicates switching to NOT SECURE state.
|
||||
*
|
||||
* This event duplicates some protocol and security events to simplify libzrtp usage. It may be
|
||||
* used in applications which don't require detail information about ZRTP protocol.
|
||||
*
|
||||
* If Error appeared - the exact error code can be found at zrtp_stream_info_t#last_error. Use
|
||||
* zrtp_log_error2str() to get error description in text mode.
|
||||
*
|
||||
* \param stream - ZRTP stream context.
|
||||
*/
|
||||
void (*on_zrtp_not_secure)(zrtp_stream_t *stream);
|
||||
} zrtp_callback_event_t;
|
||||
|
||||
/** \} */
|
||||
|
||||
/*======================================================================*/
|
||||
/* libzrtp interface: Misc */
|
||||
/*======================================================================*/
|
||||
|
||||
/**
|
||||
* \defgroup zrtp_iface_misc Miscellaneous functions
|
||||
* \ingroup zrtp_iface
|
||||
* \{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Miscellaneous Functions
|
||||
*/
|
||||
typedef struct zrtp_callback_misc_t
|
||||
{
|
||||
/**
|
||||
* \brief RTP packet sending function
|
||||
*
|
||||
* This function pushes an outgoing ZRTP packet to the network. Correct building of IP and UPD
|
||||
* headers is the developer's responsibility.
|
||||
*
|
||||
* \param stream - ZRTP stream context;
|
||||
* \param packet - buffer storing the ZRTP packet to send;
|
||||
* \param length - size of the ZRTP packet.
|
||||
* \return
|
||||
* - number of bytes sent if successful;
|
||||
* - -1 if error occurred.
|
||||
*/
|
||||
int (*on_send_packet)(const zrtp_stream_t* stream, char* packet, unsigned int length);
|
||||
} zrtp_callback_misc_t;
|
||||
|
||||
/** \} */
|
||||
|
||||
/**
|
||||
* \brief ZRTP feedback interface and application dependent routine
|
||||
* \ingroup zrtp_iface
|
||||
*/
|
||||
typedef struct zrtp_callback_t
|
||||
{
|
||||
/** \brief ZRTP Protocol Feedback */
|
||||
zrtp_callback_event_t event_cb;
|
||||
/** \brief ZRTP Delay Calls routine */
|
||||
zrtp_callback_scheduler_t sched_cb;
|
||||
/** \brief ZRTP Cache */
|
||||
zrtp_callback_cache_t cache_cb;
|
||||
/** \brief Miscellaneous functions */
|
||||
zrtp_callback_misc_t misc_cb;
|
||||
} zrtp_callback_t;
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /*__ZRTP_IFACE_H__*/
|
|
@ -1,169 +0,0 @@
|
|||
/*
|
||||
* libZRTP SDK library, implements the ZRTP secure VoIP protocol.
|
||||
* Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
* Contact: http://philzimmermann.com
|
||||
* For licensing and other legal details, see the file zrtp_legal.c.
|
||||
*
|
||||
* Viktor Krykun <v.krikun at zfoneproject.com>
|
||||
*/
|
||||
|
||||
#ifndef __ZRTP_IFACE_CACHE_H__
|
||||
#define __ZRTP_IFACE_CACHE_H__
|
||||
|
||||
#include "zrtp_config.h"
|
||||
#include "zrtp_base.h"
|
||||
#include "zrtp_string.h"
|
||||
#include "zrtp_error.h"
|
||||
#include "zrtp_iface.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#if defined(ZRTP_USE_BUILTIN_CACHE) && (ZRTP_USE_BUILTIN_CACHE == 1)
|
||||
|
||||
#define ZRTP_DEF_CACHE_VERSION_STR "libZRTP cache version="
|
||||
#define ZRTP_DEF_CACHE_VERSION_VAL "1.0"
|
||||
|
||||
/**
|
||||
* @brief Cache element identifier type
|
||||
* Elements of this type link cache data with a pair of ZIDs.
|
||||
* (constructed as: [ZID1][ZID2], where ZID1 - ZID with greater binary value)
|
||||
* This type is used to identify cache elements in the built-in implementation.
|
||||
*/
|
||||
typedef uint8_t zrtp_cache_id_t[24];
|
||||
|
||||
#define ZRTP_MITMCACHE_ELEM_LENGTH ( sizeof(zrtp_cache_id_t) + sizeof(zrtp_string64_t) )
|
||||
#define ZRTP_CACHE_ELEM_LENGTH ( sizeof(zrtp_cache_elem_t) - sizeof(mlist_t) - (sizeof(uint32_t)*2) )
|
||||
#define ZFONE_CACHE_NAME_LENGTH 256
|
||||
|
||||
/**
|
||||
* @brief Secret cache element structure
|
||||
* This structure is used to store cache data in the built-in implementation
|
||||
* of the caching system.
|
||||
*/
|
||||
typedef struct zrtp_cache_elem
|
||||
{
|
||||
zrtp_cache_id_t id; /** Cache element identifier */
|
||||
zrtp_string64_t curr_cache; /** Current cache value */
|
||||
zrtp_string64_t prev_cache; /** Prev cache value */
|
||||
uint32_t verified; /** Verified flag for the cache value */
|
||||
uint32_t lastused_at; /** Last usage time-stamp in seconds */
|
||||
uint32_t ttl; /** Cache TTL since lastused_at in seconds */
|
||||
uint32_t secure_since; /** Secure since date in seconds. Utility field. Don't required by libzrtp. */
|
||||
char name[ZFONE_CACHE_NAME_LENGTH]; /** name of the user associated with this cache entry */
|
||||
uint32_t name_length; /** cache name lengths */
|
||||
uint32_t presh_counter; /** number of Preshared streams made since last DH exchange */
|
||||
uint32_t _index; /** cache element index in the cache file */
|
||||
uint32_t _is_dirty; /** dirty flag means the entry has unsaved changes */
|
||||
mlist_t _mlist;
|
||||
} zrtp_cache_elem_t;
|
||||
|
||||
#endif /* ZRTP_USE_BUILTIN_CACHE */
|
||||
|
||||
zrtp_status_t zrtp_def_cache_init(zrtp_global_t* zrtp);
|
||||
|
||||
void zrtp_def_cache_down();
|
||||
|
||||
zrtp_status_t zrtp_def_cache_set_verified( const zrtp_stringn_t* one_zid,
|
||||
const zrtp_stringn_t* another_zid,
|
||||
uint32_t verified);
|
||||
|
||||
zrtp_status_t zrtp_def_cache_get_verified( const zrtp_stringn_t* one_zid,
|
||||
const zrtp_stringn_t* another_zid,
|
||||
uint32_t* verified);
|
||||
|
||||
|
||||
zrtp_status_t zrtp_def_cache_put( const zrtp_stringn_t* one_zid,
|
||||
const zrtp_stringn_t* another_zid,
|
||||
zrtp_shared_secret_t *rss);
|
||||
|
||||
zrtp_status_t zrtp_def_cache_put_mitm( const zrtp_stringn_t* one_zid,
|
||||
const zrtp_stringn_t* another_zid,
|
||||
zrtp_shared_secret_t *rss);
|
||||
|
||||
zrtp_status_t zrtp_def_cache_get( const zrtp_stringn_t* one_zid,
|
||||
const zrtp_stringn_t* another_zid,
|
||||
zrtp_shared_secret_t *rss,
|
||||
int prev_requested);
|
||||
|
||||
zrtp_status_t zrtp_def_cache_get_mitm( const zrtp_stringn_t* one_zid,
|
||||
const zrtp_stringn_t* another_zid,
|
||||
zrtp_shared_secret_t *rss);
|
||||
|
||||
zrtp_status_t zrtp_def_cache_set_presh_counter( const zrtp_stringn_t* one_zid,
|
||||
const zrtp_stringn_t* another_zid,
|
||||
uint32_t counter);
|
||||
|
||||
zrtp_status_t zrtp_def_cache_get_presh_counter( const zrtp_stringn_t* one_zid,
|
||||
const zrtp_stringn_t* another_zid,
|
||||
uint32_t* counter);
|
||||
|
||||
#if defined(ZRTP_USE_BUILTIN_CACHE) && (ZRTP_USE_BUILTIN_CACHE == 1)
|
||||
/**
|
||||
* @brief Cache iterator
|
||||
* zrtp_def_cache_foreach() calls this function for every cache entry.
|
||||
* @param elem - cache element;
|
||||
* @param is_mitm - is 1 when callback was called for MiTM for each.
|
||||
* @param del - callback may return 1 to this to remove cache entry from the list.
|
||||
* @param data - pointer to some user data from zrtp_def_cache_foreach();
|
||||
* @return
|
||||
* - 0 - if element was requested for reading only and wasn't changed;
|
||||
* - 1 - if element was modified and cache should be updated.
|
||||
*/
|
||||
typedef int (*zrtp_cache_callback_t)(zrtp_cache_elem_t* elem, int is_mitm, void* data, int* del);
|
||||
|
||||
/**
|
||||
* @brief Iterate over all cache entries.
|
||||
* Can be used for searching and modifying cache entries. Protected by mutex.
|
||||
* Can be called in parallel with other cache operations when protocol is
|
||||
* running.
|
||||
* @param global - libzrtp global context;
|
||||
* @param is_mitm - if value of this flag is 1 - fore_each will be applied for MiTM secrets;
|
||||
* @param callback - function to be called for every cache entry;
|
||||
* @param data - this pointer will be passed to every \c callback call.
|
||||
*/
|
||||
void zrtp_def_cache_foreach( zrtp_global_t *global,
|
||||
int is_mitm,
|
||||
zrtp_cache_callback_t callback,
|
||||
void *data);
|
||||
|
||||
#endif /* ZRTP_USE_BUILTIN_CACHE */
|
||||
|
||||
/**
|
||||
* @brief Store shared secrets cache to the persistent storage
|
||||
* May be used in server solutions for periodically flushing the cache to prevent data loss.
|
||||
*
|
||||
* @return
|
||||
* - zrtp_status_ok - if operation completed successfully;
|
||||
* - zrtp_status_wrong_state - if a call is performed from a routine which
|
||||
* doesn't use the default cache.
|
||||
*/
|
||||
zrtp_status_t zrtp_def_cache_store(zrtp_global_t *global);
|
||||
|
||||
zrtp_status_t zrtp_def_cache_reset_since( const zrtp_stringn_t* one_zid,
|
||||
const zrtp_stringn_t* another_zid);
|
||||
|
||||
zrtp_status_t zrtp_def_cache_get_since( const zrtp_stringn_t* one_zid,
|
||||
const zrtp_stringn_t* another_zid,
|
||||
uint32_t* since);
|
||||
|
||||
zrtp_status_t zrtp_def_cache_get_name( const zrtp_stringn_t* one_zid,
|
||||
const zrtp_stringn_t* another_zid,
|
||||
zrtp_stringn_t* name);
|
||||
|
||||
zrtp_status_t zrtp_def_cache_put_name( const zrtp_stringn_t* one_zid,
|
||||
const zrtp_stringn_t* another_zid,
|
||||
const zrtp_stringn_t* name);
|
||||
|
||||
#if defined(ZRTP_USE_BUILTIN_CACHE) && (ZRTP_USE_BUILTIN_CACHE == 1)
|
||||
zrtp_cache_elem_t* zrtp_def_cache_get2(const zrtp_cache_id_t id, int is_mitm);
|
||||
#endif /* ZRTP_USE_BUILTIN_CACHE */
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /*__ZRTP_IFACE_CACHE_H__*/
|
||||
|
|
@ -1,89 +0,0 @@
|
|||
/*
|
||||
* libZRTP SDK library, implements the ZRTP secure VoIP protocol.
|
||||
* Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
* Contact: http://philzimmermann.com
|
||||
* For licensing and other legal details, see the file zrtp_legal.c.
|
||||
*
|
||||
* Viktor Krykun <v.krikun at zfoneproject.com>
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __ZRTP_IFACE_SCHEDULER_H__
|
||||
#define __ZRTP_IFACE_SCHEDULER_H__
|
||||
|
||||
#include "zrtp_config.h"
|
||||
#include "zrtp_base.h"
|
||||
#include "zrtp_string.h"
|
||||
#include "zrtp_error.h"
|
||||
#include "zrtp_iface.h"
|
||||
|
||||
#if defined(ZRTP_USE_BUILTIN_SCEHDULER) && (ZRTP_USE_BUILTIN_SCEHDULER == 1)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* In order to use default secheduler libzrtp one should define tow extra interfaces:
|
||||
* sleep and threads riutine.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Suspend thread execution for an interval measured in miliseconds
|
||||
* \param msec - number of miliseconds
|
||||
* \return: 0 if successful and -1 in case of errors.
|
||||
*/
|
||||
|
||||
#if ZRTP_PLATFORM != ZP_WIN32_KERNEL
|
||||
|
||||
#if (ZRTP_PLATFORM == ZP_WIN32) || (ZRTP_PLATFORM == ZP_WINCE)
|
||||
#include <windows.h>
|
||||
typedef LPTHREAD_START_ROUTINE zrtp_thread_routine_t;
|
||||
#elif (ZRTP_PLATFORM == ZP_LINUX) || (ZRTP_PLATFORM == ZP_DARWIN) || (ZRTP_PLATFORM == ZP_BSD) || (ZRTP_PLATFORM == ZP_ANDROID)
|
||||
typedef void *(*zrtp_thread_routine_t)(void*);
|
||||
#elif (ZRTP_PLATFORM == ZP_SYMBIAN)
|
||||
typedef int(*zrtp_thread_routine_t)(void*);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Function is used to create a new thread, within a process.
|
||||
*
|
||||
* Thread should be created with default attributes. Upon its creation, the thread executes
|
||||
* \c start_routine, with \c arg as its sole argument.
|
||||
* \param start_routine - thread start routine.
|
||||
* \param arg - start routine arguments.
|
||||
* \return 0 if successful and -1 in case of errors.
|
||||
*/
|
||||
|
||||
|
||||
extern int zrtp_thread_create(zrtp_thread_routine_t start_routine, void *arg);
|
||||
extern int zrtp_sleep(unsigned int msec);
|
||||
|
||||
#endif
|
||||
|
||||
void zrtp_def_scheduler_down();
|
||||
|
||||
zrtp_status_t zrtp_def_scheduler_init(zrtp_global_t* zrtp);
|
||||
|
||||
void zrtp_def_scheduler_call_later(zrtp_stream_t *ctx, zrtp_retry_task_t* ztask);
|
||||
|
||||
void zrtp_def_scheduler_cancel_call_later(zrtp_stream_t* ctx, zrtp_retry_task_t* ztask);
|
||||
|
||||
void zrtp_def_scheduler_wait_call_later(zrtp_stream_t* ctx);
|
||||
|
||||
|
||||
zrtp_status_t zrtp_sem_init(zrtp_sem_t** sem, uint32_t value, uint32_t limit);
|
||||
zrtp_status_t zrtp_sem_destroy(zrtp_sem_t* sem);
|
||||
zrtp_status_t zrtp_sem_wait(zrtp_sem_t* sem);
|
||||
zrtp_status_t zrtp_sem_trtwait(zrtp_sem_t* sem);
|
||||
zrtp_status_t zrtp_sem_post(zrtp_sem_t* sem);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* ZRTP_USE_BUILTIN_SCEHDULER */
|
||||
|
||||
#endif /*__ZRTP_IFACE_SCHEDULER_H__*/
|
|
@ -1,183 +0,0 @@
|
|||
/*
|
||||
* libZRTP SDK library, implements the ZRTP secure VoIP protocol.
|
||||
* Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
* Contact: http://philzimmermann.com
|
||||
* For licensing and other legal details, see the file zrtp_legal.c.
|
||||
*
|
||||
* Viktor Krykun <v.krikun at zfoneproject.com>
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* \file zrtp_iface_system.h
|
||||
* \brief libzrtp platform-dependent routine
|
||||
*/
|
||||
|
||||
#ifndef __ZRTP_IFACE_SYSTEM_H__
|
||||
#define __ZRTP_IFACE_SYSTEM_H__
|
||||
|
||||
#include "zrtp_config.h"
|
||||
#include "zrtp_types.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
|
||||
/*============================================================================*/
|
||||
/* System wide functions */
|
||||
/*============================================================================*/
|
||||
|
||||
/**
|
||||
* \defgroup zrtp_iface Library Interfaces Overview
|
||||
*
|
||||
* This section describes the requirements for the implementation of each interface function.
|
||||
* Descriptions are divided into groups by function
|
||||
*/
|
||||
|
||||
/**
|
||||
* \defgroup zrtp_iface_base Basic platform-dependent routine
|
||||
* \ingroup zrtp_iface
|
||||
* \{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Time in miliseconds
|
||||
*
|
||||
* libzrtp uses a unix-like time calculation scheme: time since 1/1/1970.
|
||||
*/
|
||||
typedef uint64_t zrtp_time_t;
|
||||
|
||||
|
||||
/**
|
||||
* \brief Allocates memory of a defined size
|
||||
*
|
||||
* Allocates \c size bytes and returns a pointer to the allocated memory Allocated memory is not
|
||||
* cleared.
|
||||
*
|
||||
* \param size - number of bytes for allocation
|
||||
* \return
|
||||
* - pointer to the allocated memory if successful.
|
||||
* - NULL if the memory allocation failed.
|
||||
*/
|
||||
extern void* zrtp_sys_alloc(unsigned int size);
|
||||
|
||||
/**
|
||||
* \brief release memory
|
||||
*
|
||||
* Release the memory space pointed to by \c obj, which was returned by a previous zrtp_sys_alloc()
|
||||
* call. If \c obj is NULL, no operation is performed.
|
||||
*
|
||||
* \param obj - pointer to the released memory
|
||||
*/
|
||||
extern void zrtp_sys_free(void* obj);
|
||||
|
||||
/**
|
||||
* \brief Memory copying function.
|
||||
*
|
||||
* This function copies \c length bytes from memory area \c src to memory area \c dest. The memory
|
||||
* areas should not overlap.
|
||||
*
|
||||
* \param dest - pointer to the destination buffer
|
||||
* \param src - pointer to the source buffer;
|
||||
* \param length - number of bytes to be copied.
|
||||
* \return
|
||||
* - pointer to the destination buffer (dest)
|
||||
*/
|
||||
extern void* zrtp_memcpy(void* dest, const void* src, unsigned int length);
|
||||
|
||||
/**
|
||||
* \brief Write a byte to a byte string
|
||||
*
|
||||
* The zrtp_memset() function writes \c n bytes of value \c c (converted to an unsigned char) to the
|
||||
* string \c s.
|
||||
* \return
|
||||
* - first argument
|
||||
*/
|
||||
extern void *zrtp_memset(void *s, int c, unsigned int n);
|
||||
|
||||
/**
|
||||
* \brief Returns current date and time
|
||||
*
|
||||
* This function should return current unix-like date and time: number of microseconds since
|
||||
* 1.1.1970.
|
||||
*/
|
||||
extern zrtp_time_t zrtp_time_now();
|
||||
|
||||
/** \} */
|
||||
|
||||
/*============================================================================*/
|
||||
/* Mutex related interfaces */
|
||||
/*============================================================================*/
|
||||
|
||||
/**
|
||||
* \defgroup zrtp_iface_mutex Synchronization related functions
|
||||
* \ingroup zrtp_iface
|
||||
* \{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Initializing the mutex structure
|
||||
*
|
||||
* This function allocates and initializes the mutex referenced by \c mutex with default attributes.
|
||||
* Upon successful initialization, the state of the mutex becomes initialized and unlocked. This
|
||||
* function should create a NON RECURSIVE mutex. (Attempting to relock the mutex causes deadlock)
|
||||
*
|
||||
* \param mutex - out parameter, mutex structure for allocation and initialization
|
||||
* \return:
|
||||
* - zrtp_status_ok if initialization successful;
|
||||
* - zrtp_status_fail if an error occurred.
|
||||
* \sa zrtp_mutex_destroy()
|
||||
*/
|
||||
extern zrtp_status_t zrtp_mutex_init(zrtp_mutex_t** mutex);
|
||||
|
||||
/**
|
||||
* \brief Deinitializing the mutex structure
|
||||
*
|
||||
* This function destroys the mutex object previously allocated by zrtp_mutex_init().
|
||||
*
|
||||
* \param mutex - mutex structure for deinitialization.
|
||||
* \return:
|
||||
* - zrtp_status_ok if deinitialization successful;
|
||||
* - zrtp_status_fail if an error occurred.
|
||||
* \sa zrtp_mutex_init()
|
||||
*/
|
||||
extern zrtp_status_t zrtp_mutex_destroy(zrtp_mutex_t* mutex);
|
||||
|
||||
/**
|
||||
* \brief Mutex locking
|
||||
*
|
||||
* This function locks the mutex object referenced by \c mutex. If the mutex is already locked, the
|
||||
* thread that called it is blocked until the mutex becomes available. This operation returns the
|
||||
* mutex object referenced by the mutex in the locked state with the calling thread as its owner.
|
||||
*
|
||||
* \param mutex - mutex for locking;
|
||||
* \return:
|
||||
* - zrtp_status_ok if successful;
|
||||
* - zrtp_status_fail if an error occurred.
|
||||
*/
|
||||
extern zrtp_status_t zrtp_mutex_lock(zrtp_mutex_t* mutex);
|
||||
|
||||
/**
|
||||
* \brief Mutex releasing
|
||||
*
|
||||
* This function releases the mutex object referenced by mutex. The way a mutex is released depends
|
||||
* on the mutex's type attribute. If there are threads blocked on the mutex object referenced by
|
||||
* mutex when zrtp_mutex_unlock() is called and the mutex becomes available, the scheduling policy
|
||||
* determines which thread acquires the mutex.
|
||||
*
|
||||
* \param mutex - mutex to release
|
||||
* \return:
|
||||
* - zrtp_status_ok if successful;
|
||||
* - zrtp_status_fail if an error occurred.
|
||||
*/
|
||||
extern zrtp_status_t zrtp_mutex_unlock(zrtp_mutex_t* mutex);
|
||||
|
||||
/*! \} */
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ZRTP_IFACE_SYSTEM_H__ */
|
|
@ -1,25 +0,0 @@
|
|||
/*
|
||||
* libZRTP SDK library, implements the ZRTP secure VoIP protocol.
|
||||
* Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
* Contact: http://philzimmermann.com
|
||||
* For licensing and other legal details, see the file zrtp_legal.c.
|
||||
*
|
||||
* Viktor Krykun <v.krikun at zfoneproject.com>
|
||||
*/
|
||||
|
||||
#ifndef __ZRTP_LEGAL_H__
|
||||
#define __ZRTP_LEGAL_H__
|
||||
|
||||
|
||||
/*
|
||||
* We want the copyright string accessable to the unix strings command in
|
||||
* the linked binary, and don't want the linker to remove it if it's not
|
||||
* referenced, thus the volatile qualifier.
|
||||
*
|
||||
* ANSI C standard, section 3.5.3: "An object that has volatile-qualified
|
||||
* type may be modified in ways unknown to the implementation or have
|
||||
* other unknown side effects."
|
||||
*/
|
||||
extern volatile const char zrtpCopyright[];
|
||||
|
||||
#endif /*__ZRTP_LEGAL_H__ */
|
|
@ -1,66 +0,0 @@
|
|||
/*
|
||||
* libZRTP SDK library, implements the ZRTP secure VoIP protocol.
|
||||
* Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
* Contact: http://philzimmermann.com
|
||||
* For licensing and other legal details, see the file zrtp_legal.c.
|
||||
*
|
||||
* Viktor Krykun <v.krikun at zfoneproject.com>
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __ZRTP_LIST_H__
|
||||
#define __ZRTP_LIST_H__
|
||||
|
||||
#include "zrtp_config.h"
|
||||
|
||||
typedef struct mlist mlist_t;
|
||||
struct mlist
|
||||
{
|
||||
mlist_t *next;
|
||||
mlist_t *prev;
|
||||
};
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/*
|
||||
* \warning
|
||||
* We cast pointer to integer. There is bad thing for 64 bit platforms but
|
||||
* calculated offset couldn't be bigger then 2x32 and it will be casted
|
||||
* to integer correctly.
|
||||
*/
|
||||
#define mlist_list_offset(type, list_name) ((size_t)&(((type*)0)->list_name))
|
||||
|
||||
#define mlist_get_struct(type, list_name, list_ptr) \
|
||||
((type*)(((char*)(list_ptr)) - mlist_list_offset(type,list_name)))
|
||||
|
||||
#define mlist_for_each(pos, head) \
|
||||
for (pos = (head)->next; pos != (head); pos = pos->next)
|
||||
|
||||
#define mlist_for_each_safe(pos, n, head) \
|
||||
for (pos = (head)->next, n = pos->next; pos != (head); \
|
||||
pos = n, n = pos->next)
|
||||
|
||||
void init_mlist(mlist_t* head);
|
||||
|
||||
void mlist_add(mlist_t* head, mlist_t* node);
|
||||
void mlist_add_tail(mlist_t *head, mlist_t *node);
|
||||
|
||||
void mlist_insert(mlist_t *prev, mlist_t *node);
|
||||
|
||||
void mlist_del(mlist_t *node);
|
||||
void mlist_del_tail(mlist_t *node);
|
||||
|
||||
mlist_t* mlist_get(mlist_t *head);
|
||||
mlist_t* mlist_get_tail(mlist_t *head);
|
||||
|
||||
int mlist_isempty(mlist_t *head);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /*__ZRTP_LIST_H__ */
|
|
@ -1,169 +0,0 @@
|
|||
/*
|
||||
* libZRTP SDK library, implements the ZRTP secure VoIP protocol.
|
||||
* Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
* Contact: http://philzimmermann.com
|
||||
* For licensing and other legal details, see the file zrtp_legal.c.
|
||||
*
|
||||
* Viktor Krykun <v.krikun at zfoneproject.com>
|
||||
*/
|
||||
|
||||
#ifndef __ZRTP_LOG_H__
|
||||
#define __ZRTP_LOG_H__
|
||||
|
||||
#include "zrtp_config.h"
|
||||
#include "zrtp_types.h"
|
||||
#include "zrtp_base.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define ZRTP_LOG_SENDER_MAX_LEN 12
|
||||
#define ZRTP_LOG_BUFFER_SIZE 512
|
||||
|
||||
|
||||
/*!
|
||||
* \defgroup iface_log Functions for debug and information logging
|
||||
* \ingroup interfaces
|
||||
* \{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Write log message.
|
||||
* This is the main macro used to write text to the logging backend.
|
||||
* @param level The logging verbosity level. Lower number indicates higher
|
||||
* importance, with level zero indicates fatal error. Only
|
||||
* numeral argument is permitted (e.g. not variable).
|
||||
* @param arg Enclosed 'printf' like arguments, with the first
|
||||
* argument is the sender, the second argument is format
|
||||
* string and the following arguments are variable number of
|
||||
* arguments suitable for the format string.
|
||||
*
|
||||
* Sample:
|
||||
* @code
|
||||
* ZRTP_LOG(2, (__UNITE__, "Some log message with id %d", id));
|
||||
* @endcode
|
||||
*/
|
||||
|
||||
#define ZRTP_LOG(level,arg) do { \
|
||||
zrtp_log_wrapper_##level(arg); \
|
||||
} while (0)
|
||||
|
||||
#define ZRTP_LOGC(level,arg) do { \
|
||||
zrtp_log_wrapperc_##level(arg); \
|
||||
} while (0)
|
||||
|
||||
|
||||
/**
|
||||
* @brief Signature for function to be registered to the logging subsystem to
|
||||
* write the actual log message to some output device.
|
||||
*
|
||||
* @param level Log level.
|
||||
* @param data Log message, which will be NULL terminated.
|
||||
* @param len Message length. (prefix + text)
|
||||
* @param offset Log message prefix length
|
||||
*/
|
||||
typedef void zrtp_log_engine(int level, char *data, int len, int offset);
|
||||
|
||||
|
||||
#if ZRTP_LOG_MAX_LEVEL >= 1
|
||||
|
||||
/**
|
||||
* @brief Changes default log writer function.
|
||||
* This function may be used to implement log writer in a way native for target
|
||||
* OS or product. By default libzrtp uses console output.
|
||||
* @param engine - log writer.
|
||||
*/
|
||||
void zrtp_log_set_log_engine(zrtp_log_engine *engine);
|
||||
|
||||
/**
|
||||
* @brief Changes Log-Level in run-time mode
|
||||
* Libzrtp uses 3 log levels:
|
||||
* - 1 - system related errors;
|
||||
* - 2 - security, ZRTP protocol related errors and warnings;
|
||||
* - 3 - debug logging.
|
||||
* By default, libzrtp uses debug logging - level 3.
|
||||
* @param level - log level.
|
||||
*/
|
||||
void zrtp_log_set_level(uint32_t level);
|
||||
|
||||
/* \} */
|
||||
|
||||
#else /* If logger is enabled */
|
||||
|
||||
# define zrtp_log_set_log_engine(engine)
|
||||
# define zrtp_log_set_level(level)
|
||||
|
||||
#endif /* If logger is enabled */
|
||||
|
||||
|
||||
#if ZRTP_LOG_MAX_LEVEL >= 1
|
||||
# define zrtp_log_wrapper_1(arg) zrtp_log_1 arg
|
||||
void zrtp_log_1(const char *src, const char *format, ...);
|
||||
# define zrtp_log_wrapperc_1(arg) zrtp_logc_1 arg
|
||||
void zrtp_logc_1(const char *format, ...);
|
||||
#else
|
||||
# define zrtp_log_wrapper_1(arg)
|
||||
# define zrtp_log_wrapperc_1(arg)
|
||||
#endif
|
||||
|
||||
#if ZRTP_LOG_MAX_LEVEL >= 2
|
||||
# define zrtp_log_wrapper_2(arg) zrtp_log_2 arg
|
||||
void zrtp_log_2(const char *src, const char *format, ...);
|
||||
# define zrtp_log_wrapperc_2(arg) zrtp_logc_2 arg
|
||||
void zrtp_logc_2(const char *format, ...);
|
||||
#else
|
||||
#define zrtp_log_wrapper_2(arg)
|
||||
#define zrtp_log_wrapperc_2(arg)
|
||||
#endif
|
||||
|
||||
#if ZRTP_LOG_MAX_LEVEL >= 3
|
||||
# define zrtp_log_wrapper_3(arg) zrtp_log_3 arg
|
||||
void zrtp_log_3(const char *src, const char *format, ...);
|
||||
# define zrtp_log_wrapperc_3(arg) zrtp_logc_3 arg
|
||||
void zrtp_logc_3(const char *format, ...);
|
||||
|
||||
#else
|
||||
# define zrtp_log_wrapper_3(arg)
|
||||
# define zrtp_log_wrapperc_3(arg)
|
||||
#endif
|
||||
|
||||
const char* zrtp_log_error2str(zrtp_protocol_error_t error);
|
||||
const char* zrtp_log_status2str(zrtp_status_t error);
|
||||
|
||||
/** Returns symbolical name of ZRTP protocol state for the current stream. */
|
||||
const char* zrtp_log_state2str(zrtp_state_t state);
|
||||
|
||||
/** Returns symbolical name of ZXRTP protocol packet by it's code. */
|
||||
const char* zrtp_log_pkt2str(zrtp_msg_type_t type);
|
||||
|
||||
/** Returns symbolical name of the PK Exchange mode for the current stream. */
|
||||
const char* zrtp_log_mode2str(zrtp_stream_mode_t mode);
|
||||
|
||||
/** Returns symbolical name of the protocol and security events. */
|
||||
const char* zrtp_log_event2str(uint8_t event);
|
||||
|
||||
/**
|
||||
* Returns character name of the Signaling role.
|
||||
*
|
||||
* @param role One of zrtp_signaling_role_t values.
|
||||
* @return character name of the \c role.
|
||||
*/
|
||||
const char* zrtp_log_sign_role2str(unsigned role);
|
||||
|
||||
|
||||
/** Print out ZRTP environment configuration setting to log level 3. */
|
||||
void zrtp_print_env_settings();
|
||||
|
||||
/** Print out ZRTP stream info strxucture. (use ZRTP log-level 3). */
|
||||
void zrtp_log_print_streaminfo(zrtp_stream_info_t* info);
|
||||
|
||||
/** Print out ZRTP session info structure. (use ZRTP log-level 3). */
|
||||
void zrtp_log_print_sessioninfo(zrtp_session_info_t* info);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* __ZRTP_LOG_H__ */
|
|
@ -1,152 +0,0 @@
|
|||
/*
|
||||
* libZRTP SDK library, implements the ZRTP secure VoIP protocol.
|
||||
* Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
* Contact: http://philzimmermann.com
|
||||
* For licensing and other legal details, see the file zrtp_legal.c.
|
||||
*
|
||||
* Viktor Krykun <v.krikun at zfoneproject.com>
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* \file zrtp_pbx.h
|
||||
* \brief Defines basic Functions to work with MiTM endpoints
|
||||
*/
|
||||
|
||||
#ifndef __ZRTP_PBX_H__
|
||||
#define __ZRTP_PBX_H__
|
||||
|
||||
#include "zrtp_config.h"
|
||||
#include "zrtp_types.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \defgroup zrtp_api_mitm PBX related functions and data types
|
||||
* \ingroup zrtp_api
|
||||
*
|
||||
* In this section the basic functions for using the library in MiTM mode
|
||||
* environment. Asterisk PBX, for example.
|
||||
* \{
|
||||
*/
|
||||
|
||||
/**
|
||||
* \brief Start ZRTP enrollment ritual on Server side
|
||||
*
|
||||
* This is the equivalent of zrtp_stream_start() but for MiTM endpoints. By calling
|
||||
* zrtp_stream_registration_start() libzrtp prepares to engage in the enrollment ritual: send
|
||||
* special flag in Confirm packet and prepare for generating the MiTM secret.
|
||||
* \return
|
||||
* - zrtp_status_ok - if operation started successfully;
|
||||
* - one of zrtp_status_t errorrs in other case.
|
||||
* \sa zrtp_callback_event_t#on_zrtp_protocol_event
|
||||
* \sa zrtp_event_t (PBX related definitions)
|
||||
*/
|
||||
zrtp_status_t zrtp_stream_registration_start(zrtp_stream_t* stream, uint32_t ssrc);
|
||||
|
||||
/**
|
||||
* \brief Continue ZRTP enrollment ritual (from CLEAR state) on Server side.
|
||||
*
|
||||
* This is equivalent to zrtp_stream_secure() but with enrollment ritual. Use this function instead
|
||||
* of zrtp_stream_registration_start() in case when "autosecure" option is disabled for some reason.
|
||||
* \return
|
||||
* - zrtp_status_ok - if operation started successfully;
|
||||
* - one of zrtp_status_t errorrs in other case.
|
||||
*/
|
||||
zrtp_status_t zrtp_stream_registration_secure(zrtp_stream_t* stream);
|
||||
|
||||
/**
|
||||
* \brief Confirms enrollment ritual on Client side
|
||||
*
|
||||
* Invocation of this function by event zrtp_protocol_event_t#ZRTP_EVENT_IS_CLIENT_ENROLLMENT
|
||||
* confirms enrollment process; libzrtp generates special secret which will be used to "Sign" all
|
||||
* further calls with the trusted MiTM.
|
||||
* \return
|
||||
* - zrtp_status_ok - in case when enrollment was completed successfully;
|
||||
* - zrtp_status_fail - in case of error: wrong protocol state or system error.
|
||||
*/
|
||||
zrtp_status_t zrtp_register_with_trusted_mitm(zrtp_stream_t* stream);
|
||||
|
||||
/**
|
||||
* \brief Automatically handle ZRTP call in PBX environment
|
||||
*
|
||||
* This function may be called to handle ZRTP call between two ZRTP endpoints through PBX. As
|
||||
* described in ID sec 8.3., there are several problems with ZRTP in PBX environment.
|
||||
* zrtp_resolve_mitm_call() implements several steps to resolve such problems:
|
||||
* - detect enrolled and non enrolled endpoint. If both sides are enrolled - one side for the SAS
|
||||
* transfer will be chousen automatically;
|
||||
* - start SAS transfer with the enrolled endpoint;
|
||||
* - update flags and SAS rendering scheme if necessary.
|
||||
* In other words: After switching to SECURE state, this is the one function which ZRTP MiTM
|
||||
* endpoint should call to handle ZRTP call correctly. If you want to have more flexability in MiTM
|
||||
* mode - resolve ambiguity manually using functions listed below.
|
||||
* \param stream1 - one party of ZRTP call (must be in secure state already);
|
||||
* \param stream2 - other party of ZRTP call (must be in secure state already).
|
||||
* \return
|
||||
* - zrtp_status_ok - if operation started successfully;
|
||||
* - one of zrtp_status_t errors in other case.
|
||||
* \ref XXX_DRAFT, XXX_GUIDE
|
||||
*/
|
||||
zrtp_status_t zrtp_resolve_mitm_call(zrtp_stream_t* stream1, zrtp_stream_t* stream2);
|
||||
|
||||
/**
|
||||
* @brief Links two lags of Trusted ZRTP MiTM call together.
|
||||
*
|
||||
* This function allows libzrtp2 to optimize protocol behavior of one leg depending on the state and
|
||||
* parameters of the other lag. MitM boxes should use this API whenever possible.
|
||||
*
|
||||
* @param stream1 - one leg of the trusted MiTM call;
|
||||
* @param stream2 - another leg of the trusted MiTM call.
|
||||
*
|
||||
* @return zrtp_status_ok in case of success.
|
||||
*/
|
||||
zrtp_status_t zrtp_link_mitm_calls(zrtp_stream_t* stream1, zrtp_stream_t* stream2);
|
||||
|
||||
/**
|
||||
* \brief Updates remote-side SAS value and rendering scheme
|
||||
*
|
||||
* zrtp_update_remote_sas() initiates process of "SAS transferring" between trusted MiTM and user.
|
||||
* It allows to change as SAS rendering scheme as a SAS value and related flags as well. It the MiTM
|
||||
* needs to update just one of the parameters - the other one should be set to NULL. libzrtp informs
|
||||
* about status of the SAS updating through zrtp_protocol_event_t::ZRTP_EVENT_REMOTE_SAS_UPDATED.
|
||||
* Call this function in SECURE state only.
|
||||
* \param stream - zrtp endpoint stream to update;
|
||||
* \param transf_sas_scheme - chosen SAS rendering scheme;
|
||||
* \param transf_sas_value - relaying SAS value (full sas hash);
|
||||
* \param transf_ac_flag - relaying "allowclear" flag;
|
||||
* \param transf_d_flag - relaying "disclose" flag.
|
||||
* \return
|
||||
* - zrtp_status_ok - if operation started successfully;
|
||||
* - one of zrtp_status_t errors in other case.
|
||||
*/
|
||||
zrtp_status_t zrtp_update_remote_options( zrtp_stream_t* stream,
|
||||
zrtp_sas_id_t transf_sas_scheme,
|
||||
zrtp_string32_t* transf_sas_value,
|
||||
uint8_t transf_ac_flag,
|
||||
uint8_t transf_d_flag );
|
||||
|
||||
/**
|
||||
* \brief Check if user at the end of the stream \c stream is enrolled
|
||||
* \param stream - stream for examining.
|
||||
* \return: 1 if user is enrolled and 0 in other case
|
||||
*/
|
||||
uint8_t zrtp_is_user_enrolled(zrtp_stream_t* stream);
|
||||
|
||||
/**
|
||||
* \brief Choose single enrolled stream from two enrolled
|
||||
*
|
||||
* This function may be used to resolve ambiguity with call transferring between two enrolled users.
|
||||
* \return stream which shuld be used for SAS transferring
|
||||
*/
|
||||
zrtp_stream_t* zrtp_choose_one_enrolled(zrtp_stream_t* stream1, zrtp_stream_t* stream2);
|
||||
|
||||
/* \} */
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,495 +0,0 @@
|
|||
/*
|
||||
* libZRTP SDK library, implements the ZRTP secure VoIP protocol.
|
||||
* Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
* Contact: http://philzimmermann.com
|
||||
* For licensing and other legal details, see the file zrtp_legal.c.
|
||||
*
|
||||
* Viktor Krykun <v.krikun at zfoneproject.com>
|
||||
*/
|
||||
|
||||
#ifndef __ZRTP_PROTOCOL_H__
|
||||
#define __ZRTP_PROTOCOL_H__
|
||||
|
||||
#include "zrtp_config.h"
|
||||
#include "zrtp_types.h"
|
||||
#include "zrtp_error.h"
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning(disable:4214)
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* \defgroup dev_protocol Protocol related data types and definitions
|
||||
* \ingroup zrtp_dev
|
||||
* \{
|
||||
*/
|
||||
|
||||
/*! ZRTP Protocol version, retransmitted in HELLO packets */
|
||||
#define ZRTP_PROTOCOL_VERSION "1.10"
|
||||
#define ZRTP_PROTOCOL_VERSION_VALUE 110
|
||||
|
||||
#define ZRTP_ZFONE_PROTOCOL_VERSION "0.10"
|
||||
#define ZRTP_ZFONE_PROTOCOL_VERSION_VALUE 10
|
||||
|
||||
/*
|
||||
* Protocol constants and definitions. All these values are defined by the ZRTP
|
||||
* specification <A HREF="http://zfoneproject.com/zrtp_ietf.html">"ZRTP Internet Draft"</A>.
|
||||
* Don't change them!
|
||||
*/
|
||||
#define ZRTP_S384 "S384"
|
||||
#define ZRTP_S256 "S256"
|
||||
#define ZRTP_S160 "S160"
|
||||
#define ZRTP_AES1 "AES1"
|
||||
#define ZRTP_AES3 "AES3"
|
||||
#define ZRTP_HS32 "HS32"
|
||||
#define ZRTP_HS80 "HS80"
|
||||
#define ZRTP_DH2K "DH2k"
|
||||
#define ZRTP_DH3K "DH3k"
|
||||
#define ZRTP_EC256P "EC25"
|
||||
#define ZRTP_EC384P "EC38"
|
||||
#define ZRTP_EC521P "EC52"
|
||||
#define ZRTP_MULT "Mult"
|
||||
#define ZRTP_PRESHARED "Prsh"
|
||||
#define ZRTP_B32 "B32 "
|
||||
#define ZRTP_B256 "B256"
|
||||
|
||||
#define ZRTP_ROLE_INITIATOR "Initiator"
|
||||
#define ZRTP_ROLE_RESPONDER "Responder"
|
||||
#define ZRTP_INITIATOR_HMAKKEY_STR "Initiator HMAC key"
|
||||
#define ZRTP_RESPONDER_HMAKKEY_STR "Responder HMAC key"
|
||||
#define ZRTP_GOCLEAR_STR "GoClear"
|
||||
#define ZRTP_INITIATOR_KEY_STR "Initiator SRTP master key"
|
||||
#define ZRTP_INITIATOR_SALT_STR "Initiator SRTP master salt"
|
||||
#define ZRTP_RESPONDER_KEY_STR "Responder SRTP master key"
|
||||
#define ZRTP_RESPONDER_SALT_STR "Responder SRTP master salt"
|
||||
#define ZRTP_SKEY_STR "ZRTP Session Key"
|
||||
#define ZRTP_SAS_STR "SAS"
|
||||
#define ZRTP_RS_STR "retained secret"
|
||||
#define ZRTP_INITIATOR_ZRTPKEY_STR "Initiator ZRTP key"
|
||||
#define ZRTP_RESPONDER_ZRTPKEY_STR "Responder ZRTP key"
|
||||
#define ZRTP_CLEAR_HMAC_STR "GoClear"
|
||||
#define ZRTP_KDF_STR "ZRTP-HMAC-KDF"
|
||||
#define ZRTP_SESS_STR "ZRTP Session Key"
|
||||
#define ZRTP_MULTI_STR "ZRTP MSK"
|
||||
#define ZRTP_PRESH_STR "ZRTP PSK"
|
||||
#define ZRTP_TRUSTMITMKEY_STR "Trusted MiTM key"
|
||||
#define ZRTP_COMMIT_HV_KEY_STR "Prsh"
|
||||
|
||||
#define ZRTP_CACHE_DEFAULT_TTL (30*24*60*60)
|
||||
|
||||
/** ZRTP Message magic Cookie */
|
||||
#define ZRTP_PACKETS_MAGIC 0x5a525450L
|
||||
/** Defines ZRTP extension type for RTP protocol */
|
||||
#define ZRTP_MESSAGE_MAGIC 0x505a
|
||||
|
||||
|
||||
/**
|
||||
* @brief Retransmission timer T1 in milliseconds
|
||||
* T1 is used for the retransmission of Hello messages. The HELLO timeout is
|
||||
* doubled each time a resend occurs. The gain (max timeout value) is limited
|
||||
* by @ref ZRTP_T1_CAPPING. After reaching \c ZRTP_T1_CAPPING, the state machine
|
||||
* keeps resending HELLO packets until the resend count is less than \ref
|
||||
* ZRTP_T1_MAX_COUNT
|
||||
* @sa ZRTP_T1_MAX_COUNT ZRTP_T1_CAPPING
|
||||
*/
|
||||
|
||||
#define ZRTP_T1 50
|
||||
|
||||
/*!
|
||||
* \brief Max resends count value for T1 timer
|
||||
* This is the threshold value for HELLO replays. See \ref ZRTP_T1 ZRTP_T1 for
|
||||
* details. If the resend count exceeds the value of ZRTP_T1_MAX_COUNT then
|
||||
* the state machine calls _zrtp_machine_enter_initiatingerror() with error code \ref
|
||||
* zrtp_protocol_error_t#zrtp_error_timeout and ZRTP session establishment is
|
||||
* failed.
|
||||
*/
|
||||
#define ZRTP_T1_MAX_COUNT 20
|
||||
|
||||
/*!
|
||||
* \brief Max resends count value for T1 timer for cases when local side have
|
||||
* received remote Hello. Libzrtp uses this extended number of retries when there
|
||||
* is an evidence, that remote side supports ZRTP protocol (remote Hello received).
|
||||
* This approach allows to eliminate problem when ZRTP state-machine switches to
|
||||
* NO_ZRTP state while remote side is computing his initial DH value. (especially
|
||||
* important for slow devices)
|
||||
*/
|
||||
#define ZRTP_T1_MAX_COUNT_EXT 60
|
||||
|
||||
/*! Hello retries counter for ZRTP_EVENT_NO_ZRTP_QUICK event */
|
||||
#define ZRTP_NO_ZRTP_FAST_COUNT 5
|
||||
|
||||
/*!
|
||||
* \brief Max T1 timeout
|
||||
* ZRTP_T1_MAX_COUNT is the threshold for the growth of the timeout value of
|
||||
* HELLO resends. See \ref ZRTP_T1 for details.
|
||||
*/
|
||||
#define ZRTP_T1_CAPPING 200
|
||||
|
||||
/*!
|
||||
* \brief ZRTP stream initiation period in milliseconds
|
||||
* If for some reason the initiation of a secure ZRTP stream can't be performed
|
||||
* at a given time (there are no retained secrets for the session, or the
|
||||
* concurrent stream is being processed in "DH" mode) the next attempt will be
|
||||
* done in ZRTP_PROCESS_T1 milliseconds. If at the end of ZRTP_PROCESS_T1_MAX_COUNT
|
||||
* attempts the necessary conditions haven't been reached, the task is canceled.
|
||||
* The mechanism of delayed execution is the same as the mechanism of delayed
|
||||
* packet sending. \sa ZRTP_PROCESS_T1_MAX_COUNT
|
||||
*/
|
||||
#define ZRTP_PROCESS_T1 50
|
||||
|
||||
/*!
|
||||
* \brief Max recall count value
|
||||
* This is the threshold value for ZRTP stream initiation tries. See \ref
|
||||
* ZRTP_PROCESS_T1 for details.
|
||||
*/
|
||||
#define ZRTP_PROCESS_T1_MAX_COUNT 20000
|
||||
|
||||
/*!
|
||||
* \brief Retransmission timer T2 in milliseconds
|
||||
* T2 is used for the retransmission of all ZRTP messages except HELLO. The
|
||||
* timeout value is doubled after every retransmission. The gain (max timeout's
|
||||
* value) is limited by \ref ZRTP_T2_CAPPING. \ref ZRTP_T2_MAX_COUNT is the limit
|
||||
* for packets resent as for \ref ZRTP_T1.
|
||||
*/
|
||||
#define ZRTP_T2 150
|
||||
|
||||
/*!
|
||||
* \brief Max retransmissions for non-HELLO packets
|
||||
* ZRTP_T2_MAX_COUNT limits number of resends for the non-HELLO/GOCLEAR packets.
|
||||
* When exceeded, call_is_on_error() is called and the error code is set to
|
||||
* \ref zrtp_protocol_error_t#zrtp_error_timeout
|
||||
*/
|
||||
#define ZRTP_T2_MAX_COUNT 10
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Max timeout value for protocol packets (except HELLO and GOCLEAR)
|
||||
* The resend timeout value grows until it reaches ZRTP_T2_CAPPING. After that
|
||||
* the state machine keeps resending until the resend count hits the limit of
|
||||
* \ref ZRTP_T2_MAX_COUNT
|
||||
*/
|
||||
#define ZRTP_T2_CAPPING 1200
|
||||
|
||||
/*!
|
||||
* \brief Retransmission timer for GoClear resending in milliseconds.
|
||||
* To prevent pinholes from closing or NAT bindings from expiring, the GoClear
|
||||
* message should be resent every N seconds while waiting for confirmation from
|
||||
* the user. GoClear replays are endless.
|
||||
*/
|
||||
#define ZRTP_T3 300
|
||||
|
||||
/*!
|
||||
* \brief Set of timeouts for Error packet replays.
|
||||
* The meaning of these fields are the same as in the T1 group but for
|
||||
* Error/ErrorAck packets. The values of these options are not strongly
|
||||
* defined by the draft. We use empirical values.
|
||||
*/
|
||||
#define ZRTP_ET 150
|
||||
#define ZRTP_ETI_MAX_COUNT 10
|
||||
#define ZRTP_ETR_MAX_COUNT 3
|
||||
|
||||
/* ZRTP Retries schedule for slow CSD channel */
|
||||
#define ZRTP_CSD_T4PROC 2000
|
||||
|
||||
#define ZRTP_CSD_T1 400 + ZRTP_CSD_T4PROC
|
||||
#define ZRTP_CSD_T2 900 + ZRTP_CSD_T4PROC
|
||||
#define ZRTP_CSD_T3 900 + ZRTP_CSD_T4PROC
|
||||
#define ZRTP_CSD_T4 200 + ZRTP_CSD_T4PROC
|
||||
#define ZRTP_CSD_ET 200 + ZRTP_CSD_T4PROC
|
||||
|
||||
|
||||
/*! Defines the max component number which can be used in a HELLO agreement */
|
||||
#define ZRTP_MAX_COMP_COUNT 7
|
||||
|
||||
|
||||
/*
|
||||
* Some definitions of protocol structure sizes. To simplify sizeof() constructions
|
||||
*/
|
||||
#define ZRTP_VERSION_SIZE 4
|
||||
#define ZRTP_ZID_SIZE 12
|
||||
#define ZRTP_CLIENTID_SIZE 16
|
||||
#define ZRTP_COMP_TYPE_SIZE 4
|
||||
#define ZRTP_RS_SIZE 32
|
||||
#define ZRTP_RSID_SIZE 8
|
||||
#define ZRTP_PACKET_TYPE_SIZE 8
|
||||
#define RTP_V2_HDR_SIZE 12
|
||||
#define RTP_HDR_SIZE RTP_V2_HDR_SIZE
|
||||
#define RTCP_HDR_SIZE 8
|
||||
#define ZRTP_HV_SIZE 32
|
||||
#define ZRTP_HV_NONCE_SIZE 16
|
||||
#define ZRTP_HV_KEY_SIZE 8
|
||||
#define ZRTP_HMAC_SIZE 8
|
||||
#define ZRTP_CFBIV_SIZE 16
|
||||
#define ZRTP_MITM_SAS_SIZE 4
|
||||
#define ZRTP_MESSAGE_HASH_SIZE 32
|
||||
#define ZRTP_HASH_SIZE 32
|
||||
|
||||
/* Without header and HMAC: <verison> + <client ID> + <hash> + <ZID> + <components length> */
|
||||
#define ZRTP_HELLO_STATIC_SIZE (ZRTP_VERSION_SIZE + ZRTP_CLIENTID_SIZE + 32 + ZRTP_ZID_SIZE + 4)
|
||||
|
||||
/* Without header and HMAC: <hash> + <secrets IDs> */
|
||||
#define ZRTP_DH_STATIC_SIZE (32 + 4*8)
|
||||
|
||||
/* Without header and HMAC: <hash> + <ZID> + <components definitions> */
|
||||
#define ZRTP_COMMIT_STATIC_SIZE (32 + ZRTP_ZID_SIZE + 4*5)
|
||||
|
||||
/* <RTP> + <ext. header> + <ZRTP message type> + CRC32 */
|
||||
#define ZRTP_MIN_PACKET_LENGTH (RTP_HDR_SIZE + 4 + 8 + 4)
|
||||
|
||||
|
||||
#if ( ZRTP_PLATFORM != ZP_SYMBIAN )
|
||||
#pragma pack(push,1)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/** Base ZRTP messages header */
|
||||
typedef struct zrtp_msg_hdr
|
||||
{
|
||||
/** ZRTP magic cookie */
|
||||
uint16_t magic;
|
||||
|
||||
/** ZRTP message length in 4-byte words */
|
||||
uint16_t length;
|
||||
|
||||
/** ZRTP message type */
|
||||
zrtp_uchar8_t type;
|
||||
} zrtp_msg_hdr_t;
|
||||
|
||||
/*!
|
||||
* \brief ZRTP HELLO packet data
|
||||
* Contains fields needed to construct/store a ZRTP HELLO packet
|
||||
*/
|
||||
typedef struct zrtp_packet_Hello
|
||||
{
|
||||
zrtp_msg_hdr_t hdr;
|
||||
/** ZRTP protocol version */
|
||||
zrtp_uchar4_t version;
|
||||
|
||||
/** ZRTP client ID */
|
||||
zrtp_uchar16_t cliend_id;
|
||||
|
||||
/*!< Hash to prevent DOS attacks */
|
||||
zrtp_uchar32_t hash;
|
||||
|
||||
/** Endpoint unique ID */
|
||||
zrtp_uchar12_t zid;
|
||||
#if ZRTP_BYTE_ORDER == ZBO_LITTLE_ENDIAN
|
||||
uint8_t padding2:4;
|
||||
|
||||
/** Passive flag */
|
||||
uint8_t pasive:1;
|
||||
|
||||
/** M flag */
|
||||
uint8_t mitmflag:1;
|
||||
|
||||
/** Signature support flag */
|
||||
uint8_t sigflag:1;
|
||||
|
||||
uint8_t uflag:1;
|
||||
|
||||
/** Hash scheme count */
|
||||
uint8_t hc:4;
|
||||
uint8_t padding3:4;
|
||||
|
||||
/** Cipher count */
|
||||
uint8_t ac:4;
|
||||
|
||||
/** Hash scheme count */
|
||||
uint8_t cc:4;
|
||||
|
||||
/** SAS scheme count */
|
||||
uint8_t sc:4;
|
||||
|
||||
/** PK Type count */
|
||||
uint8_t kc:4;
|
||||
#elif ZRTP_BYTE_ORDER == ZBO_BIG_ENDIAN
|
||||
uint8_t uflag:1;
|
||||
uint8_t sigflag:1;
|
||||
uint8_t mitmflag:1;
|
||||
uint8_t pasive:1;
|
||||
uint8_t padding2:4;
|
||||
uint8_t padding3:4;
|
||||
uint8_t hc:4;
|
||||
uint8_t cc:4;
|
||||
uint8_t ac:4;
|
||||
uint8_t kc:4;
|
||||
uint8_t sc:4;
|
||||
#endif
|
||||
|
||||
zrtp_uchar4_t comp[ZRTP_MAX_COMP_COUNT*5];
|
||||
zrtp_uchar8_t hmac;
|
||||
} zrtp_packet_Hello_t;
|
||||
|
||||
|
||||
/**
|
||||
* @brief ZRTP COMMIT packet data
|
||||
* Contains information to build/store a ZRTP commit packet.
|
||||
*/
|
||||
typedef struct zrtp_packet_Commit
|
||||
{
|
||||
zrtp_msg_hdr_t hdr;
|
||||
|
||||
/** Hash to prevent DOS attacks */
|
||||
zrtp_uchar32_t hash;
|
||||
|
||||
/** ZRTP endpoint unique ID */
|
||||
zrtp_uchar12_t zid;
|
||||
|
||||
/** hash calculations schemes selected by ZRTP endpoint */
|
||||
zrtp_uchar4_t hash_type;
|
||||
|
||||
/** cipher types selected by ZRTP endpoint */
|
||||
zrtp_uchar4_t cipher_type;
|
||||
|
||||
/** SRTP auth tag lengths selected by ZRTP endpoint */
|
||||
zrtp_uchar4_t auth_tag_length;
|
||||
|
||||
/** session key exchange schemes selected by endpoints */
|
||||
zrtp_uchar4_t public_key_type;
|
||||
|
||||
/** SAS calculation schemes selected by endpoint*/
|
||||
zrtp_uchar4_t sas_type;
|
||||
/** hvi. See <A HREF="http://zfoneproject.com/zrtp_ietf.html">"ZRTP Internet Draft"</A> */
|
||||
zrtp_uchar32_t hv;
|
||||
zrtp_uchar8_t hmac;
|
||||
} zrtp_packet_Commit_t;
|
||||
|
||||
|
||||
/**
|
||||
* @brief ZRTP DH1/2 packets data
|
||||
* Contains fields needed to constructing/storing ZRTP DH1/2 packet.
|
||||
*/
|
||||
typedef struct zrtp_packet_DHPart
|
||||
{
|
||||
zrtp_msg_hdr_t hdr;
|
||||
|
||||
/** Hash to prevent DOS attacks */
|
||||
zrtp_uchar32_t hash;
|
||||
|
||||
/** hash of retained shared secret 1 */
|
||||
zrtp_uchar8_t rs1ID;
|
||||
|
||||
/** hash of retained shared secret 2 */
|
||||
zrtp_uchar8_t rs2ID;
|
||||
|
||||
/** hash of user-defined secret */
|
||||
zrtp_uchar8_t auxsID;
|
||||
|
||||
/** hash of PBX secret */
|
||||
zrtp_uchar8_t pbxsID;
|
||||
|
||||
/** pvi/pvr or nonce field depends on stream mode */
|
||||
zrtp_uchar1024_t pv;
|
||||
zrtp_uchar8_t hmac;
|
||||
} zrtp_packet_DHPart_t;
|
||||
|
||||
|
||||
/**
|
||||
* @brief ZRTP Confirm1/Confirm2 packets data
|
||||
*/
|
||||
typedef struct zrtp_packet_Confirm
|
||||
{
|
||||
zrtp_msg_hdr_t hdr;
|
||||
|
||||
/** HMAC of preceding parameters */
|
||||
zrtp_uchar8_t hmac;
|
||||
|
||||
/** The CFB Initialization Vector is a 128 bit random nonce */
|
||||
zrtp_uchar16_t iv;
|
||||
|
||||
/** Hash to prevent DOS attacks */
|
||||
zrtp_uchar32_t hash;
|
||||
|
||||
/** Unused (Set to zero and ignored) */
|
||||
uint8_t pad[2];
|
||||
|
||||
/** Length of optional signature field */
|
||||
uint8_t sig_length;
|
||||
|
||||
/** boolean flags for allowclear, SAS verified and disclose */
|
||||
uint8_t flags;
|
||||
|
||||
/** how long (seconds) to cache shared secret */
|
||||
uint32_t expired_interval;
|
||||
} zrtp_packet_Confirm_t;
|
||||
|
||||
|
||||
/**
|
||||
* @brief ZRTP Confirm1/Confirm2 packets data
|
||||
*/
|
||||
typedef struct zrtp_packet_SASRelay
|
||||
{
|
||||
zrtp_msg_hdr_t hdr;
|
||||
|
||||
/** HMAC of preceding parameters */
|
||||
zrtp_uchar8_t hmac;
|
||||
|
||||
/** The CFB Initialization Vector is a 128 bit random nonce */
|
||||
zrtp_uchar16_t iv;
|
||||
|
||||
/** Unused (Set to zero and ignored) */
|
||||
uint8_t pad[2];
|
||||
|
||||
/** Length of optionas signature field */
|
||||
uint8_t sig_length;
|
||||
|
||||
/** boolean flags for allowclear, SAS verified and disclose */
|
||||
uint8_t flags;
|
||||
|
||||
/** Rendering scheme of relayed sasvalue (for trusted MitMs) */
|
||||
zrtp_uchar4_t sas_scheme;
|
||||
|
||||
/** Trusted MITM relayed sashash */
|
||||
uint8_t sashash[32];
|
||||
} zrtp_packet_SASRelay_t;
|
||||
|
||||
|
||||
/**
|
||||
* @brief GoClear packet structure according to ZRTP specification
|
||||
*/
|
||||
typedef struct zrtp_packet_GoClear
|
||||
{
|
||||
zrtp_msg_hdr_t hdr;
|
||||
|
||||
/** Clear HMAC to protect SRTP session from accidental termination */
|
||||
zrtp_uchar8_t clear_hmac;
|
||||
} zrtp_packet_GoClear_t;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Error packet structure in accordance with ZRTP specification
|
||||
*/
|
||||
typedef struct zrtp_packet_Error
|
||||
{
|
||||
zrtp_msg_hdr_t hdr;
|
||||
|
||||
/** ZRTP error code defined by draft and \ref zrtp_protocol_error_t */
|
||||
uint32_t code;
|
||||
} zrtp_packet_Error_t;
|
||||
|
||||
/** ZFone Ping Message. Similar to ZRTP protocol packet format */
|
||||
typedef struct
|
||||
{
|
||||
zrtp_msg_hdr_t hdr;
|
||||
zrtp_uchar4_t version; /** Zfone discovery protocol version */
|
||||
zrtp_uchar8_t endpointhash; /** Zfone endpoint unique identifier */
|
||||
} zrtp_packet_zfoneping_t;
|
||||
|
||||
/** ZFone Ping MessageAck. Similar to ZRTP protocol packet format */
|
||||
typedef struct
|
||||
{
|
||||
zrtp_msg_hdr_t hdr;
|
||||
zrtp_uchar4_t version; /** Zfone discovery protocol version */
|
||||
zrtp_uchar8_t endpointhash; /** Zfone endpoint unique identifier */
|
||||
zrtp_uchar8_t peerendpointhash; /** EndpointHash copied from Ping message */
|
||||
uint32_t peerssrc;
|
||||
} zrtp_packet_zfonepingack_t;
|
||||
|
||||
/*! \} */
|
||||
|
||||
#if ( ZRTP_PLATFORM != ZP_SYMBIAN )
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#endif /*__ZRTP_PROTOCOL_H__*/
|
|
@ -1,252 +0,0 @@
|
|||
/*
|
||||
* libZRTP SDK library, implements the ZRTP secure VoIP protocol.
|
||||
* Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
* Contact: http://philzimmermann.com
|
||||
* For licensing and other legal details, see the file zrtp_legal.c.
|
||||
*
|
||||
* Vitaly Rozhkov <v.rozhkov at soft-industry.com>
|
||||
*/
|
||||
|
||||
#ifndef __ZRTP_SRTP_H__
|
||||
#define __ZRTP_SRTP_H__
|
||||
|
||||
#include "zrtp_config.h"
|
||||
#include "zrtp_error.h"
|
||||
#include "zrtp_types.h"
|
||||
#include "zrtp_crypto.h"
|
||||
|
||||
|
||||
/* in host order, so outside the #if */
|
||||
#define ZRTP_RTCP_E_BIT 0x80000000
|
||||
/* for byte-access */
|
||||
#define ZRTP_RTCP_E_BYTE_BIT 0x80
|
||||
#define ZRTP_RTCP_INDEX_MASK 0x7fffffff
|
||||
|
||||
|
||||
/*!
|
||||
* \defgroup srtp SRTP encryption interface
|
||||
* \ingroup zrtp_dev
|
||||
* \{
|
||||
*/
|
||||
|
||||
/* Special types and definitions for the embedded implementation */
|
||||
#if (!defined(ZRTP_USE_EXTERN_SRTP) || (ZRTP_USE_EXTERN_SRTP == 0))
|
||||
#include "zrtp_srtp_builtin.h"
|
||||
|
||||
/*!
|
||||
* \brief Structure describing an SRTP session.
|
||||
* An instance of this structure is created by calling zrtp_srtp_create()
|
||||
* and destroyed by calling zrtp_srtp_destroy(). It is used for
|
||||
* protecting and unprotecting included streams.
|
||||
*/
|
||||
struct zrtp_srtp_ctx_t
|
||||
{
|
||||
zrtp_srtp_stream_ctx_t *outgoing_srtp; /*!< pointer to outgoing SRTP stream context */
|
||||
zrtp_srtp_stream_ctx_t *incoming_srtp; /*!< pointer to incoming SRTP stream context */
|
||||
};
|
||||
|
||||
/*!
|
||||
* \brief Global context of an internal SRTP implementation.
|
||||
* It is created by calling zrtp_srtp_init() and destroyed by calling zrtp_srtp_down().
|
||||
* This context is used for holding replay protection mechanism data.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
zrtp_rp_ctx_t *rp_ctx; /*!< pointer to replay protection context. */
|
||||
} zrtp_srtp_global_t;
|
||||
|
||||
#else
|
||||
typedef void zrtp_srtp_global_t;
|
||||
#endif /* BUILDIN SRTP */
|
||||
|
||||
/*! Defines types of SRTP hmac functions */
|
||||
typedef enum zrtp_srtp_hash_id_t
|
||||
{
|
||||
/*!
|
||||
* @warning SHA1 hash algorithm is for internal use only! It used for srtp authentication and does
|
||||
* not used in ZRTP protocol itself. Don't use it in \ref zrtp_profile_t#hash_schemes configuration.
|
||||
*/
|
||||
ZRTP_SRTP_HASH_HMAC_SHA1 = 10
|
||||
} zrtp_srtp_hash_id_t;
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Structure describing SRTP/SRTCP stream parameters.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
/*!< Cipher used to encrypt packets */
|
||||
zrtp_cipher_t *cipher;
|
||||
/*!
|
||||
* \brief Cipher key length in bytes (not including salt length).
|
||||
* Used for cipher key derivation on stream initialization
|
||||
* by calling \ref zrtp_srtp_create().
|
||||
*/
|
||||
uint32_t cipher_key_len;
|
||||
|
||||
/*!< Hash used for packets authentication */
|
||||
zrtp_hash_t *hash;
|
||||
|
||||
/*!
|
||||
* \brief Key length in bytes for HMAC generation.
|
||||
* Used for auth key derivation on stream initialization by calling \ref
|
||||
* zrtp_srtp_create() and for filling the key buffer with zeros on
|
||||
* stream deinitialization by calling \ref zrtp_srtp_destroy().
|
||||
*/
|
||||
uint32_t auth_key_len;
|
||||
|
||||
/*!< Structure describing SRTP authentication scheme */
|
||||
zrtp_auth_tag_length_t *auth_tag_len;
|
||||
} zrtp_srtp_policy_t;
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Structure describing SRTP stream parameters.
|
||||
* Variables of this type should be mapped into the SRTP stream context when
|
||||
* a new stream is created.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
zrtp_srtp_policy_t rtp_policy; /*!< crypto policy for RTP stream */
|
||||
zrtp_srtp_policy_t rtcp_policy; /*!< crypto policy for RTCP stream */
|
||||
|
||||
zrtp_cipher_t *dk_cipher; /*!< cipher for the key derivation mechanism */
|
||||
|
||||
/*!< Master key for key derivation. (holds the key value only, without the salt) */
|
||||
zrtp_string64_t key;
|
||||
/*!< Master salt for key derivation. (salt should be 14 bytes length) */
|
||||
zrtp_string64_t salt;
|
||||
|
||||
uint16_t ssrc;
|
||||
} zrtp_srtp_profile_t;
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Initialize SRTP engine and allocate global SRTP context.
|
||||
* Contains global data for all sessions and streams. For correct memory
|
||||
* management, the global SRTP context should be released by calling \ref
|
||||
* zrtp_srtp_destroy(). A pointer to the allocated SRTP global should be saved
|
||||
* at zrtp->srtp_global.
|
||||
* \warning this function \b must be called before any operation with the SRTP
|
||||
* engine.
|
||||
* \param zrtp - pointer to libzrtp global context
|
||||
* \return
|
||||
* - zrtp_status_ok if success
|
||||
* - zrtp_status_fail if error.
|
||||
*/
|
||||
zrtp_status_t zrtp_srtp_init(zrtp_global_t *zrtp);
|
||||
|
||||
/*!
|
||||
* \brief Free all allocated resources that were allocated by initialization
|
||||
* This function \b must be called at the end of SRTP engine use.
|
||||
* A pointer to deallocated SRTP global context (zrtp->srtp_global)
|
||||
* should be cleared ( set to NULL).
|
||||
* \param zrtp - pointer to libzrtp global context;
|
||||
* \return
|
||||
* - zrtp_status_ok - if SRTP engine has been deinitialized successfully;
|
||||
* - one of \ref zrtp_status_t errors - if deinitialization failed.
|
||||
*/
|
||||
zrtp_status_t zrtp_srtp_down( zrtp_global_t *zrtp);
|
||||
|
||||
/*!
|
||||
* \brief Creates SRTP context based on given incoming and outgoing profiles.
|
||||
* \param srtp_global - pointer to SRTP engine global context;
|
||||
* \param inc_profile - profile for incoming stream configuration;
|
||||
* \param out_profile - profile for outgoing stream configuration.
|
||||
* \return
|
||||
* - pointer to allocated and initialized SRTP session;
|
||||
* - NULL if error.
|
||||
*/
|
||||
zrtp_srtp_ctx_t * zrtp_srtp_create( zrtp_srtp_global_t *srtp_global,
|
||||
zrtp_srtp_profile_t *inc_profile,
|
||||
zrtp_srtp_profile_t *out_profile );
|
||||
|
||||
/*!
|
||||
* \brief Destroys SRTP context that was allocated by \ref zrtp_srtp_create()
|
||||
* \param srtp_global - pointer to SRTP engine global context;
|
||||
* \param srtp_ctx - pointer to SRTP context.
|
||||
* \return
|
||||
* - zrtp_status_ok - if SRTP context has been destroyed successfully;
|
||||
* - one of \ref zrtp_status_t errors if error.
|
||||
*/
|
||||
zrtp_status_t zrtp_srtp_destroy( zrtp_srtp_global_t *srtp_global,
|
||||
zrtp_srtp_ctx_t * srtp_ctx );
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Function applies SRTP protection to the RTP packet.
|
||||
* If zrtp_status_ok is returned, then packet points to the resulting SRTP
|
||||
* packet; otherwise, no assumptions should be made about the value of either
|
||||
* data elements.
|
||||
* \note This function assumes that it can write the authentication tag
|
||||
* directly into the packet buffer, right after the the RTP payload. 32-bit
|
||||
* boundary alignment of the packet is assumed as well.
|
||||
* \param srtp_global - global SRTP context;
|
||||
* \param srtp_ctx - SRTP context to use in processing the packet;
|
||||
* \param packet - pointer to the packet to be protected.
|
||||
* \return
|
||||
* - zrtp_status_ok - if packet has been protected successfully;
|
||||
* - one of \ref zrtp_status_t errors - if protection failed.
|
||||
*/
|
||||
zrtp_status_t zrtp_srtp_protect( zrtp_srtp_global_t *srtp_global,
|
||||
zrtp_srtp_ctx_t *srtp_ctx,
|
||||
zrtp_rtp_info_t *packet );
|
||||
|
||||
/*!
|
||||
* \brief Decrypts SRTP packet.
|
||||
* If zrtp_status_ok is returned, then packet points to the resulting plain RTP
|
||||
* packet; otherwise, no assumptions should be made about the value of either
|
||||
* data elements.
|
||||
* \warning This function assumes that the SRTP packet is aligned on
|
||||
* a 32-bit boundary.
|
||||
* \param srtp_global - global SRTP context;
|
||||
* \param srtp_ctx - SRTP context to use in processing the packet;
|
||||
* \param packet - pointer to the packet to be unprotected.
|
||||
* \return
|
||||
* - zrtp_status_ok - if packet has been unprotected successfully
|
||||
* - one of \ref zrtp_status_t errors - if decryption failed
|
||||
*/
|
||||
zrtp_status_t zrtp_srtp_unprotect( zrtp_srtp_global_t *srtp_global,
|
||||
zrtp_srtp_ctx_t *srtp_ctx,
|
||||
zrtp_rtp_info_t *packet );
|
||||
|
||||
/*!
|
||||
* \brief Function applies SRTCP protection to the RTCP packet.
|
||||
* If zrtp_status_ok is returned, then packet points to the result in SRTCP
|
||||
* packet; otherwise, no assumptions should be made about the value of either
|
||||
* data elements.
|
||||
* \note This function assumes that it can write the authentication tag
|
||||
* directly into the packet buffer, right after the the RTP payload. 32-bit
|
||||
* boundary alignment of the packet is also assumed.
|
||||
* \param srtp_global - global SRTP context;
|
||||
* \param srtp_ctx - SRTP context to use in processing the packet;
|
||||
* \param packet - pointer to the packet to be protected.
|
||||
* \return
|
||||
* - zrtp_status_ok - if packet has been protected successfully;
|
||||
* - one of \ref zrtp_status_t errors - if protection failed.
|
||||
*/
|
||||
zrtp_status_t zrtp_srtp_protect_rtcp( zrtp_srtp_global_t *srtp_global,
|
||||
zrtp_srtp_ctx_t *srtp_ctx,
|
||||
zrtp_rtp_info_t *packet );
|
||||
|
||||
/*!
|
||||
* \brief Decrypts SRTCP packet.
|
||||
* If zrtp_status_ok is returned, then packet points to the resulting RTCP
|
||||
* packet; otherwise, no assumptions should be made about the value of either
|
||||
* data elements.
|
||||
* \warning This function assumes that the SRTP packet is aligned on
|
||||
* a 32-bit boundary.
|
||||
* \param srtp_global - global SRTP context;
|
||||
* \param srtp_ctx - SRTP context to use in processing the packet;
|
||||
* \param packet - pointer to the packet to be unprotected.
|
||||
* \return
|
||||
* - zrtp_status_ok - if packet has been unprotected successfully;
|
||||
* - one of \ref zrtp_status_t errors - if decryption failed.
|
||||
*/
|
||||
zrtp_status_t zrtp_srtp_unprotect_rtcp( zrtp_srtp_global_t *srtp_global,
|
||||
zrtp_srtp_ctx_t *srtp_ctx,
|
||||
zrtp_rtp_info_t *packet );
|
||||
|
||||
/* \} */
|
||||
|
||||
#endif /*__ZRTP_SRTP_H__ */
|
|
@ -1,149 +0,0 @@
|
|||
/*
|
||||
* libZRTP SDK library, implements the ZRTP secure VoIP protocol.
|
||||
* Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
* Contact: http://philzimmermann.com
|
||||
* For licensing and other legal details, see the file zrtp_legal.c.
|
||||
*
|
||||
* Viktor Krykun <v.krikun at zfoneproject.com>
|
||||
* Vitaly Rozhkov <v.rozhkov at soft-industry.com>
|
||||
*/
|
||||
|
||||
#ifndef __ZRTP_SRTP_BUILTIN_H__
|
||||
#define __ZRTP_SRTP_BUILTIN_H__
|
||||
|
||||
#include "zrtp_config.h"
|
||||
#include "zrtp_error.h"
|
||||
#include "zrtp_types.h"
|
||||
#include "zrtp_crypto.h"
|
||||
|
||||
/*!
|
||||
* \defgroup dev_srtp Built in SRTP realization
|
||||
* \ingroup zrtp_dev
|
||||
* \{
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \brief Sliding window width in bits.
|
||||
* This window is used by the replay protection mechanism. As stated in the
|
||||
* RFC3711, '3.3.2., the replay protection sliding window width MUST be at least
|
||||
* 64, but MAY be set to a higher value.
|
||||
*/
|
||||
#if (ZRTP_PLATFORM == ZP_SYMBIAN)
|
||||
# define ZRTP_SRTP_WINDOW_WIDTH 16
|
||||
#else
|
||||
# define ZRTP_SRTP_WINDOW_WIDTH 128
|
||||
#endif
|
||||
|
||||
#if ZRTP_SRTP_WINDOW_WIDTH % 8
|
||||
/*!
|
||||
* \brief Sliding window width in bytes if padding is needed.
|
||||
* This is used for allocating a window as a uint8_t array.
|
||||
*/
|
||||
#define ZRTP_SRTP_WINDOW_WIDTH_BYTES ZRTP_SRTP_WINDOW_WIDTH/8+1
|
||||
#else
|
||||
/*!
|
||||
* \brief Sliding window width in bytes if padding isn't needed.
|
||||
* This is used for allocating a window as a uint8_t array.
|
||||
*/
|
||||
#define ZRTP_SRTP_WINDOW_WIDTH_BYTES ZRTP_SRTP_WINDOW_WIDTH/8
|
||||
#endif
|
||||
|
||||
#define RP_INCOMING_DIRECTION 1
|
||||
#define RP_OUTGOING_DIRECTION 2
|
||||
|
||||
|
||||
/*! \brief Structure describing replay protection engine data */
|
||||
typedef struct
|
||||
{
|
||||
uint32_t seq; /*!< sequence number of packet on the top of sliding window */
|
||||
uint8_t window[ZRTP_SRTP_WINDOW_WIDTH_BYTES]; /*!< sliding window buffer */
|
||||
} zrtp_srtp_rp_t;
|
||||
|
||||
|
||||
/*! \brief Structure describing cipher wrapper */
|
||||
typedef struct
|
||||
{
|
||||
/*!< cipher that will be used for packet encryption */
|
||||
zrtp_cipher_t *cipher;
|
||||
|
||||
/*!< pointer to cipher's context */
|
||||
void *ctx;
|
||||
} zrtp_srtp_cipher_t;
|
||||
|
||||
|
||||
/*! \brief Structure describing authentication wrapper */
|
||||
typedef struct
|
||||
{
|
||||
zrtp_hash_t *hash; /*!< hash component for authentication tag generation */
|
||||
uint8_t *key; /*!< key buffer for HMAC generation */
|
||||
uint32_t key_len; /*!< key length in bytes. Used for zeroes filling of buffer with key */
|
||||
zrtp_auth_tag_length_t *tag_len; /*!< SRTP authentication scheme component */
|
||||
} zrtp_srtp_auth_t;
|
||||
|
||||
|
||||
/*! \brief Structure for SRTP stream context description. */
|
||||
typedef struct
|
||||
{
|
||||
/*!< wrapper for cipher component and holding its auxiliary data. Used for RTP encryption */
|
||||
zrtp_srtp_cipher_t rtp_cipher;
|
||||
/*!< wrapper for hash component and holding its auxiliary data. Used for RTP authentication */
|
||||
zrtp_srtp_auth_t rtp_auth;
|
||||
|
||||
/*!< wrapper for cipher component and holding its auxiliary data. Used for RTCP encryption */
|
||||
zrtp_srtp_cipher_t rtcp_cipher;
|
||||
/*!< wrapper for hash component and holding its auxiliary data. Used for RTCP authentication */
|
||||
zrtp_srtp_auth_t rtcp_auth;
|
||||
} zrtp_srtp_stream_ctx_t;
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Enumeration of labels used in key derivation for various purposes.
|
||||
* See RFC3711, "4.3. Key Derivation" for more details
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
label_rtp_encryption = 0x00, /*!< for RTP cipher's key derivation */
|
||||
label_rtp_msg_auth = 0x01, /*!< for RTP packets authentication mechanism's key derivation */
|
||||
label_rtp_salt = 0x02, /*!< for RTP cipher's salt derivation */
|
||||
|
||||
label_rtcp_encryption = 0x03, /*!< used for RTCP cipher's key derivation */
|
||||
label_rtcp_msg_auth = 0x04, /*!< for RTCP packets authentication mechanism key derivation */
|
||||
label_rtcp_salt = 0x05 /*!< for RTCP cipher's salt derivation */
|
||||
} zrtp_srtp_prf_label;
|
||||
|
||||
typedef zrtp_srtp_cipher_t zrtp_dk_ctx;
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Structure describing a protection node.
|
||||
* Each node keeps data for protecting RTP and RTCP packets against replays
|
||||
* within streams with a given SSRC. There are two replay protection nodes for
|
||||
* each SSRC value in the two lists. One is used for incoming packets and
|
||||
* the other for outgoing packets.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
zrtp_srtp_rp_t rtp_rp; /*!< RTP replay protection data */
|
||||
zrtp_srtp_rp_t rtcp_rp; /*!< RTCP replay protection data */
|
||||
uint32_t ssrc; /*!< RTP media SSRC for nodes searching in the linked list */
|
||||
zrtp_srtp_ctx_t *srtp_ctx; /*!< SRTP context related with current node*/
|
||||
mlist_t mlist;
|
||||
} zrtp_rp_node_t;
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Structure describing replay protection context.
|
||||
* This structure holds two linked list's heads and two mutexes for
|
||||
* synchronization access to appropriate lists.
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
zrtp_rp_node_t inc_head; /*!< head of replay protection nodes list for incoming packets */
|
||||
zrtp_mutex_t* inc_sync; /*!< mutex for incoming list access synchronization */
|
||||
zrtp_rp_node_t out_head; /*!< head of replay protection nodes list for outgoing packets */
|
||||
zrtp_mutex_t* out_sync; /*!< mutex for outgoing list access synchronization */
|
||||
} zrtp_rp_ctx_t;
|
||||
|
||||
/* \} */
|
||||
|
||||
#endif /* __ZRTP_SRTP_BUILTIN_H__ */
|
|
@ -1,283 +0,0 @@
|
|||
/*
|
||||
* libZRTP SDK library, implements the ZRTP secure VoIP protocol.
|
||||
* Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
* Contact: http://philzimmermann.com
|
||||
* For licensing and other legal details, see the file zrtp_legal.c.
|
||||
*
|
||||
* Viktor Krykun <v.krikun at zfoneproject.com>
|
||||
*/
|
||||
|
||||
#ifndef __ZRTP_STRING_H__
|
||||
#define __ZRTP_STRING_H__
|
||||
|
||||
#include "zrtp_config.h"
|
||||
|
||||
/**
|
||||
* \file zrtp_strings.h
|
||||
* \brief libzrtp safe strings
|
||||
*/
|
||||
|
||||
/*============================================================================*/
|
||||
/* Libzrtp Strings */
|
||||
/*============================================================================*/
|
||||
|
||||
#define ZRTP_STRING8 12
|
||||
#define ZRTP_STRING16 20
|
||||
#define ZRTP_STRING32 36
|
||||
#define ZRTP_STRING64 68
|
||||
#define ZRTP_STRING128 132
|
||||
#define ZRTP_STRING256 260
|
||||
#define ZRTP_STRING1024 1028
|
||||
|
||||
|
||||
#if ( ZRTP_PLATFORM != ZP_SYMBIAN )
|
||||
#pragma pack(push, 1)
|
||||
#endif
|
||||
|
||||
typedef struct zrtp_stringn
|
||||
{
|
||||
uint16_t length;
|
||||
uint16_t max_length;
|
||||
char buffer[0];
|
||||
} zrtp_stringn_t;
|
||||
|
||||
typedef struct zrtp_string8
|
||||
{
|
||||
uint16_t length;
|
||||
uint16_t max_length;
|
||||
char buffer[ZRTP_STRING8];
|
||||
} zrtp_string8_t;
|
||||
|
||||
|
||||
typedef struct zrtp_string16
|
||||
{
|
||||
uint16_t length;
|
||||
uint16_t max_length;
|
||||
char buffer[ZRTP_STRING16];
|
||||
} zrtp_string16_t;
|
||||
|
||||
typedef struct zrtp_string32
|
||||
{
|
||||
uint16_t length;
|
||||
uint16_t max_length;
|
||||
char buffer[ZRTP_STRING32];
|
||||
} zrtp_string32_t;
|
||||
|
||||
typedef struct zrtp_string64
|
||||
{
|
||||
uint16_t length;
|
||||
uint16_t max_length;
|
||||
char buffer[ZRTP_STRING64];
|
||||
} zrtp_string64_t;
|
||||
|
||||
typedef struct zrtp_string128
|
||||
{
|
||||
uint16_t length;
|
||||
uint16_t max_length;
|
||||
char buffer[ZRTP_STRING128];
|
||||
} zrtp_string128_t;
|
||||
|
||||
typedef struct zrtp_string256
|
||||
{
|
||||
uint16_t length;
|
||||
uint16_t max_length;
|
||||
char buffer[ZRTP_STRING256];
|
||||
} zrtp_string256_t;
|
||||
|
||||
typedef struct zrtp_string1024
|
||||
{
|
||||
uint16_t length;
|
||||
uint16_t max_length;
|
||||
char buffer[ZRTP_STRING1024];
|
||||
} zrtp_string1024_t;
|
||||
|
||||
#if ( ZRTP_PLATFORM != ZP_SYMBIAN )
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* \defgroup zrtp_strings Libzrtp Safe Strings
|
||||
*
|
||||
* Using standard C-like strings is potentially dangerous in any program. All standard functions for
|
||||
* working with c-strings rely on zero-termination, since c-strings don't contain a representation
|
||||
* of their length. This can cause many mistakes. Moreover, it is impossible to use these strings
|
||||
* for storing binary data.
|
||||
*
|
||||
* To solve these problems libzrtp uses zstrings instead of normal c-strings. A zstring is just a
|
||||
* wrapped c-string that stores its own length. Use the following data types, macros and utility
|
||||
* functions for working with zstrings in your applications.
|
||||
*
|
||||
* zstrings are easy to use, and at the same time light-weight and flexible.
|
||||
* We use two groups of zstring types:
|
||||
* \li zrtp_stringn_t - base type for all operations with zstrings;
|
||||
* \li zrtp_stringXX_t group - storage types.
|
||||
*
|
||||
* One can use any zrtp_stringXX_t type (big enough to store necessary data) esired and operate with
|
||||
* it using global zstring functions. To cast zrtp_stringXX_t to zrtp_stringn_t, the \ref ZSTR_GV
|
||||
* and \ref ZSTR_GVP macros can be used.
|
||||
*
|
||||
* The main principle of running zstrings is storing its current data size. So to avoid mistakes and
|
||||
* mess it is advised to use preestablished initialization macros. The description of each follows.
|
||||
* \{
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* \brief Casts zrtp_stringXX_t to a pointer to zrtp_stringn_t.
|
||||
*
|
||||
* This macro prevents static casts caused by using zstring functions. Prevents mistakes and makes
|
||||
* zstrings safer to use.
|
||||
* \sa ZSTR_GVP
|
||||
*/
|
||||
#define ZSTR_GV(pstr) \
|
||||
(zrtp_stringn_t*)((char*)pstr.buffer - sizeof(pstr.max_length) - sizeof(pstr.length))
|
||||
|
||||
/**
|
||||
* \brief Casts zrtp_stringXX_t* to a pointer to zrtp_stringn_t.
|
||||
*
|
||||
* This macro prevents static casts from using zstring functions.
|
||||
* \sa ZSTR_GV
|
||||
*/
|
||||
#define ZSTR_GVP(pstr) \
|
||||
(zrtp_stringn_t*)((char*)pstr->buffer - sizeof(pstr->max_length) - sizeof(pstr->length))
|
||||
|
||||
/**
|
||||
* \brief Macro for empty zstring initialization
|
||||
* \warning Use this macro on every zrtp_string structure allocation.
|
||||
* usage: \code zrtp_string_t zstr = ZSTR_INIT_EMPTY(zstr); \endcode
|
||||
*/
|
||||
#define ZSTR_INIT_EMPTY(a) { 0, sizeof(a.buffer) - 1, { 0 }}
|
||||
|
||||
/**
|
||||
* \brief Macro for zstring initialization from a constant C-string
|
||||
* usage: \code zrtp_string_t zstr = ZSTR_INIT_WITH_CONST_CSTRING("zstring use example"); \endcode
|
||||
*/
|
||||
#define ZSTR_INIT_WITH_CONST_CSTRING(s) {sizeof(s) - 1, 0, s}
|
||||
|
||||
/**
|
||||
* \brief Macro for zstring clearing
|
||||
*
|
||||
* Use this macro for initializing already created zstrings
|
||||
* usage: \code ZSTR_SET_EMPTY(zstr); \endcode
|
||||
*/
|
||||
#define ZSTR_SET_EMPTY(a)\
|
||||
{ a.length = 0; a.max_length = sizeof(a.buffer) - 1; a.buffer[0] = 0; }
|
||||
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief compare two zstrings
|
||||
*
|
||||
* Function compares the two strings left and right.
|
||||
* \param left - one string for comparing;
|
||||
* \param right - the other string for comparing.
|
||||
* \return
|
||||
* - -1 if left string less than right;
|
||||
* - 0 if left string is equal to right;
|
||||
* - 1 if left string greater than right.
|
||||
*/
|
||||
int zrtp_zstrcmp(const zrtp_stringn_t *left, const zrtp_stringn_t *right);
|
||||
|
||||
/**
|
||||
* \brief Copy a zstring
|
||||
*
|
||||
* The zrtp_zstrcpy function copies the string pointed by src to the structure pointed to by dst.
|
||||
* \param src source string;
|
||||
* \param dst destination string.
|
||||
*/
|
||||
void zrtp_zstrcpy(zrtp_stringn_t *dst, const zrtp_stringn_t *src);
|
||||
|
||||
/**
|
||||
* \brief Copy first N bytes of zstring
|
||||
*
|
||||
* The zrtp_zstrncpy function copies the first N bytes from the string pointed to by src to the
|
||||
* structure pointed by dst.
|
||||
* \param src - source string;
|
||||
* \param dst - destination string;
|
||||
* \param size - nuber of bytes to copy.
|
||||
*/
|
||||
void zrtp_zstrncpy(zrtp_stringn_t *dst, const zrtp_stringn_t *src, uint16_t size);
|
||||
|
||||
/**
|
||||
* @brief Copy a c-string into a z-string
|
||||
* \param dst - destination zsyring
|
||||
* \param src - source c-string to be copied.
|
||||
*/
|
||||
void zrtp_zstrcpyc(zrtp_stringn_t *dst, const char *src);
|
||||
|
||||
|
||||
/**
|
||||
* \brief Copy first N bytes of a c-string into a z-string
|
||||
* \param dst - destination zsyring
|
||||
* \param src - source c-string to be copied.
|
||||
* \param size - number of bytes to be copied from \c src to \c dst
|
||||
*/
|
||||
void zrtp_zstrncpyc(zrtp_stringn_t *dst, const char *src, uint16_t size);
|
||||
|
||||
/**
|
||||
* \brief Concatenate two strings
|
||||
*
|
||||
* The zrtp_zstrcat function appends the src string to the dst string. If dst string doesn't have
|
||||
* enough space it will be truncated.
|
||||
* \param src source string;
|
||||
* \param dst destination string.
|
||||
*/
|
||||
void zrtp_zstrcat(zrtp_stringn_t *dst, const zrtp_stringn_t *src);
|
||||
|
||||
/**
|
||||
* \brief Clear a zstring
|
||||
* \param zstr - string for clearing;
|
||||
*/
|
||||
void zrtp_wipe_zstring(zrtp_stringn_t *zstr);
|
||||
|
||||
/**
|
||||
* \brief Compare two binary strings
|
||||
*
|
||||
* This function is used to prevent errors caused by other, non byte-to-byte comparison
|
||||
* implementations. The secret sorting function is sensitive to such things.
|
||||
*
|
||||
* \param s1 - first string for comparison
|
||||
* \param s2 - second string for comparison
|
||||
* \param n - number of bytes to be compared
|
||||
* \return - an integer less than, equal to, or greater than zero, if the first n bytes of s1
|
||||
* is found, respectively, to be less than, to match, or to be greater than the first n bytes of s2.
|
||||
*/
|
||||
int zrtp_memcmp(const void* s1, const void* s2, uint32_t n);
|
||||
|
||||
/**
|
||||
* \brief Converts binary data to the hex string representation
|
||||
*
|
||||
* \param bin - pointer to the binary buffer for converting;
|
||||
* \param bin_size - binary data size;
|
||||
* \param buff - destination buffer;
|
||||
* \param buff_size - destination buffer size.
|
||||
* \return
|
||||
* - pointer to the buff with converted data;
|
||||
* - "Buffer too small" in case of error.
|
||||
*/
|
||||
const char* hex2str(const char* bin, int bin_size, char* buff, int buff_size);
|
||||
|
||||
/**
|
||||
* \brief Converts hex string to the binary representation
|
||||
*
|
||||
* \param buff - source buffer for converting;
|
||||
* \param buff_size - source buffer size;
|
||||
* \param bin - pointer to the destination binary buffer;
|
||||
* \param bin_size - binary data size;
|
||||
* \return
|
||||
* - pointer to the buff with converted data, or NULL in case of error.
|
||||
*/
|
||||
char *str2hex(const char* buff, int buff_size, char* bin, int bin_size);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
/** \} */
|
||||
|
||||
#endif /* __ZRTP_STRING_H__ */
|
|
@ -1,987 +0,0 @@
|
|||
/*
|
||||
* libZRTP SDK library, implements the ZRTP secure VoIP protocol.
|
||||
* Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
* Contact: http://philzimmermann.com
|
||||
* For licensing and other legal details, see the file zrtp_legal.c.
|
||||
*
|
||||
* Viktor Krykun <v.krikun at zfoneproject.com>
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __ZRTP_TYPES_H__
|
||||
#define __ZRTP_TYPES_H__
|
||||
|
||||
#include "zrtp_config.h"
|
||||
#include "bn.h"
|
||||
#include "zrtp_base.h"
|
||||
#include "zrtp_iface.h"
|
||||
#include "zrtp_list.h"
|
||||
#include "zrtp_legal.h"
|
||||
#include "zrtp_string.h"
|
||||
#include "zrtp_protocol.h"
|
||||
|
||||
|
||||
/**
|
||||
* \brief Defines ZRTP state-machine states
|
||||
* \ingroup zrtp_types
|
||||
*
|
||||
* The conditions for switching from one state to another, and libzrtp behavior in every state is
|
||||
* described in detail in \ref XXX and depicted in diagram XXX and XXX.
|
||||
*
|
||||
* The current stream state is stored in the zrtp_stream_info_t#state variable and available for
|
||||
* reading at any time.
|
||||
*/
|
||||
typedef enum zrtp_state_t
|
||||
{
|
||||
ZRTP_STATE_NONE = 0,
|
||||
ZRTP_STATE_ACTIVE, /** Just right stream attaching, before protocol start */
|
||||
ZRTP_STATE_START, /** Protocol initiated, Discovery haven't started yet */
|
||||
ZRTP_STATE_WAIT_HELLOACK, /** Hello sending, waiting for HelloAck */
|
||||
ZRTP_STATE_WAIT_HELLO, /** HelloAck received, Waiting for peer Hello */
|
||||
ZRTP_STATE_CLEAR, /** CLEAR state */
|
||||
ZRTP_STATE_START_INITIATINGSECURE, /** Starting Initiator state-machine */
|
||||
ZRTP_STATE_INITIATINGSECURE, /** Commit retries, waiting for DH1 */
|
||||
ZRTP_STATE_WAIT_CONFIRM1, /** DH2 retries, waiting for Confirm1 */
|
||||
ZRTP_STATE_WAIT_CONFIRMACK, /** Confirm2 retries, waiting for ConfirmAck */
|
||||
ZRTP_STATE_PENDINGSECURE, /** Responder state-machine, waiting for DH2 */
|
||||
ZRTP_STATE_WAIT_CONFIRM2, /** Waiting for Confirm2 to finalize ZRTP exchange */
|
||||
ZRTP_STATE_SECURE, /** SECURE state, call is encrypted */
|
||||
ZRTP_STATE_SASRELAYING, /** SAS transferring to the remote peer (for MiTM only) */
|
||||
ZRTP_STATE_INITIATINGCLEAR, /** Switching to CLEAR initated by the local endpoint */
|
||||
ZRTP_STATE_PENDINGCLEAR, /** CLEAR request have been received */
|
||||
ZRTP_STATE_INITIATINGERROR, /** Protocol ERROR detected on local side */
|
||||
ZRTP_STATE_PENDINGERROR, /** Protocol ERROR received from the remote peer */
|
||||
ZRTP_STATE_ERROR, /** Protocol ERROR state. Check zrtp_stream_info#last_error*/
|
||||
#if (defined(ZRTP_BUILD_FOR_CSD) && (ZRTP_BUILD_FOR_CSD == 1))
|
||||
ZRTP_STATE_DRIVEN_INITIATOR,
|
||||
ZRTP_STATE_DRIVEN_RESPONDER,
|
||||
ZRTP_STATE_DRIVEN_PENDING,
|
||||
#endif
|
||||
ZRTP_STATE_NO_ZRTP, /** Discovery phase failed. Remote peer doesn't support ZRTP */
|
||||
ZRTP_STATE_COUNT
|
||||
} zrtp_state_t;
|
||||
|
||||
/**
|
||||
* \brief Enumeration for ZRTP stream mode definition
|
||||
* \ingroup zrtp_types
|
||||
*/
|
||||
typedef enum zrtp_stream_mode_t
|
||||
{
|
||||
ZRTP_STREAM_MODE_UNKN = 0, /** Unused stream - unknown mode */
|
||||
ZRTP_STREAM_MODE_CLEAR = 1, /** Just after stream attaching - mode is undefined */
|
||||
ZRTP_STREAM_MODE_DH = 2, /** FULL DH ZRTP stream mode */
|
||||
ZRTP_STREAM_MODE_PRESHARED = 3, /** Preshared ZRTP stream mode */
|
||||
ZRTP_STREAM_MODE_MULT = 4, /** Multistream ZRTP stream mode */
|
||||
ZRTP_STREAM_MODE_COUNT = 5
|
||||
} zrtp_stream_mode_t;
|
||||
|
||||
/**
|
||||
* \brief ZRTP session profile
|
||||
* \ingroup zrtp_types
|
||||
* \ingroup zrtp_main_init
|
||||
*
|
||||
* ZRTP Sessions are configured with a profile scheme. Each profile is defined by a structure of the
|
||||
* given type. zrtp_profile_t contains a set of preferences for crypto components and other
|
||||
* protocol parameters.
|
||||
*
|
||||
* The Crypto component choosing mechanism is as follows: both sides communicated their supported
|
||||
* components during the "discovery phase". After that the initiator chooses the optimal
|
||||
* intersection of components.
|
||||
*
|
||||
* For components identification the numerical values of the following types are used:
|
||||
* zrtp_hash_id_t, zrtp_cipher_id_t, zrtp_atl_id_t, and zrtp_sas_id_t. The profile field responsible
|
||||
* for components of a particular type setting is an integer-valued array where component
|
||||
* identifiers should be placed in order of priority. 0-element is of the first priority. The list
|
||||
* should end with ZRTP_COMP_UNKN=0.
|
||||
*
|
||||
* The values in the profile may be filled either by libzrtp zrtp_profile_defaults() or by the user
|
||||
* manually.
|
||||
*
|
||||
* The profile is applied to the stream context on allocation by zrtp_session_init().
|
||||
*
|
||||
* \sa XXX
|
||||
*/
|
||||
struct zrtp_profile_t
|
||||
{
|
||||
/**
|
||||
* \brief Allowclear mode flag
|
||||
*
|
||||
* This option means that the ZRTP peer allows SRTP termination. If allowclear is disabled, the
|
||||
* ZRTP peer must stay in protected mode until the moment the ZRTP stream is shut down. When not
|
||||
* in "allowclear" mode, libzrtp will reject all incoming GoClear packages and will not generate
|
||||
* its own.
|
||||
*
|
||||
* Setting the value equal to 1 turns "allowclear" on, and 0 turns "allowclear" off. If
|
||||
* "allowclear" is disabled zrtp_stream_clear() returns zrtp_status_fail.
|
||||
*/
|
||||
uint8_t allowclear;
|
||||
|
||||
/**
|
||||
* \brief ZRTP "autosecure" mode flag
|
||||
*
|
||||
* In "autosecure" mode, a protected connection will be initiated automatically just after
|
||||
* stream start-up. If the option "autosecure" is switched off, then a secure connection can be
|
||||
*initialized only by calling zrtp_stream_secure().
|
||||
*/
|
||||
uint8_t autosecure;
|
||||
|
||||
/**
|
||||
* \brief Disclose bit.
|
||||
*
|
||||
* This field MUST be set by user application if it's going to disclose stream keys.
|
||||
*/
|
||||
uint8_t disclose_bit;
|
||||
|
||||
/**
|
||||
* \brief Enabled Discovery Optimization
|
||||
*
|
||||
* ZRTP protocol specification allows to speed-up the discovery process by sending Commit
|
||||
* instead of HelloAck. This is the default behavior for most of ZRTP endpoints. It allows to
|
||||
* eliminate one unnecessary exchange.
|
||||
*
|
||||
* At other hand, this optimization may cose some problems on slow devices: using this option,
|
||||
* the endpoint starts to compute DH value right after receiving remote Hello. It may take
|
||||
* seginificent amount of time on slow device (of is the device is busy on other calculations).
|
||||
* As all libzrtp messages are processed in single thread, while local endpoint computing DH
|
||||
* it be unable to response on remote Hello-s and remote side may switch to NO_ZRTP state.
|
||||
*
|
||||
* Not use this option is you running libzrtp on slow device or your software supports HQ video
|
||||
* conferences. Enabled by default.
|
||||
*/
|
||||
uint8_t discovery_optimization;
|
||||
|
||||
/**
|
||||
* \brief Cache time-to-live
|
||||
*
|
||||
* The time interval libzrtp should retain secrets. This parameter sets the secret's time to
|
||||
* live in seconds. This option is global for all connections processed by the library. It is
|
||||
* used together with zrtp_session_info_t#cache_ttl.
|
||||
*
|
||||
* ZRTP_CACHE_DEFAULT_TTL value is used by default.
|
||||
*/
|
||||
uint32_t cache_ttl;
|
||||
|
||||
/** \brief SAS calculation scheme preferences */
|
||||
uint8_t sas_schemes[ZRTP_MAX_COMP_COUNT+1];
|
||||
|
||||
/** \brief Cipher type preferences */
|
||||
uint8_t cipher_types[ZRTP_MAX_COMP_COUNT+1];
|
||||
|
||||
/** \brief Public key exchange scheme preferences */
|
||||
uint8_t pk_schemes[ZRTP_MAX_COMP_COUNT+1];
|
||||
|
||||
/** \brief Auth tag length preferences */
|
||||
uint8_t auth_tag_lens[ZRTP_MAX_COMP_COUNT+1];
|
||||
|
||||
/**
|
||||
* \brief Hash calculation scheme preferences
|
||||
* \note ZRTP_HASH_SHA256 is only one hash algorithm supported by current version of libzrtp.
|
||||
*/
|
||||
uint8_t hash_schemes[ZRTP_MAX_COMP_COUNT+1];
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Shared secret structure
|
||||
* \ingroup zrtp_iface_cache
|
||||
*
|
||||
* This structure stores ZRTP shared secret values used in the protocol.
|
||||
*/
|
||||
struct zrtp_shared_secret_t
|
||||
{
|
||||
/** \brief ZRTP secret value */
|
||||
zrtp_string64_t value;
|
||||
|
||||
/**
|
||||
* \brief last usage time-stamp in seconds.
|
||||
*
|
||||
* Library updates this value on generation of the new value based on previous one.
|
||||
*/
|
||||
uint32_t lastused_at;
|
||||
|
||||
/**
|
||||
* \brief TTL value in seconds.
|
||||
*
|
||||
* Available for reading after the Hello exchange. Updated on switching to Secure state.
|
||||
*/
|
||||
uint32_t ttl;
|
||||
|
||||
/**
|
||||
* \brief Loaded secret flag.
|
||||
*
|
||||
* When the flag is set (= 1), the secret has been loaded from the cache. Otherwise the secret
|
||||
* has been generated.
|
||||
* \warning For internal use only. Don't modify this flag in the application.
|
||||
*/
|
||||
uint8_t _cachedflag;
|
||||
};
|
||||
|
||||
/**
|
||||
* \brief Lists MitM roles on PBX call transferring
|
||||
*
|
||||
* Enumeration type for the ZRTP modes based on the role of the MitM.
|
||||
*/
|
||||
typedef enum zrtp_mitm_mode_t
|
||||
{
|
||||
/** MitM is not supported or not activated. */
|
||||
ZRTP_MITM_MODE_UNKN = 0,
|
||||
|
||||
/**
|
||||
* \brief Client-side mode called to the PBX in ZRTP trusted MiTM mode.
|
||||
*
|
||||
* Libzrtp activates this state on receiving an Hello, indicating that remote side is trusted
|
||||
* MiTM.
|
||||
*/
|
||||
ZRTP_MITM_MODE_CLIENT,
|
||||
|
||||
/**
|
||||
* \brief Server-side mode to transfer SAS to the registrant.
|
||||
*
|
||||
* Libzrtp switches to this state on starting zrtp_update_remote_options().
|
||||
*/
|
||||
ZRTP_MITM_MODE_RECONFIRM_SERVER,
|
||||
/**
|
||||
* \brief Client-side mode accepted SAS transfer from the trusted MiTM.
|
||||
*
|
||||
* Libzrtp activates this state on receiving an SASRELAY from a trusted MiTM endpoint.
|
||||
*/
|
||||
ZRTP_MITM_MODE_RECONFIRM_CLIENT,
|
||||
/**
|
||||
* \brief Server-side mode to accept the user's registration requests.
|
||||
*
|
||||
* Libzrtp switches to this state on starting a registration stream by
|
||||
* zrtp_stream_registration_start() or zrtp_stream_registration_secure().
|
||||
*/
|
||||
ZRTP_MITM_MODE_REG_SERVER,
|
||||
/**
|
||||
* \brief User-side mode to confirm the registration ritual.
|
||||
*
|
||||
* The library enables this state when a remote party invites it to the registration ritual
|
||||
* by a special flag in the Confirm packet.
|
||||
*/
|
||||
ZRTP_MITM_MODE_REG_CLIENT
|
||||
} zrtp_mitm_mode_t;
|
||||
|
||||
|
||||
/** \manonly */
|
||||
|
||||
|
||||
/*======================================================================*/
|
||||
/* Internal ZRTP libzrtp datatypes */
|
||||
/*======================================================================*/
|
||||
|
||||
/**
|
||||
* @defgroup types_dev libzrtp types for developers
|
||||
* The data types used in inside libzrte. This section is for libzrtp developers
|
||||
* @ingroup zrtp_dev
|
||||
* \{
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief Enumeration for ZRTP protocol packets type definition
|
||||
* @warning! Don't change order of these definition without synchronizing with
|
||||
* print* functions (see zrtp_log.h)
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
ZRTP_UNPARSED = -1, /** Unparsed packet */
|
||||
ZRTP_NONE = 0, /** Not ZRTP packet */
|
||||
ZRTP_HELLO = 1, /** ZRTP protocol HELLO packet */
|
||||
ZRTP_HELLOACK = 2, /** ZRTP protocol HELLOACK packet */
|
||||
ZRTP_COMMIT = 3, /** ZRTP protocol COMMIT packet */
|
||||
ZRTP_DHPART1 = 4, /** ZRTP protocol DHPART1 packet */
|
||||
ZRTP_DHPART2 = 5, /** ZRTP protocol DHPART2 packet */
|
||||
ZRTP_CONFIRM1 = 6, /** ZRTP protocol CONFIRM1 packet */
|
||||
ZRTP_CONFIRM2 = 7, /** ZRTP protocol CONFIRM2 packet */
|
||||
ZRTP_CONFIRM2ACK = 8, /** ZRTP protocol CONFIRM2ACK packet */
|
||||
ZRTP_GOCLEAR = 9, /** ZRTP protocol GOCLEAR packet */
|
||||
ZRTP_GOCLEARACK = 10, /** ZRTP protocol GOCLEARACK packet */
|
||||
ZRTP_ERROR = 11, /** ZRTP protocol ERROR packet */
|
||||
ZRTP_ERRORACK = 12, /** ZRTP protocol ERRORACK packet */
|
||||
ZRTP_PROCESS = 13, /** This is not a packet type but type of task for scheduler */
|
||||
ZRTP_SASRELAY = 14, /** ZRTP protocol SASRELAY packet */
|
||||
ZRTP_RELAYACK = 15, /** ZRTP protocol RELAYACK packet */
|
||||
ZRTP_ZFONEPING = 16, /** Zfone3 Ping packet */
|
||||
ZRTP_ZFONEPINGACK = 17, /** Zfone3 PingAck packet */
|
||||
ZRTP_MSG_TYPE_COUNT = 18
|
||||
} zrtp_msg_type_t;
|
||||
|
||||
|
||||
/**
|
||||
* @brief enumeration for protocol state-machine roles
|
||||
* Protocol role fully defines it's behavior. ZRTP peer chooses a role according
|
||||
* to specification. For details see internal developers documentation
|
||||
*/
|
||||
typedef enum zrtp_statemachine_type_t
|
||||
{
|
||||
ZRTP_STATEMACHINE_NONE = 0, /** Unknown type. Used as error value */
|
||||
ZRTP_STATEMACHINE_INITIATOR = 1, /** Defines initiator's protocol logic */
|
||||
ZRTP_STATEMACHINE_RESPONDER = 2 /** Defines responder's protocol logic */
|
||||
} zrtp_statemachine_type_t;
|
||||
|
||||
#define ZRTP_BIT_RS1 0x02
|
||||
#define ZRTP_BIT_RS2 0x04
|
||||
#define ZRTP_BIT_AUX 0x10
|
||||
#define ZRTP_BIT_PBX 0x20
|
||||
|
||||
/**
|
||||
* @brief Library global context
|
||||
* Compilers and linkers on some operating systems don't support the declaration
|
||||
* of global variables in c files. Storing a context allows us to solve this
|
||||
* problem in a way that unifies component use. The context is created by calling
|
||||
* zrtp_init(), and is destroyed with zrtp_down(). It contains data necessary
|
||||
* for crypto-component algorithms, including hash schemes, cipher types, SAS
|
||||
* schemes etc. Context data can be divided into three groups:
|
||||
* - ID of client ZRTP peer;
|
||||
* - RNG related fields (hash context for entropy computing);
|
||||
* - DH scheme related fields(internal data used for DH exchange);
|
||||
* - headers of the lists of every crypto-component type used for component
|
||||
* management.
|
||||
* All of this data, except for "RNG related fields", is for internal use only
|
||||
* and set automatically. All that is needed is to link every created session
|
||||
* to global context.
|
||||
* @sa zrtp_init() zrtp_down() zrtp_session_init()
|
||||
*/
|
||||
struct zrtp_global_t
|
||||
{
|
||||
uint32_t lic_mode; /** ZRTP license mode. */
|
||||
zrtp_string16_t client_id; /** Local ZRTP client ID. */
|
||||
uint8_t is_mitm; /** Flags defines that the local endpoint acts as ZRTP MiTM. */
|
||||
MD_CTX rand_ctx; /** Hash context for entropy accumulation for the RNG unit. */
|
||||
uint8_t rand_initialized; /** RNG unit initialization flag. */
|
||||
zrtp_string256_t def_cache_path; /** Full path to ZRTP cache file. */
|
||||
unsigned cache_auto_store; /** Set when user wants libzrtp to flush the cache once it changed */
|
||||
zrtp_mutex_t* rng_protector; /** This object is used to protect the shared RNG hash zrtp#rand_ctx */
|
||||
struct BigNum one; /** This section provides static data for DH3K and DH4K components */
|
||||
struct BigNum G;
|
||||
struct BigNum P_2048;
|
||||
struct BigNum P_2048_1;
|
||||
struct BigNum P_3072;
|
||||
struct BigNum P_3072_1;
|
||||
uint8_t P_2048_data[256];
|
||||
uint8_t P_3072_data[384];
|
||||
mlist_t hash_head; /** Head of hash components list */
|
||||
mlist_t cipher_head; /** Head of ciphers list */
|
||||
mlist_t atl_head; /** Head of ATL components list */
|
||||
mlist_t pktype_head; /** Head of public key exchange schemes list */
|
||||
mlist_t sas_head; /** SAS schemes list */
|
||||
void* srtp_global; /** Storage for some SRTP global data */
|
||||
mlist_t sessions_head; /** Head of ZRTP sessions list */
|
||||
uint32_t sessions_count; /** Global sessions count used to create ZRTP session IDs. For debug purposes mostly. */
|
||||
uint32_t streams_count; /** Global streams count used to create ZRTP session IDs. For debug purposes mostly. */
|
||||
zrtp_mutex_t* sessions_protector; /** This object is used to synchronize sessions list operations */
|
||||
zrtp_callback_t cb; /** Set of feedback callbacks used by libzrtp to interact with the user-space.*/
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @brief RTP packet structure used in libzrtp
|
||||
* Used for conveniently working with RTP/ZRTP packets. A binary RTP/ZRTP
|
||||
* packet is converted into a zrtp_rtp_info_t structure before processing by
|
||||
* _zrtp_packet_preparse()
|
||||
*/
|
||||
typedef struct zrtp_rtp_info_t
|
||||
{
|
||||
/** Packet length in bytes */
|
||||
uint32_t *length;
|
||||
|
||||
/** Pointer to the RTP/ZRTP packet body */
|
||||
char *packet;
|
||||
|
||||
/** Pointer to ZRTP Message part (skip ZRTP transport header part) */
|
||||
void *message;
|
||||
|
||||
/** ZRTP packet type (ZRTP_NONE in case of non command packet) */
|
||||
zrtp_msg_type_t type;
|
||||
|
||||
/** Straightened RTP/ZRTP sequence number in host mode */
|
||||
uint32_t seq;
|
||||
|
||||
/** RTP SSRC/ZRTP in network mode */
|
||||
uint32_t ssrc;
|
||||
} zrtp_rtp_info_t;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Retained secrets container
|
||||
* Contains the session's shared secret values and related flags restored from
|
||||
* the cache. Every subsequent stream within a session uses these values
|
||||
* through @ref zrtp_proto_secret_t pointers. By definition, different ZRTP
|
||||
* streams can't change secret values. Secret flags are protected against race
|
||||
* conditions by the mutex \c _protector. For internal use only.
|
||||
*/
|
||||
typedef struct zrtp_secrets_t
|
||||
{
|
||||
/** First retained secret RS1. */
|
||||
zrtp_shared_secret_t *rs1;
|
||||
|
||||
/** Second retained secret RS1. */
|
||||
zrtp_shared_secret_t *rs2;
|
||||
|
||||
/** User-defined secret. */
|
||||
zrtp_shared_secret_t *auxs;
|
||||
|
||||
/** PBX Secret for trusted MiTMs. */
|
||||
zrtp_shared_secret_t *pbxs;
|
||||
|
||||
/** Bit-map to summarize shared secrets "Cached" flags. */
|
||||
uint32_t cached;
|
||||
uint32_t cached_curr;
|
||||
|
||||
/** Bit-map to summarize shared secrets "Matches" flags. */
|
||||
uint32_t matches;
|
||||
uint32_t matches_curr;
|
||||
|
||||
/** Bit-map to summarize shared secrets "Wrongs" flags. */
|
||||
uint32_t wrongs;
|
||||
uint32_t wrongs_curr;
|
||||
|
||||
/** This flag equals one if the secrets have been uploaded from the cache. */
|
||||
uint8_t is_ready;
|
||||
} zrtp_secrets_t;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Protocol shared secret
|
||||
* Wrapper around the session shared secrets \ref zrtp_shared_secret. Used
|
||||
* for ID storing and secret sorting according to ZRTP ID sec. 5.4.4.
|
||||
*/
|
||||
typedef struct zrtp_proto_secret_t
|
||||
{
|
||||
/** Local-side secret ID */
|
||||
zrtp_string8_t id;
|
||||
|
||||
/** Remote-side secret ID */
|
||||
zrtp_string8_t peer_id;
|
||||
|
||||
/** Pointer to the binary value and set of related flags */
|
||||
zrtp_shared_secret_t *secret;
|
||||
} zrtp_proto_secret_t;
|
||||
|
||||
|
||||
/**
|
||||
* @brief ZRTP messages cache
|
||||
* This structure contains ZRTP messages prepared for sending or received from
|
||||
* the other side. This scheme allows speed-ups the resending of packets and
|
||||
* computing message hashes, and makes resending thread-safe. Besides packets,
|
||||
* tasks retries are stored as well.
|
||||
*/
|
||||
typedef struct zrtp_stream_mescache_t
|
||||
{
|
||||
zrtp_packet_Hello_t peer_hello;
|
||||
zrtp_packet_Hello_t hello;
|
||||
zrtp_packet_GoClear_t goclear;
|
||||
zrtp_packet_Commit_t peer_commit;
|
||||
zrtp_packet_Commit_t commit;
|
||||
zrtp_packet_DHPart_t peer_dhpart;
|
||||
zrtp_packet_DHPart_t dhpart;
|
||||
zrtp_packet_Confirm_t confirm;
|
||||
zrtp_string32_t h0;
|
||||
zrtp_packet_Confirm_t peer_confirm;
|
||||
zrtp_packet_Error_t error;
|
||||
zrtp_packet_SASRelay_t sasrelay;
|
||||
|
||||
zrtp_retry_task_t hello_task;
|
||||
zrtp_retry_task_t goclear_task;
|
||||
zrtp_retry_task_t dh_task;
|
||||
zrtp_retry_task_t commit_task;
|
||||
zrtp_retry_task_t dhpart_task;
|
||||
zrtp_retry_task_t confirm_task;
|
||||
zrtp_retry_task_t error_task;
|
||||
zrtp_retry_task_t errorack_task;
|
||||
zrtp_retry_task_t sasrelay_task;
|
||||
|
||||
/*!
|
||||
* Hash pre-image of the remote party Hello retrieved from Signaling. When
|
||||
* user calls zrtp_signaling_hash_set() libzrtp stores hash value in this
|
||||
* variable and checks all incoming Hello-s to prevent DOS attacks.
|
||||
*/
|
||||
zrtp_string64_t signaling_hash;
|
||||
} zrtp_stream_mescache_t;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Crypto context for Diffie-Hellman calculations
|
||||
* Used only by DH streams to store Diffie-Hellman calculations. Allocated on
|
||||
* protocol initialization and released on switching to SECURE mode.
|
||||
*/
|
||||
typedef struct zrtp_dh_crypto_context_t
|
||||
{
|
||||
/** DH secret value */
|
||||
struct BigNum sv;
|
||||
|
||||
/** DH public value */
|
||||
struct BigNum pv;
|
||||
|
||||
/** DH public value recalculated for remote side */
|
||||
struct BigNum peer_pv;
|
||||
|
||||
/** DH shared secret. DHSS = hash(DHResult) */
|
||||
zrtp_string64_t dhss;
|
||||
|
||||
unsigned int initialized_with;
|
||||
} zrtp_dh_crypto_context_t;
|
||||
|
||||
|
||||
/*!
|
||||
* \brief Crypto context for ECDSA calculations
|
||||
* Used to store ECDSA keys and calculations. Allocated on
|
||||
* protocol initialization and released on switching to SECURE mode.
|
||||
*/
|
||||
typedef struct zrtp_dsa_crypto_context_t
|
||||
{
|
||||
struct BigNum sv; /*!< DSA secret value */
|
||||
struct BigNum pv; /*!< DSA public value */
|
||||
struct BigNum peer_pv;/*!< DSA public value for some remote side */
|
||||
} zrtp_dsa_crypto_context_t;
|
||||
|
||||
|
||||
/**
|
||||
* @brief Protocol crypto context
|
||||
* Used as temporary storage for ZRTP crypto data during protocol running.
|
||||
* Unlike \ref zrtp_stream_crypto_t this context is needed only during key
|
||||
* negotiation and destroyed on switching to SECURE state.
|
||||
*/
|
||||
typedef struct zrtp_proto_crypto_t
|
||||
{
|
||||
/** ZRTP */
|
||||
zrtp_string128_t kdf_context;
|
||||
|
||||
/** ZRTP stream key */
|
||||
zrtp_string64_t s0;
|
||||
|
||||
/** Local hvi value for the hash commitment: hvi or nonce for Multistream. */
|
||||
zrtp_string64_t hv;
|
||||
|
||||
/** Remove hvi value for the hash commitment: hvi or nonce for Multistream. */
|
||||
zrtp_string64_t peer_hv;
|
||||
|
||||
/** Total messages hash. See ZRTP ID 5.4.4/5.5.4 */
|
||||
zrtp_string64_t mes_hash;
|
||||
|
||||
/** RS1 */
|
||||
zrtp_proto_secret_t rs1;
|
||||
|
||||
/** RS2 */
|
||||
zrtp_proto_secret_t rs2;
|
||||
|
||||
/** User-Defined secret */
|
||||
zrtp_proto_secret_t auxs;
|
||||
|
||||
/** PBX secret */
|
||||
zrtp_proto_secret_t pbxs;
|
||||
} zrtp_proto_crypto_t;
|
||||
|
||||
/*!
|
||||
* \brief ZRTP protocol structure
|
||||
* Protocol structure is responsible for ZRTP protocol logic (CLEAR-SECURE
|
||||
* switching) and RTP media encrypting/decrypting. The protocol is created
|
||||
* right after the discovery phase and destroyed on stream closing.
|
||||
*/
|
||||
struct zrtp_protocol_t
|
||||
{
|
||||
/** Protocol mode: responder or initiator. */
|
||||
zrtp_statemachine_type_t type;
|
||||
|
||||
/** Context for storing protocol crypto data. */
|
||||
zrtp_proto_crypto_t* cc;
|
||||
|
||||
/** SRTP crypto engine */
|
||||
zrtp_srtp_ctx_t* _srtp;
|
||||
|
||||
/** Back-pointer to ZRTP stream context. */
|
||||
zrtp_stream_t *context;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Stream-persistent crypto options.
|
||||
* Unlike \ref zrtp_proto_crypto_t these data are kept after switching to Secure
|
||||
* state or stopping the protocol; used to sign/verify Confirm and GoClear packets.
|
||||
*/
|
||||
typedef struct zrtp_stream_crypto_t
|
||||
{
|
||||
/** Local side hmackey value. */
|
||||
zrtp_string64_t hmackey;
|
||||
|
||||
/** Remote side hmackey value. */
|
||||
zrtp_string64_t peer_hmackey;
|
||||
|
||||
/** Local side ZRTP key for Confirms protection. */
|
||||
zrtp_string64_t zrtp_key;
|
||||
|
||||
/** Remote side ZRTP key for Confirms verification. */
|
||||
zrtp_string64_t peer_zrtp_key;
|
||||
} zrtp_stream_crypto_t;
|
||||
|
||||
|
||||
/**
|
||||
* @brief stream media context. Contains all RTP media-related information.
|
||||
*/
|
||||
typedef struct zrtp_media_context_t
|
||||
{
|
||||
/** The highest ZRTP message sequence number received. */
|
||||
uint32_t high_in_zrtp_seq;
|
||||
|
||||
/** The last ZRTP message sequence number sent. */
|
||||
uint32_t high_out_zrtp_seq;
|
||||
|
||||
/** The highest RTP media sequence number received; used by SRTP. */
|
||||
uint32_t high_in_media_seq;
|
||||
|
||||
/** The highest RTP media sequence number sent; used by SRTP. */
|
||||
uint32_t high_out_media_seq;
|
||||
|
||||
/** SSRC of the RTP media stream associated with the current ZRTP stream. */
|
||||
uint32_t ssrc;
|
||||
} zrtp_media_context_t;
|
||||
|
||||
/*!
|
||||
* \brief ZRTP stream context
|
||||
* \warning Fields with prefix "_" are for internal use only.
|
||||
*/
|
||||
struct zrtp_stream_t
|
||||
{
|
||||
/*! Stream unique identifier for debug purposes */
|
||||
zrtp_id_t id;
|
||||
|
||||
/*!
|
||||
* \brief Stream mode
|
||||
* This field defines libzrtp behavior related to specified contexts. See
|
||||
* <A HREF="http://zfoneproject.com/zrtp_ietf.html">"ZRTP Internet Draft"</A>
|
||||
* and \ref usage for additional information about stream types and their
|
||||
* processing logic.
|
||||
*/
|
||||
zrtp_stream_mode_t mode;
|
||||
|
||||
/*!
|
||||
* \brief Defines ZRTP role in trusted MitM scheme.
|
||||
* The value of this mode determines the behavior of the ZRTP machine
|
||||
* according to it's role in the MitM scheme. Initially the mode is
|
||||
* ZRTP_MITM_MODE_UNKN and then changes on protocol running.
|
||||
*/
|
||||
zrtp_mitm_mode_t mitm_mode;
|
||||
|
||||
/*!
|
||||
* \brief Previous ZRTP protocol states
|
||||
* Used in analysis to determine the reason for a switch from one state to
|
||||
* another. Enabled by _zrtp_change_state(.
|
||||
*/
|
||||
zrtp_state_t prev_state;
|
||||
|
||||
/** 1 means that peer Hello have been raceived within current ZRTP session */
|
||||
uint8_t is_hello_received;
|
||||
|
||||
/*!< Reflects current state of ZRTP protocol */
|
||||
zrtp_state_t state;
|
||||
|
||||
/**
|
||||
* @brief Persistent stream crypto options.
|
||||
* Stores persistent crypto data needed after Confirmation. This data can be
|
||||
* cleared only when the stream is destroyed.
|
||||
*/
|
||||
zrtp_stream_crypto_t cc;
|
||||
|
||||
/** DH crypto context used in PK calculations */
|
||||
zrtp_dh_crypto_context_t dh_cc;
|
||||
|
||||
/*!
|
||||
* \brief Pointer to the ZRTP protocol implementation
|
||||
* The protocol structure stores all crypto data during the securing
|
||||
* procedure. After switching to SECURE state the protocol clears all
|
||||
* crypto sources and performs traffic encryption/decryption.
|
||||
*/
|
||||
zrtp_protocol_t *protocol;
|
||||
|
||||
/*!< Holder for RTP/ZRTP media stream options. */
|
||||
zrtp_media_context_t media_ctx;
|
||||
|
||||
/*!< ZRTP messages and task retries cache */
|
||||
zrtp_stream_mescache_t messages;
|
||||
|
||||
/*!
|
||||
* Current value of "allowclear" option exchanged during ZRTP negotiation.
|
||||
* Available for reading in SECURE state.
|
||||
*/
|
||||
uint8_t allowclear;
|
||||
|
||||
/*!
|
||||
* This flag shows when remote side is "passive" (has license mode PASSIVE)
|
||||
* Available for reading in CLEAR state.
|
||||
*/
|
||||
uint8_t peer_passive;
|
||||
|
||||
/*!
|
||||
* \brief actual lifetime of stream secrets
|
||||
* This variable contains the interval for retaining secrets within an
|
||||
* established stream. In accordance with <A
|
||||
* HREF="http://zfoneproject.com/zrtp_ietf.html">"ZRTP Internet Draft"</A>
|
||||
* this value is calculated as the minimal of local and remote TTLs after
|
||||
* confirmation. Value is given in seconds and can be read in the SECURE
|
||||
* state. It may be used in displaying session parameters.
|
||||
*/
|
||||
uint32_t cache_ttl;
|
||||
|
||||
/*!
|
||||
* \brief Peer disclose bit Indicates the ability of the remote side to
|
||||
* disclose its session key. Specifies that the remote side allows call
|
||||
* monitoring. If this flag is set, the end user must be informed. It can
|
||||
* be read in the SECURE state.
|
||||
*/
|
||||
uint8_t peer_disclose_bit;
|
||||
|
||||
/*!
|
||||
* \brief Last protocol error code
|
||||
* If there is a mistake in running the protocol, zrtp_event_callback()
|
||||
* will be called and the required error code will be set to this field.
|
||||
* An error code is the numeric representation of ZRTP errors defined in
|
||||
* the draft. All error codes are defined by \ref zrtp_protocol_error_t.
|
||||
*/
|
||||
zrtp_protocol_error_t last_error;
|
||||
|
||||
/**
|
||||
* Duplicates MiTM flag from peer Hello message
|
||||
*/
|
||||
uint8_t peer_mitm_flag;
|
||||
|
||||
/**
|
||||
* Duplicates U flag from peer Hello message
|
||||
*/
|
||||
uint8_t peer_super_flag;
|
||||
|
||||
/*!
|
||||
* \brief Pointer to the concurrent DH stream
|
||||
* If Commit messages are sent by both ZRTP endpoints at the same time, but
|
||||
* are received in different media streams, "tie-breaking" rules apply - the
|
||||
* Commit message with the lowest hvi value is discarded and the other side
|
||||
* becomes the initiator. The media stream in which the Commit was sent will
|
||||
* proceed through the ZRTP exchange while the media stream with the discarded
|
||||
* Commit must wait for the completion of the other ZRTP exchange. A pointer
|
||||
* to that "waiting" stream is stored in \c _concurrent. When the running
|
||||
* stream is switched to "Initiating Secure" the concurrent stream is resumed.
|
||||
*/
|
||||
zrtp_stream_t *concurrent;
|
||||
|
||||
/** Back-pointer to the ZRTP global data */
|
||||
zrtp_global_t *zrtp;
|
||||
|
||||
/** Pointer to parent session context. Used for back capability */
|
||||
zrtp_session_t *session;
|
||||
|
||||
/*!< Public key exchange component used within current stream */
|
||||
zrtp_pk_scheme_t *pubkeyscheme;
|
||||
|
||||
/*!
|
||||
* Pointer to the user data. This pointer can be used for fast access to
|
||||
* some additional data attached to this ZRTP stream by the user application
|
||||
*/
|
||||
void *usr_data;
|
||||
|
||||
/*!
|
||||
* Pointer to the peer stream during a trusted MiTM call.
|
||||
* @sa zrtp_link_mitm_calls()
|
||||
*/
|
||||
zrtp_stream_t *linked_mitm;
|
||||
|
||||
/*!
|
||||
* \brief Stream data protector
|
||||
* A mutex is used to avoid race conditions during asynchronous calls
|
||||
* (zrtp_stream_secure(), zrtp_stream_clear() etc.) in parallel to the main
|
||||
* processing loop zrtp_process_rtp/srtp().
|
||||
*/
|
||||
zrtp_mutex_t* stream_protector;
|
||||
};
|
||||
|
||||
|
||||
/*!
|
||||
* \brief ZRTP session context
|
||||
* Describes the state of the ZRTP session. Stores data necessary and sufficient
|
||||
* for processing ZRTP sessions. Encapsulates ZRTP streams and all crypto-data.
|
||||
*/
|
||||
struct zrtp_session_t
|
||||
{
|
||||
/*! Session unique identifier for debug purposes */
|
||||
zrtp_id_t id;
|
||||
|
||||
/*!
|
||||
* \brief Local-side ZID
|
||||
* The unique 12-characters string that identifies the local ZRTP endpoint.
|
||||
* It must be generated by the user application on installation and used
|
||||
* permanently for every ZRTP session. This ID allows remote peers to
|
||||
* recognize this ZRTP endpoint.
|
||||
*/
|
||||
zrtp_string16_t zid;
|
||||
|
||||
/*!
|
||||
* \brief Remote-side ZID
|
||||
* Extracted from the Hello packet of the very first ZRTP stream. Uniquely
|
||||
* identifies the remote ZRTP peer. Used in combination with the local zid
|
||||
* to restore secrets and other data from the previous call. Available for
|
||||
* reading after the discovering phase.
|
||||
*/
|
||||
zrtp_string16_t peer_zid;
|
||||
|
||||
/*!< ZRTP profile, defined crypto options and behavior for every stream within current session */
|
||||
zrtp_profile_t profile;
|
||||
|
||||
/*
|
||||
* Signaling Role which protocol was started with, one of zrtp_signaling_role_t values.
|
||||
*/
|
||||
unsigned signaling_role;
|
||||
|
||||
/*!
|
||||
* \brief Set of retained secrets and flags for the current ZRTP session.
|
||||
* libzrtp uploads secrets and flags from the cache on the very first
|
||||
* stream within every ZRTP session.
|
||||
*/
|
||||
zrtp_secrets_t secrets;
|
||||
|
||||
/*!< ZRTP session key used to extend ZRTP session without additional DH exchange */
|
||||
zrtp_string64_t zrtpsess;
|
||||
|
||||
/** First SAS base32/256 string */
|
||||
zrtp_string16_t sas1;
|
||||
|
||||
/** Second SAS 256 string */
|
||||
zrtp_string16_t sas2;
|
||||
|
||||
/** Binary SAS digest (ZRTP_SAS_DIGEST_LENGTH bytes) */
|
||||
zrtp_string32_t sasbin;
|
||||
|
||||
/*!< Back-pointer to the ZRTP global data */
|
||||
zrtp_global_t *zrtp;
|
||||
|
||||
/*!< Back-pointer to user data associated with this session context. */
|
||||
void *usr_data;
|
||||
|
||||
/** Hash component used within current session */
|
||||
zrtp_hash_t *hash;
|
||||
|
||||
/** Cipher component used within current session */
|
||||
zrtp_cipher_t *blockcipher;
|
||||
|
||||
/** SRTP authentication component used within current session */
|
||||
zrtp_auth_tag_length_t *authtaglength;
|
||||
|
||||
/** SAS scheme component used within current session */
|
||||
zrtp_sas_scheme_t *sasscheme;
|
||||
|
||||
/** List of ZRTP streams attached to the session. */
|
||||
zrtp_stream_t streams[ZRTP_MAX_STREAMS_PER_SESSION];
|
||||
|
||||
/** This object is used to synchronize all stream list operations */
|
||||
zrtp_mutex_t* streams_protector;
|
||||
|
||||
/** Prevents race conditions if streams start simultaneously. */
|
||||
zrtp_mutex_t* init_protector;
|
||||
|
||||
/**
|
||||
* This flag indicates that possible MiTM attach was detected during the protocol exchange.
|
||||
*/
|
||||
uint8_t mitm_alert_detected;
|
||||
|
||||
mlist_t _mlist;
|
||||
};
|
||||
|
||||
/*! \} */
|
||||
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Data types and definitions for SRTP */
|
||||
/*===========================================================================*/
|
||||
|
||||
#if ZRTP_BYTE_ORDER == ZBO_LITTLE_ENDIAN
|
||||
|
||||
/**
|
||||
* RTP header structure
|
||||
* @ingroup dev_srtp
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
uint16_t cc:4; /** CSRC count */
|
||||
uint16_t x:1; /** header extension flag */
|
||||
uint16_t p:1; /** padding flag */
|
||||
uint16_t version:2; /** protocol version */
|
||||
uint16_t pt:7; /** payload type */
|
||||
uint16_t m:1; /** marker bit */
|
||||
uint16_t seq; /** sequence number */
|
||||
uint32_t ts; /** timestamp */
|
||||
uint32_t ssrc; /** synchronization source */
|
||||
} zrtp_rtp_hdr_t;
|
||||
|
||||
/**
|
||||
* RTCP header structure
|
||||
* @ingroup dev_srtp
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
unsigned char rc:5; /** reception report count */
|
||||
unsigned char p:1; /** padding flag */
|
||||
unsigned char version:2; /** protocol version */
|
||||
unsigned char pt:8; /** payload type */
|
||||
uint16_t len; /** length */
|
||||
uint32_t ssrc; /** synchronization source */
|
||||
} zrtp_rtcp_hdr_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int index:31; /** srtcp packet index in network order! */
|
||||
unsigned int e:1; /** encrypted? 1=yes */
|
||||
/** optional mikey/etc go here */
|
||||
/** and then the variable-length auth tag */
|
||||
} zrtp_rtcp_trailer_t;
|
||||
|
||||
#else
|
||||
|
||||
/**
|
||||
* RTP header structure
|
||||
* @ingroup dev_srtp
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
uint16_t version:2; /** protocol version */
|
||||
uint16_t p:1; /** padding flag */
|
||||
uint16_t x:1; /** header extension flag */
|
||||
uint16_t cc:4; /** CSRC count */
|
||||
uint16_t m:1; /** marker bit */
|
||||
uint16_t pt:7; /** payload type */
|
||||
uint16_t seq; /** sequence number */
|
||||
uint32_t ts; /** timestamp */
|
||||
uint32_t ssrc; /** synchronization source */
|
||||
} zrtp_rtp_hdr_t;
|
||||
|
||||
/**
|
||||
* RTCP header structure
|
||||
* @ingroup dev_srtp
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
unsigned char version:2; /** protocol version */
|
||||
unsigned char p:1; /** padding flag */
|
||||
unsigned char rc:5; /** reception report count */
|
||||
unsigned char pt:8; /** payload type */
|
||||
uint16_t len; /** length */
|
||||
uint32_t ssrc; /** synchronization source */
|
||||
} zrtp_rtcp_hdr_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int e:1; /** encrypted? 1=yes */
|
||||
unsigned int index:31; /** srtcp packet index */
|
||||
} zrtp_rtcp_trailer_t;
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* RTP header extension structure
|
||||
* @ingroup dev_srtp
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
uint16_t profile_specific; /** profile-specific info */
|
||||
uint16_t length; /** number of 32-bit words in extension */
|
||||
} zrtp_rtp_hdr_xtnd_t;
|
||||
|
||||
|
||||
/** \endmanonly */
|
||||
|
||||
#endif /* __ZRTP_TYPES_H__ */
|
|
@ -1,19 +0,0 @@
|
|||
/*
|
||||
* libZRTP SDK library, implements the ZRTP secure VoIP protocol.
|
||||
* Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
* Contact: http://philzimmermann.com
|
||||
* For licensing and other legal details, see the file zrtp_legal.c.
|
||||
*
|
||||
* Viktor Krykun <v.krikun at zfoneproject.com>
|
||||
*/
|
||||
|
||||
#ifndef __ZRTP_VERSION_H__
|
||||
#define __ZRTP_VERSION_H__
|
||||
|
||||
#define LIBZRTP_VERSION_MAJOR 1
|
||||
|
||||
#define LIBZRTP_VERSION_MINOR 20
|
||||
#define LIBZRTP_VERSION_BUILD 616
|
||||
#define LIBZRTP_VERSION_STR "v1.20 616"
|
||||
|
||||
#endif /*__ZRTP_VERSION_H__*/
|
|
@ -1,72 +0,0 @@
|
|||
LOCAL_PATH := $(call my-dir)/../../..
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := libzrtp
|
||||
MY_SRC_PATH := src
|
||||
|
||||
MY_SRC_FILES := $(MY_SRC_PATH)/zrtp.c \
|
||||
$(MY_SRC_PATH)/zrtp_crc.c \
|
||||
$(MY_SRC_PATH)/zrtp_crypto_aes.c \
|
||||
$(MY_SRC_PATH)/zrtp_crypto_atl.c \
|
||||
$(MY_SRC_PATH)/zrtp_crypto_hash.c \
|
||||
$(MY_SRC_PATH)/zrtp_crypto_pk.c \
|
||||
$(MY_SRC_PATH)/zrtp_crypto_sas.c \
|
||||
$(MY_SRC_PATH)/zrtp_datatypes.c \
|
||||
$(MY_SRC_PATH)/zrtp_engine.c \
|
||||
$(MY_SRC_PATH)/zrtp_engine_driven.c \
|
||||
$(MY_SRC_PATH)/zrtp_iface_cache.c \
|
||||
$(MY_SRC_PATH)/zrtp_iface_scheduler.c \
|
||||
$(MY_SRC_PATH)/zrtp_iface_sys.c \
|
||||
$(MY_SRC_PATH)/zrtp_initiator.c \
|
||||
$(MY_SRC_PATH)/zrtp_legal.c \
|
||||
$(MY_SRC_PATH)/zrtp_list.c \
|
||||
$(MY_SRC_PATH)/zrtp_log.c \
|
||||
$(MY_SRC_PATH)/zrtp_pbx.c \
|
||||
$(MY_SRC_PATH)/zrtp_protocol.c \
|
||||
$(MY_SRC_PATH)/zrtp_responder.c \
|
||||
$(MY_SRC_PATH)/zrtp_rng.c \
|
||||
$(MY_SRC_PATH)/zrtp_srtp_builtin.c \
|
||||
$(MY_SRC_PATH)/zrtp_srtp_dm.c \
|
||||
$(MY_SRC_PATH)/zrtp_string.c \
|
||||
$(MY_SRC_PATH)/zrtp_utils.c \
|
||||
$(MY_SRC_PATH)/zrtp_utils_proto.c
|
||||
|
||||
MY_SRC_FILES += third_party/bgaes/aes_modes.c \
|
||||
third_party/bgaes/sha2.c \
|
||||
third_party/bgaes/sha1.c \
|
||||
third_party/bgaes/aestab.c \
|
||||
third_party/bgaes/aeskey.c \
|
||||
third_party/bgaes/aescrypt.c
|
||||
|
||||
MY_SRC_FILES += third_party/bnlib/bn.c \
|
||||
third_party/bnlib/bn32.c \
|
||||
third_party/bnlib/bninit32.c \
|
||||
third_party/bnlib/lbn32.c \
|
||||
third_party/bnlib/lbnmem.c \
|
||||
third_party/bnlib/legal.c
|
||||
|
||||
LOCAL_SRC_FILES := $(MY_SRC_FILES)
|
||||
|
||||
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
|
||||
LOCAL_C_INCLUDES += $(LOCAL_PATH)/third_party/bnlib
|
||||
LOCAL_C_INCLUDES += $(LOCAL_PATH)/third_party/bgaes
|
||||
|
||||
LOCAL_ARM_MODE := arm
|
||||
LOCAL_CFLAGS := -DANDROID_NDK=5
|
||||
|
||||
#include $(BUILD_STATIC_LIBRARY)
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
#
|
||||
# Dummy shared library to build libzrtp.a
|
||||
#
|
||||
|
||||
# include $(CLEAR_VARS)
|
||||
#
|
||||
# LOCAL_MODULE := libzrtp-dummy
|
||||
# LOCAL_STATIC_LIBRARIES := libzrtp
|
||||
#
|
||||
# include $(BUILD_SHARED_LIBRARY)
|
|
@ -1,79 +0,0 @@
|
|||
/*
|
||||
============================================================================
|
||||
Name : CDelayRuner.cpp
|
||||
Author : R. Drutsky
|
||||
Version : 1.0
|
||||
Copyright : Copyright (c) 2010 Soft Industry
|
||||
Description : CCDelayRuner implementation
|
||||
============================================================================
|
||||
*/
|
||||
|
||||
#include "DelayRuner.h"
|
||||
#include "zrtp_iface_system.h"
|
||||
|
||||
void zrtp_internal_delete_task_from_list(zrtp_stream_t* ctx, zrtp_retry_task_t* ztask);
|
||||
|
||||
CDelayRuner::CDelayRuner() :
|
||||
CActive(EPriorityLow) // Standard priority
|
||||
{
|
||||
}
|
||||
|
||||
CDelayRuner* CDelayRuner::NewLC()
|
||||
{
|
||||
CDelayRuner* self = new (ELeave) CDelayRuner();
|
||||
CleanupStack::PushL(self);
|
||||
self->ConstructL();
|
||||
return self;
|
||||
}
|
||||
|
||||
CDelayRuner* CDelayRuner::NewL()
|
||||
{
|
||||
CDelayRuner* self = CDelayRuner::NewLC();
|
||||
CleanupStack::Pop(); // self;
|
||||
return self;
|
||||
}
|
||||
|
||||
void CDelayRuner::ConstructL()
|
||||
{
|
||||
User::LeaveIfError(iTimer.CreateLocal()); // Initialize timer
|
||||
CActiveScheduler::Add(this); // Add to scheduler
|
||||
}
|
||||
|
||||
CDelayRuner::~CDelayRuner()
|
||||
{
|
||||
Cancel(); // Cancel any request, if outstanding
|
||||
iTimer.Close(); // Destroy the RTimer object
|
||||
// Delete instance variables if any
|
||||
}
|
||||
|
||||
void CDelayRuner::DoCancel()
|
||||
{
|
||||
iTimer.Cancel();
|
||||
}
|
||||
|
||||
void CDelayRuner::StartL(zrtp_stream_t *ctx, zrtp_retry_task_t* ztask)
|
||||
{
|
||||
Cancel(); // Cancel any request, just to be sure
|
||||
//iState = EUninitialized;
|
||||
iCtx = ctx;
|
||||
iZTask = ztask;
|
||||
iTimer.After(iStatus, ztask->timeout * 1000); // Set for later
|
||||
SetActive(); // Tell scheduler a request is active
|
||||
}
|
||||
|
||||
void CDelayRuner::RunL()
|
||||
{
|
||||
if (iStatus == KErrNone)
|
||||
{
|
||||
// Do something useful
|
||||
iZTask->_is_busy = 1 ; // may be we don't need this
|
||||
(iZTask->callback)(iCtx,iZTask);
|
||||
iZTask->_is_busy = 0 ; // may be we don't need this
|
||||
}
|
||||
zrtp_internal_delete_task_from_list(iCtx,iZTask);
|
||||
}
|
||||
|
||||
TInt CDelayRuner::RunError(TInt aError)
|
||||
{
|
||||
return aError;
|
||||
}
|
|
@ -1,72 +0,0 @@
|
|||
/*
|
||||
============================================================================
|
||||
Name : CDelayRuner.h
|
||||
Author : R. Drutsky
|
||||
Version : 1.0
|
||||
Copyright : Copyright (c) 2010 Soft Industry
|
||||
Description : CDelayRuner declaration
|
||||
============================================================================
|
||||
*/
|
||||
|
||||
#ifndef DELAYRUNER_H
|
||||
#define DELAYRUNER_H
|
||||
|
||||
#include <e32base.h> // For CActive, link against: euser.lib
|
||||
#include <e32std.h> // For RTimer, link against: euser.lib
|
||||
|
||||
#include <zrtp.h>
|
||||
class CDelayRuner : public CActive
|
||||
{
|
||||
public:
|
||||
// Cancel and destroy
|
||||
~CDelayRuner();
|
||||
|
||||
// Two-phased constructor.
|
||||
static CDelayRuner* NewL();
|
||||
|
||||
// Two-phased constructor.
|
||||
static CDelayRuner* NewLC();
|
||||
|
||||
public:
|
||||
// New functions
|
||||
// Function for making the initial request
|
||||
void StartL(zrtp_stream_t *ctx, zrtp_retry_task_t* ztask);
|
||||
|
||||
private:
|
||||
// C++ constructor
|
||||
CDelayRuner();
|
||||
|
||||
// Second-phase constructor
|
||||
void ConstructL();
|
||||
|
||||
private:
|
||||
// From CActive
|
||||
// Handle completion
|
||||
void RunL();
|
||||
|
||||
// How to cancel me
|
||||
void DoCancel();
|
||||
|
||||
// Override to handle leaves from RunL(). Default implementation causes
|
||||
// the active scheduler to panic.
|
||||
TInt RunError(TInt aError);
|
||||
|
||||
private:
|
||||
enum TCDelayRunerState
|
||||
{
|
||||
EUninitialized, // Uninitialized
|
||||
EInitialized, // Initalized
|
||||
EError
|
||||
// Error condition
|
||||
};
|
||||
|
||||
private:
|
||||
TInt iState; // State of the active object
|
||||
RTimer iTimer; // Provides async timing service
|
||||
|
||||
zrtp_stream_t *iCtx;
|
||||
zrtp_retry_task_t * iZTask;
|
||||
|
||||
};
|
||||
|
||||
#endif // CDELAYRUNER_H
|
|
@ -1 +0,0 @@
|
|||
bldmake bldfiles
|
|
@ -1,13 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2006-2007 Philip R. Zimmermann. All rights reserved.
|
||||
* Contact: http://philzimmermann.com
|
||||
*
|
||||
* Nikolay Popok mailto: <chaser@soft-industry.com>
|
||||
*
|
||||
*/
|
||||
|
||||
PRJ_MMPFILES
|
||||
libzrtp.mmp
|
||||
|
||||
PRJ_PLATFORMS
|
||||
WINSCW GCCE WINC
|
|
@ -1,2 +0,0 @@
|
|||
abld build gcce urel
|
||||
pause
|
|
@ -1,74 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
* Contact: http://philzimmermann.com
|
||||
* For licensing and other legal details, see the file zrtp_legal.c.
|
||||
*/
|
||||
|
||||
TARGET libzrtp.lib
|
||||
TARGETTYPE lib
|
||||
UID 0x0FFFFFF0
|
||||
|
||||
VENDORID 0
|
||||
|
||||
//OPTION GCC +Wno-ctor-dtor-privacy
|
||||
MACRO ZRTP_USE_STACK_MINIM
|
||||
|
||||
USERINCLUDE .
|
||||
|
||||
SOURCEPATH .
|
||||
SOURCE DelayRuner.cpp
|
||||
SOURCE zrtp_iface_symb.cpp
|
||||
|
||||
SOURCEPATH ..\..\third_party\bnlib
|
||||
SOURCE bn.c
|
||||
SOURCE bn32.c
|
||||
SOURCE bninit32.c
|
||||
SOURCE lbn32.c
|
||||
SOURCE lbnmem.c
|
||||
SOURCE legal.c
|
||||
|
||||
SOURCEPATH ..\..\src
|
||||
SOURCE zrtp_crc.c
|
||||
SOURCE zrtp_crypto_aes.c
|
||||
SOURCE zrtp_crypto_atl.c
|
||||
SOURCE zrtp_crypto_hash.c
|
||||
SOURCE zrtp_crypto_pk.c
|
||||
SOURCE zrtp_crypto_sas.c
|
||||
SOURCE zrtp_datatypes.c
|
||||
SOURCE zrtp_engine.c
|
||||
SOURCE zrtp_iface_cache.c
|
||||
SOURCE zrtp_iface_scheduler.c
|
||||
SOURCE zrtp_iface_sys.c
|
||||
SOURCE zrtp_initiator.c
|
||||
SOURCE zrtp_list.c
|
||||
SOURCE zrtp_log.c
|
||||
SOURCE zrtp_pbx.c
|
||||
SOURCE zrtp_protocol.c
|
||||
SOURCE zrtp_responder.c
|
||||
SOURCE zrtp_rng.c
|
||||
SOURCE zrtp_srtp_builtin.c
|
||||
SOURCE zrtp_string.c
|
||||
SOURCE zrtp_utils.c
|
||||
SOURCE zrtp_utils_proto.c
|
||||
SOURCE zrtp.c
|
||||
|
||||
SOURCEPATH ..\..\third_party\bgaes
|
||||
SOURCE aes_modes.c
|
||||
SOURCE aescrypt.c
|
||||
SOURCE aeskey.c
|
||||
SOURCE aestab.c
|
||||
SOURCE sha1.c
|
||||
SOURCE sha2.c
|
||||
|
||||
SYSTEMINCLUDE ..\..\.
|
||||
SYSTEMINCLUDE ..\..\include
|
||||
SYSTEMINCLUDE ..\..\third_party\bnlib
|
||||
SYSTEMINCLUDE ..\..\third_party\bgaes
|
||||
|
||||
SYSTEMINCLUDE \epoc32\include
|
||||
SYSTEMINCLUDE \epoc32\include\libc
|
||||
|
||||
LIBRARY euser.lib
|
||||
|
||||
SOURCEPATH ..\..\src
|
||||
SOURCE zrtp_crypto_ec.c zrtp_crypto_ecdh.c zrtp_crypto_ecdsa.c zrtp_engine_driven.c zrtp_legal.c zrtp_srtp_dm.c
|
|
@ -1,336 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2006-2009 Philip R. Zimmermann. All rights reserved.
|
||||
* Contact: http://philzimmermann.com
|
||||
* For licensing and other legal details, see the file zrtp_legal.c.
|
||||
*/
|
||||
|
||||
#include <charconv.h>
|
||||
#include <stdarg.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <e32msgqueue.h>
|
||||
|
||||
#include <UNISTD.H>
|
||||
#include <e32base.h>
|
||||
#include <e32math.h>
|
||||
|
||||
#include <zrtp.h>
|
||||
|
||||
extern "C"
|
||||
{
|
||||
/**
|
||||
* @brief Get kernel-generated random number
|
||||
* @bug seems not work
|
||||
* @return 32 random bits
|
||||
*/
|
||||
uint32_t zrtp_symbian_kernel_random();
|
||||
|
||||
/**
|
||||
* @brief Pseudo random number: sum of pid's shifted and xored by number of precceses
|
||||
* @return
|
||||
*/
|
||||
uint32_t zrtp_sum_of_pid_and_number_of_poccesses();
|
||||
|
||||
/**
|
||||
* @brief Number of milisecond past from particular date and time
|
||||
* @return
|
||||
*/
|
||||
uint64_t zrtp_get_system_time_crazy();
|
||||
|
||||
/**
|
||||
* @brief Current procces PID
|
||||
* @return PID
|
||||
*/
|
||||
unsigned int zrtp_get_pid();
|
||||
|
||||
/**
|
||||
* @brief Availible memory
|
||||
* @return memory availible on heap
|
||||
*/
|
||||
uint32_t zrtp_get_availible_heap();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
zrtp_status_t zrtp_mutex_init(zrtp_mutex_t **mutex) {
|
||||
RMutex *rmutex = new RMutex();
|
||||
//rmutex->CreateLocal(); was before
|
||||
rmutex->CreateGlobal(KNullDesC);
|
||||
*mutex = (zrtp_mutex_t*) rmutex;
|
||||
return zrtp_status_ok;
|
||||
}
|
||||
|
||||
zrtp_status_t zrtp_mutex_lock(zrtp_mutex_t* mutex) {
|
||||
RMutex *rmutex = (RMutex *) mutex;
|
||||
rmutex->Wait();
|
||||
return zrtp_status_ok;
|
||||
}
|
||||
|
||||
zrtp_status_t zrtp_mutex_unlock(zrtp_mutex_t* mutex) {
|
||||
RMutex *rmutex = (RMutex *) mutex;
|
||||
rmutex->Signal();
|
||||
return zrtp_status_ok;
|
||||
}
|
||||
|
||||
zrtp_status_t zrtp_mutex_destroy(zrtp_mutex_t* mutex) {
|
||||
RMutex *rmutex = (RMutex *) mutex;
|
||||
if (rmutex) {
|
||||
rmutex->Close();
|
||||
delete rmutex;
|
||||
}
|
||||
return zrtp_status_ok;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
zrtp_status_t zrtp_sem_init(zrtp_sem_t** sem, uint32_t value, uint32_t limit) {
|
||||
RSemaphore *rsem = new RSemaphore();
|
||||
//rsem->CreateLocal(value);
|
||||
rsem->CreateGlobal(KNullDesC,value);
|
||||
*sem = (zrtp_sem_t*) rsem;
|
||||
return zrtp_status_ok;
|
||||
}
|
||||
|
||||
zrtp_status_t zrtp_sem_destroy(zrtp_sem_t* sem) {
|
||||
RSemaphore *rsem = (RSemaphore *) sem;
|
||||
if (rsem) {
|
||||
rsem->Close();
|
||||
delete rsem;
|
||||
}
|
||||
return zrtp_status_ok;
|
||||
}
|
||||
|
||||
zrtp_status_t zrtp_sem_wait(zrtp_sem_t* sem) {
|
||||
RSemaphore *rsem = (RSemaphore *) sem;
|
||||
rsem->Wait();
|
||||
return zrtp_status_ok;
|
||||
}
|
||||
|
||||
zrtp_status_t zrtp_sem_trtwait(zrtp_sem_t* sem) {
|
||||
RSemaphore *rsem = (RSemaphore *) sem;
|
||||
rsem->Wait(1000);
|
||||
return zrtp_status_ok;
|
||||
}
|
||||
|
||||
zrtp_status_t zrtp_sem_post(zrtp_sem_t* sem) {
|
||||
RSemaphore *rsem = (RSemaphore *) sem;
|
||||
rsem->Signal();
|
||||
return zrtp_status_ok;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int zrtp_sleep(unsigned int msec) {
|
||||
TTimeIntervalMicroSeconds32 i(msec *1000);
|
||||
User::After(i);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int zrtp_thread_create(zrtp_thread_routine_t start_routine, void *arg) {
|
||||
RThread h;
|
||||
TBuf<64> thName=_L("zrtp_thread");
|
||||
|
||||
h.Create(thName, start_routine, KDefaultStackSize*2, NULL, arg) ;
|
||||
h.Resume();
|
||||
h.Close();
|
||||
|
||||
return NULL;
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
// For Scheduler
|
||||
#if (defined(ZRTP_USE_BUILTIN_SCEHDULER) && (ZRTP_USE_BUILTIN_SCEHDULER ==1))
|
||||
|
||||
#include "DelayRuner.h"
|
||||
#include "zrtp_error.h"
|
||||
mlist_t tasks_head_s;
|
||||
static uint8_t inited = 0 ;
|
||||
static uint8_t is_running = 0;
|
||||
|
||||
typedef struct {
|
||||
zrtp_stream_t *ctx; /** ZRTP stream context associated with the task */
|
||||
zrtp_retry_task_t *ztask; /** ZRTP stream associated with the task */
|
||||
mlist_t _mlist;
|
||||
CDelayRuner* ao; // Active object
|
||||
} zrtp_sched_task_s_t;
|
||||
|
||||
zrtp_status_t zrtp_def_scheduler_init(zrtp_global_t* zrtp)
|
||||
{
|
||||
zrtp_status_t status = zrtp_status_ok;
|
||||
ZRTP_LOG(3,("symbian","Init start"));
|
||||
if (inited) {
|
||||
return zrtp_status_ok;
|
||||
}
|
||||
|
||||
do {
|
||||
init_mlist(&tasks_head_s);
|
||||
is_running = 1;
|
||||
inited = 1;
|
||||
} while (0);
|
||||
|
||||
ZRTP_LOG(3,("symbian","Init end"));
|
||||
return status;
|
||||
}
|
||||
|
||||
void zrtp_def_scheduler_down()
|
||||
{
|
||||
ZRTP_LOG(3,("symbian","Down start"));
|
||||
mlist_t *node = 0, *tmp = 0;
|
||||
|
||||
if (!inited) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Stop main thread */
|
||||
is_running = 0;
|
||||
// zrtp_sem_post(count);
|
||||
|
||||
/* Then destroy tasks queue and realease all other resources */
|
||||
//zrtp_mutex_lock(protector);
|
||||
|
||||
mlist_for_each_safe(node, tmp, &tasks_head_s) {
|
||||
zrtp_sched_task_s_t* task = mlist_get_struct(zrtp_sched_task_s_t, _mlist, node);
|
||||
if (task->ao!=NULL)
|
||||
{
|
||||
delete task->ao;
|
||||
}
|
||||
zrtp_sys_free(task);
|
||||
}
|
||||
init_mlist(&tasks_head_s);
|
||||
|
||||
// zrtp_mutex_unlock(protector);
|
||||
|
||||
// zrtp_mutex_destroy(protector);
|
||||
// zrtp_sem_destroy(count);
|
||||
|
||||
ZRTP_LOG(3,("symbian","Down end"));
|
||||
inited = 0;
|
||||
}
|
||||
|
||||
|
||||
void zrtp_def_scheduler_call_later(zrtp_stream_t *ctx, zrtp_retry_task_t* ztask)
|
||||
{
|
||||
// ZRTP_LOG(3,("symbian","CallLater start"));
|
||||
//mlist_t *node=0, *tmp=0;
|
||||
mlist_t* last = &tasks_head_s;
|
||||
|
||||
//zrtp_mutex_lock(protector);
|
||||
|
||||
if (!ztask->_is_enabled) {
|
||||
//zrtp_mutex_unlock(protector);
|
||||
return;
|
||||
}
|
||||
|
||||
do {
|
||||
zrtp_sched_task_s_t* new_task = (zrtp_sched_task_s_t*)zrtp_sys_alloc(sizeof(zrtp_sched_task_s_t));
|
||||
if (!new_task) {
|
||||
break;
|
||||
}
|
||||
|
||||
new_task->ctx = ctx;
|
||||
new_task->ztask = ztask;
|
||||
new_task->ao = CDelayRuner::NewL();
|
||||
|
||||
mlist_insert(last, &new_task->_mlist);
|
||||
|
||||
new_task->ao->StartL(ctx,ztask);
|
||||
//zrtp_sem_post(count);
|
||||
} while (0);
|
||||
|
||||
//ZRTP_LOG(3,("symbian","CallLater end"));
|
||||
//zrtp_mutex_unlock(protector);
|
||||
}
|
||||
|
||||
void zrtp_def_scheduler_cancel_call_later(zrtp_stream_t* ctx, zrtp_retry_task_t* ztask)
|
||||
{
|
||||
mlist_t *node=0, *tmp=0;
|
||||
ZRTP_LOG(3,("symbian","CancelcallLater start"));
|
||||
// zrtp_mutex_lock(protector);
|
||||
|
||||
mlist_for_each_safe(node, tmp, &tasks_head_s) {
|
||||
zrtp_sched_task_s_t* task = mlist_get_struct(zrtp_sched_task_s_t, _mlist, node);
|
||||
if ((task->ctx == ctx) && ((task->ztask == ztask) || !ztask)) {
|
||||
task->ao->Cancel();
|
||||
delete task->ao; // Cancel and delete task
|
||||
mlist_del(&task->_mlist);
|
||||
zrtp_sys_free(task);
|
||||
//zrtp_sem_trtwait(count);
|
||||
if (ztask) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
ZRTP_LOG(3,("symbian","CancelCallLater done"));
|
||||
// zrtp_mutex_unlock(protector);
|
||||
}
|
||||
|
||||
void zrtp_internal_delete_task_from_list(zrtp_stream_t* ctx, zrtp_retry_task_t* ztask)
|
||||
{
|
||||
mlist_t *node=0, *tmp=0;
|
||||
ZRTP_LOG(3,("symbian","DelTask begin"));
|
||||
mlist_for_each_safe(node, tmp, &tasks_head_s)
|
||||
{
|
||||
zrtp_sched_task_s_t* task = mlist_get_struct(zrtp_sched_task_s_t, _mlist, node);
|
||||
if ((task->ctx == ctx) && ((task->ztask == ztask) || !ztask))
|
||||
{
|
||||
delete task->ao; // Cancel and delete task
|
||||
mlist_del(&task->_mlist);
|
||||
zrtp_sys_free(task);
|
||||
ZRTP_LOG(3,("symbian","DelTask Del"));
|
||||
//zrtp_sem_trtwait(count);
|
||||
if (ztask)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
ZRTP_LOG(3,("symbian","DelTask end"));
|
||||
}
|
||||
|
||||
void zrtp_def_scheduler_wait_call_later(zrtp_stream_t* ctx)
|
||||
{
|
||||
}
|
||||
#endif // ZRTP_USE_BUILTIN_SCEHDULER
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
unsigned int zrtp_get_pid()
|
||||
{
|
||||
return getpid();
|
||||
}
|
||||
|
||||
uint64_t zrtp_get_system_time_crazy()
|
||||
{
|
||||
TTime time;
|
||||
|
||||
return time.MicroSecondsFrom(TTime(TDateTime (491,EAugust,7,3,37,17,347))).Int64();
|
||||
}
|
||||
|
||||
uint32_t zrtp_sum_of_pid_and_number_of_poccesses()
|
||||
{
|
||||
TFindProcess fp;
|
||||
RProcess procces;
|
||||
TFullName proccesName;
|
||||
uint_32t idsum=1;
|
||||
uint_32t proccesCount=0;
|
||||
fp.Find(KNullDesC);
|
||||
while (fp.Next(proccesName)==KErrNone)
|
||||
{
|
||||
if (procces.Open(proccesName,EOwnerProcess)==KErrNone)
|
||||
{
|
||||
idsum+=procces.Id();
|
||||
proccesCount++;
|
||||
procces.Close();
|
||||
}
|
||||
}
|
||||
idsum = (idsum << 3) xor proccesCount;
|
||||
return idsum;
|
||||
}
|
||||
|
||||
uint32_t zrtp_get_availible_heap()
|
||||
{
|
||||
return User::Heap().MaxLength();
|
||||
}
|
||||
|
||||
uint32_t zrtp_symbian_kernel_random()
|
||||
{
|
||||
return Math::Random();
|
||||
}
|
|
@ -1,262 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="include">
|
||||
<UniqueIdentifier>{c0e76076-0032-445d-8c07-32b6c762622b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="src">
|
||||
<UniqueIdentifier>{a03c0d83-0032-4848-9704-22cdce5ab144}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="bnlib">
|
||||
<UniqueIdentifier>{dbe8a34e-0032-495e-8df7-e82218921e60}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="bgaes">
|
||||
<UniqueIdentifier>{96d1a5c9-0032-4230-a764-a0ed11f434a7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\include\zrtp.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_base.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_config.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_config_user.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_config_win.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_crypto.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_ec.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_engine.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_error.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_iface.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_iface_builtin.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_iface_cache.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_iface_system.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_legal.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_list.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_log.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_pbx.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_protocol.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_srtp.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_srtp_builtin.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_string.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_types.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_utils.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_version.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bnlib\bn.h">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bnlib\bn32.h">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bnlib\bnsize00.h">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bnlib\kludge.h">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bnlib\lbn.h">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bnlib\lbn32.h">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bnlib\lbnmem.h">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bnlib\legal.h">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bgaes\aes.h">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bgaes\aesopt.h">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bgaes\aestab.h">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bgaes\bg2zrtp.h">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bgaes\brg_types.h">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bgaes\sha1.h">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bgaes\sha2.h">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\zrtp.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_crc.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_aes.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_atl.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_hash.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_pk.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_sas.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_datatypes.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_engine.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_engine_driven.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_iface_cache.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_iface_scheduler.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_iface_sys.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_initiator.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_legal.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_list.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_log.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_pbx.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_protocol.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_responder.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_rng.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_srtp_builtin.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_string.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_utils.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_utils_proto.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bnlib\bn.c">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bnlib\bn32.c">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bnlib\bninit32.c">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bnlib\bntest00.c">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bnlib\lbn32.c">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bnlib\lbnmem.c">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bnlib\legal.c">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bgaes\aes_modes.c">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bgaes\aescrypt.c">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bgaes\aeskey.c">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bgaes\aestab.c">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bgaes\sha1.c">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bgaes\sha2.c">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_ec.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_ecdh.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\ChangeLog" />
|
||||
<None Include="..\..\News" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,258 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{C13CC324-0032-4492-9A30-310A6BD64FF5}</ProjectGuid>
|
||||
<RootNamespace>libzrtp.x32</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectName>libzrtp</ProjectName>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
<Import Project="..\..\..\..\w32\extlib.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
<Import Project="..\..\..\..\w32\extlib.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
<Import Project="..\..\..\..\w32\extlib.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
<Import Project="..\..\..\..\w32\extlib.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>../../include;../../third_party/bnlib;../../third_party/bgaes;../../test/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;HAVE_CONFIG_H=1;ZRTP_ENABLE_EC=0;ZRTP_USE_BUILTIN_CACHE=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<StructMemberAlignment>Default</StructMemberAlignment>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
<DisableSpecificWarnings>4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Lib />
|
||||
<PreBuildEvent>
|
||||
<Command>if not exist "$(ProjectDir)..\..\third_party\bnlib\bnconfig.h" copy "$(ProjectDir)..\..\third_party\bnlib\bnconfig.win" "$(ProjectDir)..\..\third_party\bnlib\bnconfig.h"</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>../../include;../../third_party/bnlib;../../third_party/bgaes;../../test/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;HAVE_CONFIG_H=1;ZRTP_ENABLE_EC=0;ZRTP_USE_BUILTIN_CACHE=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<StructMemberAlignment>Default</StructMemberAlignment>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
<DisableSpecificWarnings>4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Lib />
|
||||
<PreBuildEvent>
|
||||
<Command>if not exist "$(ProjectDir)..\..\third_party\bnlib\bnconfig.h" copy "$(ProjectDir)..\..\third_party\bnlib\bnconfig.win" "$(ProjectDir)..\..\third_party\bnlib\bnconfig.h"</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>../../include;../../third_party/bnlib;../../third_party/bgaes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;HAVE_CONFIG_H=1;ZRTP_ENABLE_EC=0;ZRTP_USE_BUILTIN_CACHE=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<StructMemberAlignment>Default</StructMemberAlignment>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
<DisableSpecificWarnings>4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Lib />
|
||||
<PreBuildEvent>
|
||||
<Command>if not exist "$(ProjectDir)..\..\third_party\bnlib\bnconfig.h" copy "$(ProjectDir)..\..\third_party\bnlib\bnconfig.win" "$(ProjectDir)..\..\third_party\bnlib\bnconfig.h"</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>../../include;../../third_party/bnlib;../../third_party/bgaes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;HAVE_CONFIG_H=1;ZRTP_ENABLE_EC=0;ZRTP_USE_BUILTIN_CACHE=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<StructMemberAlignment>Default</StructMemberAlignment>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
<DisableSpecificWarnings>4267;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
<Lib />
|
||||
<PreBuildEvent>
|
||||
<Command>if not exist "$(ProjectDir)..\..\third_party\bnlib\bnconfig.h" copy "$(ProjectDir)..\..\third_party\bnlib\bnconfig.win" "$(ProjectDir)..\..\third_party\bnlib\bnconfig.h"</Command>
|
||||
</PreBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\include\zrtp.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_base.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_config.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_config_user.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_config_win.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_crypto.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_ec.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_engine.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_error.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_iface.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_iface_cache.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_iface_system.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_legal.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_list.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_log.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_pbx.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_protocol.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_srtp.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_srtp_builtin.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_string.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_types.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_version.h" />
|
||||
<ClInclude Include="..\..\third_party\bnlib\bn.h" />
|
||||
<ClInclude Include="..\..\third_party\bnlib\bn32.h" />
|
||||
<ClInclude Include="..\..\third_party\bnlib\bnsize00.h" />
|
||||
<ClInclude Include="..\..\third_party\bnlib\kludge.h" />
|
||||
<ClInclude Include="..\..\third_party\bnlib\lbn.h" />
|
||||
<ClInclude Include="..\..\third_party\bnlib\lbn32.h" />
|
||||
<ClInclude Include="..\..\third_party\bnlib\lbnmem.h" />
|
||||
<ClInclude Include="..\..\third_party\bnlib\legal.h" />
|
||||
<ClInclude Include="..\..\third_party\bgaes\aes.h" />
|
||||
<ClInclude Include="..\..\third_party\bgaes\aesopt.h" />
|
||||
<ClInclude Include="..\..\third_party\bgaes\aestab.h" />
|
||||
<ClInclude Include="..\..\third_party\bgaes\bg2zrtp.h" />
|
||||
<ClInclude Include="..\..\third_party\bgaes\brg_types.h" />
|
||||
<ClInclude Include="..\..\third_party\bgaes\sha1.h" />
|
||||
<ClInclude Include="..\..\third_party\bgaes\sha2.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\zrtp.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_crc.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_aes.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_atl.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_ec.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_ecdh.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_hash.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_pk.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_sas.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_datatypes.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_engine.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_engine_driven.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_iface_cache.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_iface_scheduler.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_iface_sys.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_initiator.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_legal.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_list.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_log.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_pbx.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_protocol.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_responder.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_rng.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_srtp_builtin.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_string.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_utils.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_utils_proto.c" />
|
||||
<ClCompile Include="..\..\third_party\bnlib\bn.c" />
|
||||
<ClCompile Include="..\..\third_party\bnlib\bn32.c" />
|
||||
<ClCompile Include="..\..\third_party\bnlib\bninit32.c" />
|
||||
<ClCompile Include="..\..\third_party\bnlib\bntest00.c" />
|
||||
<ClCompile Include="..\..\third_party\bnlib\lbn32.c" />
|
||||
<ClCompile Include="..\..\third_party\bnlib\lbnmem.c" />
|
||||
<ClCompile Include="..\..\third_party\bnlib\legal.c" />
|
||||
<ClCompile Include="..\..\third_party\bgaes\aes_modes.c" />
|
||||
<ClCompile Include="..\..\third_party\bgaes\aescrypt.c" />
|
||||
<ClCompile Include="..\..\third_party\bgaes\aeskey.c" />
|
||||
<ClCompile Include="..\..\third_party\bgaes\aestab.c" />
|
||||
<ClCompile Include="..\..\third_party\bgaes\sha1.c" />
|
||||
<ClCompile Include="..\..\third_party\bgaes\sha2.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\ChangeLog" />
|
||||
<None Include="..\..\News" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -1,28 +0,0 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual Studio 2008
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libzrtp_test", "libzrtp_test.vcproj", "{BA35741B-8C8E-4A39-9CA1-0CE032D6E4ED}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{C13CC324-E0CA-4492-9A30-310A6BD64FF5} = {C13CC324-E0CA-4492-9A30-310A6BD64FF5}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libzrtp", "libzrtp.vcproj", "{C13CC324-E0CA-4492-9A30-310A6BD64FF5}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{BA35741B-8C8E-4A39-9CA1-0CE032D6E4ED}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{BA35741B-8C8E-4A39-9CA1-0CE032D6E4ED}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{BA35741B-8C8E-4A39-9CA1-0CE032D6E4ED}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{BA35741B-8C8E-4A39-9CA1-0CE032D6E4ED}.Release|Win32.Build.0 = Release|Win32
|
||||
{C13CC324-E0CA-4492-9A30-310A6BD64FF5}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{C13CC324-E0CA-4492-9A30-310A6BD64FF5}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{C13CC324-E0CA-4492-9A30-310A6BD64FF5}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{C13CC324-E0CA-4492-9A30-310A6BD64FF5}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -1,499 +0,0 @@
|
|||
<?xml version="1.0" encoding="windows-1251"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9,00"
|
||||
Name="libzrtp"
|
||||
ProjectGUID="{C13CC324-E0CA-4492-9A30-310A6BD64FF5}"
|
||||
RootNamespace="libzrtp"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../../include;../../third_party/bnlib;../../third_party/bgaes;../../test/include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;HAVE_CONFIG_H=1;ZRTP_ENABLE_EC=1"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
StructMemberAlignment="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="$(OutDir)/libzrtp.lib"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../../include;../../third_party/bnlib;../../third_party/bgaes"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;HAVE_CONFIG_H=1;ZRTP_ENABLE_EC=1"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="0"
|
||||
StructMemberAlignment="0"
|
||||
BufferSecurityCheck="false"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="$(OutDir)/libzrtp.lib"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="include"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_base.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_config.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_config_user.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_config_win.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_crypto.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_ec.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_engine.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_error.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_iface.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_iface_builtin.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_iface_cache.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_iface_system.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_legal.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_list.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_log.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_pbx.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_protocol.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_srtp.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_srtp_builtin.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_string.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_types.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_utils.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_version.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="src"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_crc.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_crypto_aes.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_crypto_atl.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_crypto_ec.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_crypto_ecdh.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_crypto_hash.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_crypto_pk.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_crypto_sas.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_datatypes.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_engine.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_engine_driven.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_iface_cache.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_iface_scheduler.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_iface_sys.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_initiator.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_legal.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_list.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_log.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_pbx.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_protocol.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_responder.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_rng.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_srtp_builtin.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_string.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_utils.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_utils_proto.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="bnlib"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bnlib\bn.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bnlib\bn.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bnlib\bn32.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bnlib\bn32.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bnlib\bninit32.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bnlib\bnsize00.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bnlib\bntest00.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bnlib\kludge.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bnlib\lbn.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bnlib\lbn32.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bnlib\lbn32.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bnlib\lbnmem.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bnlib\lbnmem.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bnlib\legal.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bnlib\legal.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="bgaes"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bgaes\aes.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bgaes\aes_modes.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bgaes\aescrypt.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bgaes\aeskey.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bgaes\aesopt.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bgaes\aestab.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bgaes\aestab.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bgaes\bg2zrtp.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bgaes\brg_types.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bgaes\sha1.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bgaes\sha1.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bgaes\sha2.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bgaes\sha2.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="..\..\ChangeLog"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\News"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
|
@ -1,180 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{C13CC324-0032-4492-9A30-310A6BD64FF5}</ProjectGuid>
|
||||
<RootNamespace>libzrtp.x32</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration).x32\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration).x32\</IntDir>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>../../include;../../third_party/bnlib;../../third_party/bgaes;../../test/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;HAVE_CONFIG_H=1;ZRTP_ENABLE_EC=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<StructMemberAlignment>Default</StructMemberAlignment>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)libzrtp.x32.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>../../include;../../third_party/bnlib;../../third_party/bgaes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;HAVE_CONFIG_H=1;ZRTP_ENABLE_EC=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<StructMemberAlignment>Default</StructMemberAlignment>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)libzrtp.x32.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\include\zrtp.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_base.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_config.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_config_user.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_config_win.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_crypto.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_ec.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_engine.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_error.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_iface.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_iface_builtin.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_iface_cache.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_iface_system.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_legal.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_list.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_log.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_pbx.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_protocol.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_srtp.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_srtp_builtin.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_string.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_types.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_utils.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_version.h" />
|
||||
<ClInclude Include="..\..\third_party\bnlib\bn.h" />
|
||||
<ClInclude Include="..\..\third_party\bnlib\bn32.h" />
|
||||
<ClInclude Include="..\..\third_party\bnlib\bnsize00.h" />
|
||||
<ClInclude Include="..\..\third_party\bnlib\kludge.h" />
|
||||
<ClInclude Include="..\..\third_party\bnlib\lbn.h" />
|
||||
<ClInclude Include="..\..\third_party\bnlib\lbn32.h" />
|
||||
<ClInclude Include="..\..\third_party\bnlib\lbnmem.h" />
|
||||
<ClInclude Include="..\..\third_party\bnlib\legal.h" />
|
||||
<ClInclude Include="..\..\third_party\bgaes\aes.h" />
|
||||
<ClInclude Include="..\..\third_party\bgaes\aesopt.h" />
|
||||
<ClInclude Include="..\..\third_party\bgaes\aestab.h" />
|
||||
<ClInclude Include="..\..\third_party\bgaes\bg2zrtp.h" />
|
||||
<ClInclude Include="..\..\third_party\bgaes\brg_types.h" />
|
||||
<ClInclude Include="..\..\third_party\bgaes\sha1.h" />
|
||||
<ClInclude Include="..\..\third_party\bgaes\sha2.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\zrtp.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_crc.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_aes.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_atl.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_ec.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_ecdh.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_hash.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_pk.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_sas.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_datatypes.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_engine.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_engine_driven.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_iface_cache.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_iface_scheduler.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_iface_sys.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_initiator.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_legal.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_list.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_log.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_pbx.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_protocol.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_responder.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_rng.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_srtp_builtin.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_string.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_utils.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_utils_proto.c" />
|
||||
<ClCompile Include="..\..\third_party\bnlib\bn.c" />
|
||||
<ClCompile Include="..\..\third_party\bnlib\bn32.c" />
|
||||
<ClCompile Include="..\..\third_party\bnlib\bninit32.c" />
|
||||
<ClCompile Include="..\..\third_party\bnlib\bntest00.c" />
|
||||
<ClCompile Include="..\..\third_party\bnlib\lbn32.c" />
|
||||
<ClCompile Include="..\..\third_party\bnlib\lbnmem.c" />
|
||||
<ClCompile Include="..\..\third_party\bnlib\legal.c" />
|
||||
<ClCompile Include="..\..\third_party\bgaes\aes_modes.c" />
|
||||
<ClCompile Include="..\..\third_party\bgaes\aescrypt.c" />
|
||||
<ClCompile Include="..\..\third_party\bgaes\aeskey.c" />
|
||||
<ClCompile Include="..\..\third_party\bgaes\aestab.c" />
|
||||
<ClCompile Include="..\..\third_party\bgaes\sha1.c" />
|
||||
<ClCompile Include="..\..\third_party\bgaes\sha2.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\ChangeLog" />
|
||||
<None Include="..\..\News" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -1,262 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="include">
|
||||
<UniqueIdentifier>{c0e76076-0032-445d-8c07-32b6c762622b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="src">
|
||||
<UniqueIdentifier>{a03c0d83-0032-4848-9704-22cdce5ab144}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="bnlib">
|
||||
<UniqueIdentifier>{dbe8a34e-0032-495e-8df7-e82218921e60}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="bgaes">
|
||||
<UniqueIdentifier>{96d1a5c9-0032-4230-a764-a0ed11f434a7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\include\zrtp.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_base.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_config.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_config_user.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_config_win.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_crypto.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_ec.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_engine.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_error.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_iface.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_iface_builtin.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_iface_cache.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_iface_system.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_legal.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_list.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_log.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_pbx.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_protocol.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_srtp.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_srtp_builtin.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_string.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_types.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_utils.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_version.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bnlib\bn.h">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bnlib\bn32.h">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bnlib\bnsize00.h">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bnlib\kludge.h">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bnlib\lbn.h">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bnlib\lbn32.h">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bnlib\lbnmem.h">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bnlib\legal.h">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bgaes\aes.h">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bgaes\aesopt.h">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bgaes\aestab.h">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bgaes\bg2zrtp.h">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bgaes\brg_types.h">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bgaes\sha1.h">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bgaes\sha2.h">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\zrtp.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_crc.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_aes.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_atl.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_ec.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_ecdh.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_hash.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_pk.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_sas.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_datatypes.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_engine.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_engine_driven.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_iface_cache.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_iface_scheduler.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_iface_sys.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_initiator.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_legal.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_list.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_log.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_pbx.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_protocol.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_responder.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_rng.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_srtp_builtin.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_string.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_utils.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_utils_proto.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bnlib\bn.c">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bnlib\bn32.c">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bnlib\bninit32.c">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bnlib\bntest00.c">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bnlib\lbn32.c">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bnlib\lbnmem.c">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bnlib\legal.c">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bgaes\aes_modes.c">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bgaes\aescrypt.c">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bgaes\aeskey.c">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bgaes\aestab.c">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bgaes\sha1.c">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bgaes\sha2.c">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\ChangeLog" />
|
||||
<None Include="..\..\News" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,179 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{C13CC324-0064-4492-9A30-310A6BD64FF5}</ProjectGuid>
|
||||
<RootNamespace>libzrtp.x64</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Configuration).x64\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Configuration).x64\</IntDir>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>../../include;../../third_party/bnlib;../../third_party/bgaes;../../test/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WIN64;_DEBUG;_LIB;HAVE_CONFIG_H=1;ZRTP_ENABLE_EC=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
<StructMemberAlignment>Default</StructMemberAlignment>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)libzrtp.x64.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>../../include;../../third_party/bnlib;../../third_party/bgaes;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>_WIN64;NDEBUG;_LIB;HAVE_CONFIG_H=1;ZRTP_ENABLE_EC=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ExceptionHandling>
|
||||
</ExceptionHandling>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
<StructMemberAlignment>Default</StructMemberAlignment>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<CompileAs>CompileAsC</CompileAs>
|
||||
</ClCompile>
|
||||
<Lib>
|
||||
<OutputFile>$(OutDir)libzrtp.x64.lib</OutputFile>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\include\zrtp.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_base.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_config.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_config_user.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_config_win.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_crypto.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_ec.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_engine.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_error.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_iface.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_iface_builtin.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_iface_cache.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_iface_system.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_legal.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_list.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_log.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_pbx.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_protocol.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_srtp.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_srtp_builtin.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_string.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_types.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_utils.h" />
|
||||
<ClInclude Include="..\..\include\zrtp_version.h" />
|
||||
<ClInclude Include="..\..\third_party\bnlib\bn.h" />
|
||||
<ClInclude Include="..\..\third_party\bnlib\bn32.h" />
|
||||
<ClInclude Include="..\..\third_party\bnlib\bnsize00.h" />
|
||||
<ClInclude Include="..\..\third_party\bnlib\kludge.h" />
|
||||
<ClInclude Include="..\..\third_party\bnlib\lbn.h" />
|
||||
<ClInclude Include="..\..\third_party\bnlib\lbn32.h" />
|
||||
<ClInclude Include="..\..\third_party\bnlib\lbnmem.h" />
|
||||
<ClInclude Include="..\..\third_party\bnlib\legal.h" />
|
||||
<ClInclude Include="..\..\third_party\bgaes\aes.h" />
|
||||
<ClInclude Include="..\..\third_party\bgaes\aesopt.h" />
|
||||
<ClInclude Include="..\..\third_party\bgaes\aestab.h" />
|
||||
<ClInclude Include="..\..\third_party\bgaes\bg2zrtp.h" />
|
||||
<ClInclude Include="..\..\third_party\bgaes\brg_types.h" />
|
||||
<ClInclude Include="..\..\third_party\bgaes\sha1.h" />
|
||||
<ClInclude Include="..\..\third_party\bgaes\sha2.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\zrtp.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_crc.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_aes.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_atl.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_ec.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_ecdh.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_hash.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_pk.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_sas.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_datatypes.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_engine.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_engine_driven.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_iface_cache.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_iface_scheduler.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_iface_sys.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_initiator.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_legal.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_list.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_log.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_pbx.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_protocol.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_responder.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_rng.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_srtp_builtin.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_string.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_utils.c" />
|
||||
<ClCompile Include="..\..\src\zrtp_utils_proto.c" />
|
||||
<ClCompile Include="..\..\third_party\bnlib\bn.c" />
|
||||
<ClCompile Include="..\..\third_party\bnlib\bn32.c" />
|
||||
<ClCompile Include="..\..\third_party\bnlib\bninit32.c" />
|
||||
<ClCompile Include="..\..\third_party\bnlib\bntest00.c" />
|
||||
<ClCompile Include="..\..\third_party\bnlib\lbn32.c" />
|
||||
<ClCompile Include="..\..\third_party\bnlib\lbnmem.c" />
|
||||
<ClCompile Include="..\..\third_party\bnlib\legal.c" />
|
||||
<ClCompile Include="..\..\third_party\bgaes\aes_modes.c" />
|
||||
<ClCompile Include="..\..\third_party\bgaes\aescrypt.c" />
|
||||
<ClCompile Include="..\..\third_party\bgaes\aeskey.c" />
|
||||
<ClCompile Include="..\..\third_party\bgaes\aestab.c" />
|
||||
<ClCompile Include="..\..\third_party\bgaes\sha1.c" />
|
||||
<ClCompile Include="..\..\third_party\bgaes\sha2.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\ChangeLog" />
|
||||
<None Include="..\..\News" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -1,262 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="include">
|
||||
<UniqueIdentifier>{c0e76076-0064-445d-8c07-32b6c762622b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="src">
|
||||
<UniqueIdentifier>{a03c0d83-0064-4848-9704-22cdce5ab144}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="bnlib">
|
||||
<UniqueIdentifier>{dbe8a34e-0064-495e-8df7-e82218921e60}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="bgaes">
|
||||
<UniqueIdentifier>{96d1a5c9-0064-4230-a764-a0ed11f434a7}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\include\zrtp.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_base.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_config.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_config_user.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_config_win.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_crypto.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_ec.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_engine.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_error.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_iface.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_iface_builtin.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_iface_cache.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_iface_system.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_legal.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_list.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_log.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_pbx.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_protocol.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_srtp.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_srtp_builtin.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_string.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_types.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_utils.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\zrtp_version.h">
|
||||
<Filter>include</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bnlib\bn.h">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bnlib\bn32.h">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bnlib\bnsize00.h">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bnlib\kludge.h">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bnlib\lbn.h">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bnlib\lbn32.h">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bnlib\lbnmem.h">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bnlib\legal.h">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bgaes\aes.h">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bgaes\aesopt.h">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bgaes\aestab.h">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bgaes\bg2zrtp.h">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bgaes\brg_types.h">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bgaes\sha1.h">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\third_party\bgaes\sha2.h">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\src\zrtp.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_crc.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_aes.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_atl.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_ec.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_ecdh.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_hash.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_pk.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_crypto_sas.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_datatypes.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_engine.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_engine_driven.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_iface_cache.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_iface_scheduler.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_iface_sys.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_initiator.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_legal.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_list.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_log.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_pbx.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_protocol.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_responder.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_rng.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_srtp_builtin.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_string.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_utils.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\zrtp_utils_proto.c">
|
||||
<Filter>src</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bnlib\bn.c">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bnlib\bn32.c">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bnlib\bninit32.c">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bnlib\bntest00.c">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bnlib\lbn32.c">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bnlib\lbnmem.c">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bnlib\legal.c">
|
||||
<Filter>bnlib</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bgaes\aes_modes.c">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bgaes\aescrypt.c">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bgaes\aeskey.c">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bgaes\aestab.c">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bgaes\sha1.c">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\third_party\bgaes\sha2.c">
|
||||
<Filter>bgaes</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\ChangeLog" />
|
||||
<None Include="..\..\News" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,483 +0,0 @@
|
|||
<?xml version="1.0" encoding="windows-1251"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9,00"
|
||||
Name="libzrtp"
|
||||
ProjectGUID="{C13CC324-E0CA-4492-9A30-310A6BD64FF5}"
|
||||
RootNamespace="libzrtp"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="../../include;../../third_party/bnlib;../../third_party/bgaes;../../test/include"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;HAVE_CONFIG_H=1;ZRTP_ENABLE_EC=0"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
StructMemberAlignment="0"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="$(OutDir)/libzrtp.lib"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="4"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="../../include;../../third_party/bnlib;../../third_party/bgaes"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;HAVE_CONFIG_H=1; ZRTP_ENABLE_EC=0"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="0"
|
||||
StructMemberAlignment="0"
|
||||
BufferSecurityCheck="false"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
CompileAs="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
OutputFile="$(OutDir)/libzrtp.lib"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="include"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_base.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_config.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_config_user.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_config_win.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_crypto.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_engine.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_error.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_iface.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_iface_builtin.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_iface_cache.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_iface_system.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_legal.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_list.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_log.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_pbx.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_protocol.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_srtp.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_srtp_builtin.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_string.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_types.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\zrtp_utils.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="src"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_crc.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_crypto_aes.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_crypto_atl.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_crypto_hash.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_crypto_pk.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_crypto_sas.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_datatypes.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_engine.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_engine_driven.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_iface_cache.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_iface_scheduler.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_iface_sys.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_initiator.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_legal.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_list.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_log.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_pbx.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_protocol.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_responder.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_rng.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_srtp_builtin.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_string.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_utils.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\zrtp_utils_proto.c"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="bnlib"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bnlib\bn.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bnlib\bn.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bnlib\bn32.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bnlib\bn32.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bnlib\bninit32.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bnlib\bnsize00.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bnlib\bntest00.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bnlib\kludge.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bnlib\lbn.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bnlib\lbn32.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bnlib\lbn32.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bnlib\lbnmem.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bnlib\lbnmem.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bnlib\legal.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bnlib\legal.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="bgaes"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bgaes\aes.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bgaes\aes_modes.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bgaes\aescrypt.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bgaes\aeskey.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bgaes\aesopt.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bgaes\aestab.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bgaes\aestab.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bgaes\bg2zrtp.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bgaes\brg_types.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bgaes\sha1.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bgaes\sha1.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bgaes\sha2.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\third_party\bgaes\sha2.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="..\..\ChangeLog"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\News"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue