Switch commoncpp2 to ucommon to solve dependency conflicts.
libccrtp was depending on commoncpp2, and have been replaced by a version
depending on ucommon as well.
diff --git a/jni/libzrtp/sources/cryptcommon/ZrtpRandom.cpp b/jni/libzrtp/sources/cryptcommon/ZrtpRandom.cpp
index c19fa82..7078b72 100644
--- a/jni/libzrtp/sources/cryptcommon/ZrtpRandom.cpp
+++ b/jni/libzrtp/sources/cryptcommon/ZrtpRandom.cpp
@@ -1,8 +1,8 @@
/*
- * Copyright (C) 2006-2013 Werner Dittmann
+ * Copyright (C) 2006-2012 Werner Dittmann
*
* This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
+ * it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
diff --git a/jni/libzrtp/sources/cryptcommon/ZrtpRandom.h b/jni/libzrtp/sources/cryptcommon/ZrtpRandom.h
index d3eedf7..3487a27 100644
--- a/jni/libzrtp/sources/cryptcommon/ZrtpRandom.h
+++ b/jni/libzrtp/sources/cryptcommon/ZrtpRandom.h
@@ -1,8 +1,8 @@
/*
- Copyright (C) 2006-2013 Werner Dittmann
+ Copyright (C) 2006-2012 Werner Dittmann
This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
+ it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
diff --git a/jni/libzrtp/sources/cryptcommon/macSkein.cpp b/jni/libzrtp/sources/cryptcommon/macSkein.cpp
index 9da946f..a6e1633 100644
--- a/jni/libzrtp/sources/cryptcommon/macSkein.cpp
+++ b/jni/libzrtp/sources/cryptcommon/macSkein.cpp
@@ -1,8 +1,8 @@
/*
- Copyright (C) 2010-2013 Werner Dittmann
+ Copyright (C) 2010 Werner Dittmann
This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
+ it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
diff --git a/jni/libzrtp/sources/cryptcommon/macSkein.h b/jni/libzrtp/sources/cryptcommon/macSkein.h
index ce5d380..3fdb8f0 100644
--- a/jni/libzrtp/sources/cryptcommon/macSkein.h
+++ b/jni/libzrtp/sources/cryptcommon/macSkein.h
@@ -1,8 +1,8 @@
/*
- Copyright (C) 2010-2013 Werner Dittmann
+ Copyright (C) 2010 Werner Dittmann
This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published by
+ it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
diff --git a/jni/libzrtp/sources/cryptcommon/twofish.c b/jni/libzrtp/sources/cryptcommon/twofish.c
index 03d2770..45b2bb0 100644
--- a/jni/libzrtp/sources/cryptcommon/twofish.c
+++ b/jni/libzrtp/sources/cryptcommon/twofish.c
@@ -475,17 +475,8 @@
(p)[3] = (Twofish_Byte)(((v) >> 24) & 0xff)
#endif
-
-#ifdef ANDROID
-/**
- * Dummy function to disable some compiler optimizations.
- *
- * See comment in Twofish_cfb128_encrypt().
- */
-void Two_debugDummy(Twofish_Byte* in, Twofish_Byte* out, Twofish_Byte* ivec)
-{
-}
-#endif
+
+
/*
* Test the platform-specific macros.
* This function tests the macros defined so far to make sure the
diff --git a/jni/libzrtp/sources/cryptcommon/twofish_cfb.c b/jni/libzrtp/sources/cryptcommon/twofish_cfb.c
index 241b956..80925f4 100755
--- a/jni/libzrtp/sources/cryptcommon/twofish_cfb.c
+++ b/jni/libzrtp/sources/cryptcommon/twofish_cfb.c
@@ -20,20 +20,8 @@
while (len>=16) {
Twofish_encrypt(keyCtx, ivec, ivec);
for (n=0; n<16; n+=sizeof(size_t)) {
-
-/*
- * Some GCC version(s) of Android's NDK produce code that leads to a crash (SIGBUS). The
- * offending line if the line that produces the output by xor'ing the ivec. Somehow the
- * compiler/optimizer seems to incorrectly setup the pointers. Adding a call to an
- * external function that uses the pointer disabled or modifies this optimzing
- * behaviour. This debug functions as such does nothing, it just disables some
- * optimization. Don't use a local (static) function - the compiler sees that it does
- * nothing and optimizes again :-) .
- */
-#ifdef ANDROID
- Two_debugDummy(in, out, ivec);
-#endif
- *(size_t*)(out+n) = *(size_t*)(ivec+n) ^= *(size_t*)(in+n);;
+ *(size_t*)(out+n) =
+ *(size_t*)(ivec+n) ^= *(size_t*)(in+n);
}
len -= 16;
out += 16;
@@ -43,8 +31,8 @@
if (len) {
Twofish_encrypt(keyCtx, ivec, ivec);
while (len--) {
- out[n] = ivec[n] ^= in[n];
- ++n;
+ out[n] = ivec[n] ^= in[n];
+ ++n;
}
}
*num = n;