Date: Tuesday, November 3, 2015 @ 16:51:58
  Author: spupykin
Revision: 145843

archrelease: copy trunk to community-i686, community-x86_64

Added:
  bzrtp/repos/community-i686/PKGBUILD
    (from rev 145842, bzrtp/trunk/PKGBUILD)
  bzrtp/repos/community-i686/mbedtls2.patch
    (from rev 145842, bzrtp/trunk/mbedtls2.patch)
  bzrtp/repos/community-x86_64/PKGBUILD
    (from rev 145842, bzrtp/trunk/PKGBUILD)
  bzrtp/repos/community-x86_64/mbedtls2.patch
    (from rev 145842, bzrtp/trunk/mbedtls2.patch)
Deleted:
  bzrtp/repos/community-i686/PKGBUILD
  bzrtp/repos/community-i686/mbedtls2.patch
  bzrtp/repos/community-x86_64/PKGBUILD
  bzrtp/repos/community-x86_64/mbedtls2.patch

---------------------------------+
 /PKGBUILD                       |   70 ++++++++++++
 /mbedtls2.patch                 |  208 ++++++++++++++++++++++++++++++++++++++
 community-i686/PKGBUILD         |   35 ------
 community-i686/mbedtls2.patch   |  113 --------------------
 community-x86_64/PKGBUILD       |   35 ------
 community-x86_64/mbedtls2.patch |  113 --------------------
 6 files changed, 278 insertions(+), 296 deletions(-)

Deleted: community-i686/PKGBUILD
===================================================================
--- community-i686/PKGBUILD     2015-11-03 15:51:34 UTC (rev 145842)
+++ community-i686/PKGBUILD     2015-11-03 15:51:58 UTC (rev 145843)
@@ -1,35 +0,0 @@
-# $Id$
-# Maintainer:
-# Contributor: Antonio Rojas <aro...@archlinux.org>
-
-pkgname=bzrtp
-pkgver=1.0.2
-pkgrel=3
-pkgdesc="Opensource implementation of ZRTP keys exchange protocol"
-arch=('i686' 'x86_64')
-url="http://www.linphone.org/";
-license=('GPL2')
-depends=('libxml2' 'mbedtls')
-validpgpkeys=('9774BC1725758EB16D639F8B3ECD52DEE2F56985')
-source=("http://download.savannah.gnu.org/releases/linphone/$pkgname/$pkgname-$pkgver.tar.gz"{,.sig}
-       mbedtls2.patch)
-md5sums=('b52fa670fb319022166cb10d641da4e6'
-         'SKIP'
-         'a5c77d9bcfda0aed17572a32b4cab69d')
-
-prepare() {
-  cd ${pkgname}-${pkgver}
-  patch -p1 <$srcdir/mbedtls2.patch
-  autoreconf
-}
-
-build() {
-  cd ${pkgname}-${pkgver}
-  ./configure --prefix=/usr
-  make
-}
-
-package() {
-  cd ${pkgname}-${pkgver}
-  make DESTDIR="${pkgdir}" install
-}

Copied: bzrtp/repos/community-i686/PKGBUILD (from rev 145842, 
bzrtp/trunk/PKGBUILD)
===================================================================
--- community-i686/PKGBUILD                             (rev 0)
+++ community-i686/PKGBUILD     2015-11-03 15:51:58 UTC (rev 145843)
@@ -0,0 +1,35 @@
+# $Id$
+# Maintainer:
+# Contributor: Antonio Rojas <aro...@archlinux.org>
+
+pkgname=bzrtp
+pkgver=1.0.3
+pkgrel=1
+pkgdesc="Opensource implementation of ZRTP keys exchange protocol"
+arch=('i686' 'x86_64')
+url="http://www.linphone.org/";
+license=('GPL2')
+depends=('libxml2' 'mbedtls')
+validpgpkeys=('9774BC1725758EB16D639F8B3ECD52DEE2F56985')
+source=("http://download.savannah.gnu.org/releases/linphone/$pkgname/$pkgname-$pkgver.tar.gz"{,.sig}
+       mbedtls2.patch)
+md5sums=('0d0c694e114d85420d351b94f0e9d867'
+         'SKIP'
+         '5d181d8b367a4bb50a49222f00cb6751')
+
+prepare() {
+  cd ${pkgname}-${pkgver}
+  patch -p1 <$srcdir/mbedtls2.patch
+  autoreconf
+}
+
+build() {
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr
+  make
+}
+
+package() {
+  cd ${pkgname}-${pkgver}
+  make DESTDIR="${pkgdir}" install
+}

Deleted: community-i686/mbedtls2.patch
===================================================================
--- community-i686/mbedtls2.patch       2015-11-03 15:51:34 UTC (rev 145842)
+++ community-i686/mbedtls2.patch       2015-11-03 15:51:58 UTC (rev 145843)
@@ -1,113 +0,0 @@
-diff -wbBur bzrtp-1.0.2/configure bzrtp-1.0.2,my/configure
---- bzrtp-1.0.2/configure      2015-05-07 18:49:06.000000000 +0300
-+++ bzrtp-1.0.2,my/configure   2015-09-21 22:13:24.471826101 +0300
-@@ -12488,7 +12488,7 @@
-       POLARSSL_LIBS="-L${polarssl_prefix}/lib"
- fi
- 
--POLARSSL_LIBS="$POLARSSL_LIBS -lpolarssl"
-+POLARSSL_LIBS="$POLARSSL_LIBS -lmbedtls"
- 
- 
- 
-diff -wbBur bzrtp-1.0.2/configure.ac bzrtp-1.0.2,my/configure.ac
---- bzrtp-1.0.2/configure.ac   2015-05-07 18:45:29.000000000 +0300
-+++ bzrtp-1.0.2,my/configure.ac        2015-09-21 22:13:00.985159704 +0300
-@@ -42,7 +42,7 @@
-       POLARSSL_LIBS="-L${polarssl_prefix}/lib"
- fi
- 
--POLARSSL_LIBS="$POLARSSL_LIBS -lpolarssl"
-+POLARSSL_LIBS="$POLARSSL_LIBS -lmbedtls"
- 
- AC_SUBST(POLARSSL_LIBS)
- AC_SUBST(POLARSSL_CFLAGS)
-diff -wbBur bzrtp-1.0.2/src/cryptoPolarssl.c 
bzrtp-1.0.2,my/src/cryptoPolarssl.c
---- bzrtp-1.0.2/src/cryptoPolarssl.c   2015-05-07 18:14:36.000000000 +0300
-+++ bzrtp-1.0.2,my/src/cryptoPolarssl.c        2015-09-21 22:21:04.521820813 
+0300
-@@ -25,17 +25,18 @@
- #include <string.h>
- 
- /* Random number generator */
--#include "polarssl/entropy.h"
--#include "polarssl/ctr_drbg.h"
-+#include "mbedtls/compat-1.3.h"
-+#include "mbedtls/entropy.h"
-+#include "mbedtls/ctr_drbg.h"
- 
- /* Hash function sha1(sha2 is different for polarssl v1.2 and v1.3 ) */
--#include "polarssl/sha1.h"
-+#include "mbedtls/md.h"
- 
- /* Asymmetrics encryption */
--#include "polarssl/dhm.h"
-+#include "mbedtls/dhm.h"
- 
- /* Symmetric encryption */
--#include "polarssl/aes.h"
-+#include "mbedtls/aes.h"
- 
- #include "cryptoWrapper.h"
- 
-@@ -133,7 +134,8 @@
-       
-       entropy_init(&(polarsslContext->entropyContext)); /* init the polarssl 
entropy engine */
-       /* init the polarssl rng context */
--      if (ctr_drbg_init(&(polarsslContext->rngContext), entropy_func, 
&(polarsslContext->entropyContext), (const unsigned char *)entropyString, 
entropyStringLength) != 0) {
-+      ctr_drbg_init(&(polarsslContext->rngContext));
-+      if (mbedtls_ctr_drbg_seed(&(polarsslContext->rngContext), entropy_func, 
&(polarsslContext->entropyContext), (const unsigned char *)entropyString, 
entropyStringLength) != 0) {
-               return NULL;
-       }
- 
-@@ -183,7 +185,8 @@
-               uint8_t *output)
- {
-       uint8_t hmacOutput[20];
--      sha1_hmac(key, keyLength, input, inputLength, hmacOutput);
-+      const mbedtls_md_info_t *mdinfo = 
mbedtls_md_info_from_type(MBEDTLS_MD_SHA1);
-+      mbedtls_md_hmac(mdinfo, key, keyLength, input, inputLength, hmacOutput);
- 
-       /* check output length, can't be>20 */
-       if (hmacLength>20) {
-@@ -396,11 +399,11 @@
- /*** End of code common to polarSSL version 1.2 and 1.3 ***/
- 
- /* check polarssl version */
--#include <polarssl/version.h>
-+#include <mbedtls/version.h>
- #if POLARSSL_VERSION_NUMBER >= 0x01030000 /* for Polarssl version 1.3 */
- 
- /* Hashs */
--#include "polarssl/sha256.h"
-+#include "mbedtls/sha256.h"
- 
- /*
-  * @brief SHA256 wrapper
-@@ -444,7 +447,8 @@
-               uint8_t *output)
- {
-       uint8_t hmacOutput[32];
--      sha256_hmac(key, keyLength, input, inputLength, hmacOutput, 0); /* last 
param to zero to select SHA256 and not SHA224 */
-+      const mbedtls_md_info_t *mdinfo = 
mbedtls_md_info_from_type(MBEDTLS_MD_SHA256);
-+      mbedtls_md_hmac(mdinfo, key, keyLength, input, inputLength, hmacOutput);
- 
-       /* check output length, can't be>32 */
-       if (hmacLength>32) {
-@@ -464,7 +468,7 @@
-       /* compute the secret key */
-       keyLength = context->primeLength; /* undocumented but this value seems 
to be in/out, so we must set it to the expected key length */
-       context->key = (uint8_t *)malloc(keyLength*sizeof(uint8_t)); /* 
allocate key buffer */
--      dhm_calc_secret((dhm_context *)(context->cryptoModuleData), 
context->key, &keyLength, (int (*)(void *, unsigned char *, 
size_t))rngFunction, rngContext);
-+      dhm_calc_secret((dhm_context *)(context->cryptoModuleData), 
context->key, keyLength, &keyLength, (int (*)(void *, unsigned char *, 
size_t))rngFunction, rngContext);
- }
- 
- 
-@@ -472,7 +476,7 @@
- #else /* POLAR SSL VERSION 1.2 */
- 
- /* Hashs */
--#include "polarssl/sha2.h"
-+#include "mbedtls/sha2.h"
- 
- /*
-  * @brief SHA256 wrapper

Copied: bzrtp/repos/community-i686/mbedtls2.patch (from rev 145842, 
bzrtp/trunk/mbedtls2.patch)
===================================================================
--- community-i686/mbedtls2.patch                               (rev 0)
+++ community-i686/mbedtls2.patch       2015-11-03 15:51:58 UTC (rev 145843)
@@ -0,0 +1,104 @@
+diff -wbBur bzrtp-1.0.3/configure.ac bzrtp-1.0.3.my/configure.ac
+--- bzrtp-1.0.3/configure.ac   2015-11-02 16:41:21.000000000 +0300
++++ bzrtp-1.0.3.my/configure.ac        2015-11-03 18:28:22.098298959 +0300
+@@ -44,9 +44,9 @@
+ 
+ LIBS_save=$LIBS
+ LIBS="$LIBS $POLARSSL_LIBS"
+-AC_CHECK_LIB(mbedtls, ssl_init , [POLARSSL_LIBS="$POLARSSL_LIBS -lmbedtls"],
++AC_CHECK_LIB(mbedtls, mbedtls_ssl_init , [POLARSSL_LIBS="$POLARSSL_LIBS 
-lmbedtls"],
+                               [
+-                                      AC_CHECK_LIB(polarssl, ssl_init, 
[POLARSSL_LIBS="$POLARSSL_LIBS -lpolarssl"],
++                                      AC_CHECK_LIB(polarssl, 
mbedtls_ssl_init, [POLARSSL_LIBS="$POLARSSL_LIBS -lmbedtls"],
+                                       [ AC_MSG_ERROR([Polarssl or mbedTLS 
library not found]) ]
+                                       )
+                               ])
+diff -wbBur bzrtp-1.0.3/src/cryptoPolarssl.c 
bzrtp-1.0.3.my/src/cryptoPolarssl.c
+--- bzrtp-1.0.3/src/cryptoPolarssl.c   2015-11-02 16:41:21.000000000 +0300
++++ bzrtp-1.0.3.my/src/cryptoPolarssl.c        2015-11-03 18:23:56.821626356 
+0300
+@@ -25,17 +25,18 @@
+ #include <string.h>
+ 
+ /* Random number generator */
+-#include "polarssl/entropy.h"
+-#include "polarssl/ctr_drbg.h"
++#include "mbedtls/compat-1.3.h"
++#include "mbedtls/entropy.h"
++#include "mbedtls/ctr_drbg.h"
+ 
+ /* Hash function sha1(sha2 is different for polarssl v1.2 and v1.3 ) */
+-#include "polarssl/sha1.h"
++#include "mbedtls/md.h"
+ 
+ /* Asymmetrics encryption */
+-#include "polarssl/dhm.h"
++#include "mbedtls/dhm.h"
+ 
+ /* Symmetric encryption */
+-#include "polarssl/aes.h"
++#include "mbedtls/aes.h"
+ 
+ #include "cryptoWrapper.h"
+ 
+@@ -133,7 +134,8 @@
+       
+       entropy_init(&(polarsslContext->entropyContext)); /* init the polarssl 
entropy engine */
+       /* init the polarssl rng context */
+-      if (ctr_drbg_init(&(polarsslContext->rngContext), entropy_func, 
&(polarsslContext->entropyContext), (const unsigned char *)entropyString, 
entropyStringLength) != 0) {
++      ctr_drbg_init(&(polarsslContext->rngContext));
++      if (mbedtls_ctr_drbg_seed(&(polarsslContext->rngContext), entropy_func, 
&(polarsslContext->entropyContext), (const unsigned char *)entropyString, 
entropyStringLength) != 0) {
+               return NULL;
+       }
+ 
+@@ -183,7 +185,8 @@
+               uint8_t *output)
+ {
+       uint8_t hmacOutput[20];
+-      sha1_hmac(key, keyLength, input, inputLength, hmacOutput);
++      const mbedtls_md_info_t *mdinfo = 
mbedtls_md_info_from_type(MBEDTLS_MD_SHA1);
++      mbedtls_md_hmac(mdinfo, key, keyLength, input, inputLength, hmacOutput);
+ 
+       /* check output length, can't be>20 */
+       if (hmacLength>20) {
+@@ -396,11 +399,11 @@
+ /*** End of code common to polarSSL version 1.2 and 1.3 ***/
+ 
+ /* check polarssl version */
+-#include <polarssl/version.h>
++#include <mbedtls/version.h>
+ #if POLARSSL_VERSION_NUMBER >= 0x01030000 /* for Polarssl version 1.3 */
+ 
+ /* Hashs */
+-#include "polarssl/sha256.h"
++#include "mbedtls/sha256.h"
+ 
+ /*
+  * @brief SHA256 wrapper
+@@ -444,7 +447,8 @@
+               uint8_t *output)
+ {
+       uint8_t hmacOutput[32];
+-      sha256_hmac(key, keyLength, input, inputLength, hmacOutput, 0); /* last 
param to zero to select SHA256 and not SHA224 */
++      const mbedtls_md_info_t *mdinfo = 
mbedtls_md_info_from_type(MBEDTLS_MD_SHA256);
++      mbedtls_md_hmac(mdinfo, key, keyLength, input, inputLength, hmacOutput);
+ 
+       /* check output length, can't be>32 */
+       if (hmacLength>32) {
+@@ -464,7 +468,7 @@
+       /* compute the secret key */
+       keyLength = context->primeLength; /* undocumented but this value seems 
to be in/out, so we must set it to the expected key length */
+       context->key = (uint8_t *)malloc(keyLength*sizeof(uint8_t)); /* 
allocate key buffer */
+-      dhm_calc_secret((dhm_context *)(context->cryptoModuleData), 
context->key, &keyLength, (int (*)(void *, unsigned char *, 
size_t))rngFunction, rngContext);
++      dhm_calc_secret((dhm_context *)(context->cryptoModuleData), 
context->key, keyLength, &keyLength, (int (*)(void *, unsigned char *, 
size_t))rngFunction, rngContext);
+ }
+ 
+ 
+@@ -472,7 +476,7 @@
+ #else /* POLAR SSL VERSION 1.2 */
+ 
+ /* Hashs */
+-#include "polarssl/sha2.h"
++#include "mbedtls/sha2.h"
+ 
+ /*
+  * @brief SHA256 wrapper

Deleted: community-x86_64/PKGBUILD
===================================================================
--- community-x86_64/PKGBUILD   2015-11-03 15:51:34 UTC (rev 145842)
+++ community-x86_64/PKGBUILD   2015-11-03 15:51:58 UTC (rev 145843)
@@ -1,35 +0,0 @@
-# $Id$
-# Maintainer:
-# Contributor: Antonio Rojas <aro...@archlinux.org>
-
-pkgname=bzrtp
-pkgver=1.0.2
-pkgrel=3
-pkgdesc="Opensource implementation of ZRTP keys exchange protocol"
-arch=('i686' 'x86_64')
-url="http://www.linphone.org/";
-license=('GPL2')
-depends=('libxml2' 'mbedtls')
-validpgpkeys=('9774BC1725758EB16D639F8B3ECD52DEE2F56985')
-source=("http://download.savannah.gnu.org/releases/linphone/$pkgname/$pkgname-$pkgver.tar.gz"{,.sig}
-       mbedtls2.patch)
-md5sums=('b52fa670fb319022166cb10d641da4e6'
-         'SKIP'
-         'a5c77d9bcfda0aed17572a32b4cab69d')
-
-prepare() {
-  cd ${pkgname}-${pkgver}
-  patch -p1 <$srcdir/mbedtls2.patch
-  autoreconf
-}
-
-build() {
-  cd ${pkgname}-${pkgver}
-  ./configure --prefix=/usr
-  make
-}
-
-package() {
-  cd ${pkgname}-${pkgver}
-  make DESTDIR="${pkgdir}" install
-}

Copied: bzrtp/repos/community-x86_64/PKGBUILD (from rev 145842, 
bzrtp/trunk/PKGBUILD)
===================================================================
--- community-x86_64/PKGBUILD                           (rev 0)
+++ community-x86_64/PKGBUILD   2015-11-03 15:51:58 UTC (rev 145843)
@@ -0,0 +1,35 @@
+# $Id$
+# Maintainer:
+# Contributor: Antonio Rojas <aro...@archlinux.org>
+
+pkgname=bzrtp
+pkgver=1.0.3
+pkgrel=1
+pkgdesc="Opensource implementation of ZRTP keys exchange protocol"
+arch=('i686' 'x86_64')
+url="http://www.linphone.org/";
+license=('GPL2')
+depends=('libxml2' 'mbedtls')
+validpgpkeys=('9774BC1725758EB16D639F8B3ECD52DEE2F56985')
+source=("http://download.savannah.gnu.org/releases/linphone/$pkgname/$pkgname-$pkgver.tar.gz"{,.sig}
+       mbedtls2.patch)
+md5sums=('0d0c694e114d85420d351b94f0e9d867'
+         'SKIP'
+         '5d181d8b367a4bb50a49222f00cb6751')
+
+prepare() {
+  cd ${pkgname}-${pkgver}
+  patch -p1 <$srcdir/mbedtls2.patch
+  autoreconf
+}
+
+build() {
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr
+  make
+}
+
+package() {
+  cd ${pkgname}-${pkgver}
+  make DESTDIR="${pkgdir}" install
+}

Deleted: community-x86_64/mbedtls2.patch
===================================================================
--- community-x86_64/mbedtls2.patch     2015-11-03 15:51:34 UTC (rev 145842)
+++ community-x86_64/mbedtls2.patch     2015-11-03 15:51:58 UTC (rev 145843)
@@ -1,113 +0,0 @@
-diff -wbBur bzrtp-1.0.2/configure bzrtp-1.0.2,my/configure
---- bzrtp-1.0.2/configure      2015-05-07 18:49:06.000000000 +0300
-+++ bzrtp-1.0.2,my/configure   2015-09-21 22:13:24.471826101 +0300
-@@ -12488,7 +12488,7 @@
-       POLARSSL_LIBS="-L${polarssl_prefix}/lib"
- fi
- 
--POLARSSL_LIBS="$POLARSSL_LIBS -lpolarssl"
-+POLARSSL_LIBS="$POLARSSL_LIBS -lmbedtls"
- 
- 
- 
-diff -wbBur bzrtp-1.0.2/configure.ac bzrtp-1.0.2,my/configure.ac
---- bzrtp-1.0.2/configure.ac   2015-05-07 18:45:29.000000000 +0300
-+++ bzrtp-1.0.2,my/configure.ac        2015-09-21 22:13:00.985159704 +0300
-@@ -42,7 +42,7 @@
-       POLARSSL_LIBS="-L${polarssl_prefix}/lib"
- fi
- 
--POLARSSL_LIBS="$POLARSSL_LIBS -lpolarssl"
-+POLARSSL_LIBS="$POLARSSL_LIBS -lmbedtls"
- 
- AC_SUBST(POLARSSL_LIBS)
- AC_SUBST(POLARSSL_CFLAGS)
-diff -wbBur bzrtp-1.0.2/src/cryptoPolarssl.c 
bzrtp-1.0.2,my/src/cryptoPolarssl.c
---- bzrtp-1.0.2/src/cryptoPolarssl.c   2015-05-07 18:14:36.000000000 +0300
-+++ bzrtp-1.0.2,my/src/cryptoPolarssl.c        2015-09-21 22:21:04.521820813 
+0300
-@@ -25,17 +25,18 @@
- #include <string.h>
- 
- /* Random number generator */
--#include "polarssl/entropy.h"
--#include "polarssl/ctr_drbg.h"
-+#include "mbedtls/compat-1.3.h"
-+#include "mbedtls/entropy.h"
-+#include "mbedtls/ctr_drbg.h"
- 
- /* Hash function sha1(sha2 is different for polarssl v1.2 and v1.3 ) */
--#include "polarssl/sha1.h"
-+#include "mbedtls/md.h"
- 
- /* Asymmetrics encryption */
--#include "polarssl/dhm.h"
-+#include "mbedtls/dhm.h"
- 
- /* Symmetric encryption */
--#include "polarssl/aes.h"
-+#include "mbedtls/aes.h"
- 
- #include "cryptoWrapper.h"
- 
-@@ -133,7 +134,8 @@
-       
-       entropy_init(&(polarsslContext->entropyContext)); /* init the polarssl 
entropy engine */
-       /* init the polarssl rng context */
--      if (ctr_drbg_init(&(polarsslContext->rngContext), entropy_func, 
&(polarsslContext->entropyContext), (const unsigned char *)entropyString, 
entropyStringLength) != 0) {
-+      ctr_drbg_init(&(polarsslContext->rngContext));
-+      if (mbedtls_ctr_drbg_seed(&(polarsslContext->rngContext), entropy_func, 
&(polarsslContext->entropyContext), (const unsigned char *)entropyString, 
entropyStringLength) != 0) {
-               return NULL;
-       }
- 
-@@ -183,7 +185,8 @@
-               uint8_t *output)
- {
-       uint8_t hmacOutput[20];
--      sha1_hmac(key, keyLength, input, inputLength, hmacOutput);
-+      const mbedtls_md_info_t *mdinfo = 
mbedtls_md_info_from_type(MBEDTLS_MD_SHA1);
-+      mbedtls_md_hmac(mdinfo, key, keyLength, input, inputLength, hmacOutput);
- 
-       /* check output length, can't be>20 */
-       if (hmacLength>20) {
-@@ -396,11 +399,11 @@
- /*** End of code common to polarSSL version 1.2 and 1.3 ***/
- 
- /* check polarssl version */
--#include <polarssl/version.h>
-+#include <mbedtls/version.h>
- #if POLARSSL_VERSION_NUMBER >= 0x01030000 /* for Polarssl version 1.3 */
- 
- /* Hashs */
--#include "polarssl/sha256.h"
-+#include "mbedtls/sha256.h"
- 
- /*
-  * @brief SHA256 wrapper
-@@ -444,7 +447,8 @@
-               uint8_t *output)
- {
-       uint8_t hmacOutput[32];
--      sha256_hmac(key, keyLength, input, inputLength, hmacOutput, 0); /* last 
param to zero to select SHA256 and not SHA224 */
-+      const mbedtls_md_info_t *mdinfo = 
mbedtls_md_info_from_type(MBEDTLS_MD_SHA256);
-+      mbedtls_md_hmac(mdinfo, key, keyLength, input, inputLength, hmacOutput);
- 
-       /* check output length, can't be>32 */
-       if (hmacLength>32) {
-@@ -464,7 +468,7 @@
-       /* compute the secret key */
-       keyLength = context->primeLength; /* undocumented but this value seems 
to be in/out, so we must set it to the expected key length */
-       context->key = (uint8_t *)malloc(keyLength*sizeof(uint8_t)); /* 
allocate key buffer */
--      dhm_calc_secret((dhm_context *)(context->cryptoModuleData), 
context->key, &keyLength, (int (*)(void *, unsigned char *, 
size_t))rngFunction, rngContext);
-+      dhm_calc_secret((dhm_context *)(context->cryptoModuleData), 
context->key, keyLength, &keyLength, (int (*)(void *, unsigned char *, 
size_t))rngFunction, rngContext);
- }
- 
- 
-@@ -472,7 +476,7 @@
- #else /* POLAR SSL VERSION 1.2 */
- 
- /* Hashs */
--#include "polarssl/sha2.h"
-+#include "mbedtls/sha2.h"
- 
- /*
-  * @brief SHA256 wrapper

Copied: bzrtp/repos/community-x86_64/mbedtls2.patch (from rev 145842, 
bzrtp/trunk/mbedtls2.patch)
===================================================================
--- community-x86_64/mbedtls2.patch                             (rev 0)
+++ community-x86_64/mbedtls2.patch     2015-11-03 15:51:58 UTC (rev 145843)
@@ -0,0 +1,104 @@
+diff -wbBur bzrtp-1.0.3/configure.ac bzrtp-1.0.3.my/configure.ac
+--- bzrtp-1.0.3/configure.ac   2015-11-02 16:41:21.000000000 +0300
++++ bzrtp-1.0.3.my/configure.ac        2015-11-03 18:28:22.098298959 +0300
+@@ -44,9 +44,9 @@
+ 
+ LIBS_save=$LIBS
+ LIBS="$LIBS $POLARSSL_LIBS"
+-AC_CHECK_LIB(mbedtls, ssl_init , [POLARSSL_LIBS="$POLARSSL_LIBS -lmbedtls"],
++AC_CHECK_LIB(mbedtls, mbedtls_ssl_init , [POLARSSL_LIBS="$POLARSSL_LIBS 
-lmbedtls"],
+                               [
+-                                      AC_CHECK_LIB(polarssl, ssl_init, 
[POLARSSL_LIBS="$POLARSSL_LIBS -lpolarssl"],
++                                      AC_CHECK_LIB(polarssl, 
mbedtls_ssl_init, [POLARSSL_LIBS="$POLARSSL_LIBS -lmbedtls"],
+                                       [ AC_MSG_ERROR([Polarssl or mbedTLS 
library not found]) ]
+                                       )
+                               ])
+diff -wbBur bzrtp-1.0.3/src/cryptoPolarssl.c 
bzrtp-1.0.3.my/src/cryptoPolarssl.c
+--- bzrtp-1.0.3/src/cryptoPolarssl.c   2015-11-02 16:41:21.000000000 +0300
++++ bzrtp-1.0.3.my/src/cryptoPolarssl.c        2015-11-03 18:23:56.821626356 
+0300
+@@ -25,17 +25,18 @@
+ #include <string.h>
+ 
+ /* Random number generator */
+-#include "polarssl/entropy.h"
+-#include "polarssl/ctr_drbg.h"
++#include "mbedtls/compat-1.3.h"
++#include "mbedtls/entropy.h"
++#include "mbedtls/ctr_drbg.h"
+ 
+ /* Hash function sha1(sha2 is different for polarssl v1.2 and v1.3 ) */
+-#include "polarssl/sha1.h"
++#include "mbedtls/md.h"
+ 
+ /* Asymmetrics encryption */
+-#include "polarssl/dhm.h"
++#include "mbedtls/dhm.h"
+ 
+ /* Symmetric encryption */
+-#include "polarssl/aes.h"
++#include "mbedtls/aes.h"
+ 
+ #include "cryptoWrapper.h"
+ 
+@@ -133,7 +134,8 @@
+       
+       entropy_init(&(polarsslContext->entropyContext)); /* init the polarssl 
entropy engine */
+       /* init the polarssl rng context */
+-      if (ctr_drbg_init(&(polarsslContext->rngContext), entropy_func, 
&(polarsslContext->entropyContext), (const unsigned char *)entropyString, 
entropyStringLength) != 0) {
++      ctr_drbg_init(&(polarsslContext->rngContext));
++      if (mbedtls_ctr_drbg_seed(&(polarsslContext->rngContext), entropy_func, 
&(polarsslContext->entropyContext), (const unsigned char *)entropyString, 
entropyStringLength) != 0) {
+               return NULL;
+       }
+ 
+@@ -183,7 +185,8 @@
+               uint8_t *output)
+ {
+       uint8_t hmacOutput[20];
+-      sha1_hmac(key, keyLength, input, inputLength, hmacOutput);
++      const mbedtls_md_info_t *mdinfo = 
mbedtls_md_info_from_type(MBEDTLS_MD_SHA1);
++      mbedtls_md_hmac(mdinfo, key, keyLength, input, inputLength, hmacOutput);
+ 
+       /* check output length, can't be>20 */
+       if (hmacLength>20) {
+@@ -396,11 +399,11 @@
+ /*** End of code common to polarSSL version 1.2 and 1.3 ***/
+ 
+ /* check polarssl version */
+-#include <polarssl/version.h>
++#include <mbedtls/version.h>
+ #if POLARSSL_VERSION_NUMBER >= 0x01030000 /* for Polarssl version 1.3 */
+ 
+ /* Hashs */
+-#include "polarssl/sha256.h"
++#include "mbedtls/sha256.h"
+ 
+ /*
+  * @brief SHA256 wrapper
+@@ -444,7 +447,8 @@
+               uint8_t *output)
+ {
+       uint8_t hmacOutput[32];
+-      sha256_hmac(key, keyLength, input, inputLength, hmacOutput, 0); /* last 
param to zero to select SHA256 and not SHA224 */
++      const mbedtls_md_info_t *mdinfo = 
mbedtls_md_info_from_type(MBEDTLS_MD_SHA256);
++      mbedtls_md_hmac(mdinfo, key, keyLength, input, inputLength, hmacOutput);
+ 
+       /* check output length, can't be>32 */
+       if (hmacLength>32) {
+@@ -464,7 +468,7 @@
+       /* compute the secret key */
+       keyLength = context->primeLength; /* undocumented but this value seems 
to be in/out, so we must set it to the expected key length */
+       context->key = (uint8_t *)malloc(keyLength*sizeof(uint8_t)); /* 
allocate key buffer */
+-      dhm_calc_secret((dhm_context *)(context->cryptoModuleData), 
context->key, &keyLength, (int (*)(void *, unsigned char *, 
size_t))rngFunction, rngContext);
++      dhm_calc_secret((dhm_context *)(context->cryptoModuleData), 
context->key, keyLength, &keyLength, (int (*)(void *, unsigned char *, 
size_t))rngFunction, rngContext);
+ }
+ 
+ 
+@@ -472,7 +476,7 @@
+ #else /* POLAR SSL VERSION 1.2 */
+ 
+ /* Hashs */
+-#include "polarssl/sha2.h"
++#include "mbedtls/sha2.h"
+ 
+ /*
+  * @brief SHA256 wrapper

Reply via email to