From b5b0381cbb23537ed150511741d51c7095dcf252 Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Sun, 1 Jun 2014 09:49:24 +0000 Subject: [PATCH] polarssl: bump to 1.3.7 SVN-Revision: 40892 --- package/libs/polarssl/Makefile | 5 +- .../patches/100-disable-testsuites.patch | 21 -------- .../polarssl/patches/200-reduce_config.patch | 50 ++++++++++--------- .../patches/210-gen_key_config_fix.patch | 18 ++++--- 4 files changed, 39 insertions(+), 55 deletions(-) delete mode 100644 package/libs/polarssl/patches/100-disable-testsuites.patch diff --git a/package/libs/polarssl/Makefile b/package/libs/polarssl/Makefile index 45bdb66277..cfabb9d65e 100644 --- a/package/libs/polarssl/Makefile +++ b/package/libs/polarssl/Makefile @@ -8,13 +8,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=polarssl -PKG_VERSION:=1.3.4 +PKG_VERSION:=1.3.7 PKG_RELEASE:=1 PKG_USE_MIPS16:=0 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-gpl.tgz PKG_SOURCE_URL:=https://polarssl.org/code/releases -PKG_MD5SUM:=30a75c5f171be49f805f3bf64a0af054 +PKG_MD5SUM:=b656e4c83ee94f93d19eb0832fd7f976 include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/cmake.mk @@ -61,6 +61,7 @@ PKG_INSTALL:=1 CMAKE_OPTIONS += \ -DCMAKE_BUILD_TYPE:String="Release" \ -DUSE_SHARED_POLARSSL_LIBRARY:Bool=ON \ + -DENABLE_TESTING:Bool=OFF \ define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include diff --git a/package/libs/polarssl/patches/100-disable-testsuites.patch b/package/libs/polarssl/patches/100-disable-testsuites.patch deleted file mode 100644 index cf9485e6c7..0000000000 --- a/package/libs/polarssl/patches/100-disable-testsuites.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -38,7 +38,7 @@ add_subdirectory(library) - add_subdirectory(include) - - if(CMAKE_COMPILER_IS_GNUCC) -- add_subdirectory(tests) -+# add_subdirectory(tests) - endif(CMAKE_COMPILER_IS_GNUCC) - - add_subdirectory(programs) ---- a/programs/CMakeLists.txt -+++ b/programs/CMakeLists.txt -@@ -3,6 +3,6 @@ add_subdirectory(hash) - add_subdirectory(pkey) - add_subdirectory(random) - add_subdirectory(ssl) --add_subdirectory(test) -+#add_subdirectory(test) - add_subdirectory(x509) - add_subdirectory(util) diff --git a/package/libs/polarssl/patches/200-reduce_config.patch b/package/libs/polarssl/patches/200-reduce_config.patch index 1db87443be..5d4b26aa55 100644 --- a/package/libs/polarssl/patches/200-reduce_config.patch +++ b/package/libs/polarssl/patches/200-reduce_config.patch @@ -1,6 +1,8 @@ ---- a/include/polarssl/config.h -+++ b/include/polarssl/config.h -@@ -315,8 +315,8 @@ +Index: polarssl-1.3.7/include/polarssl/config.h +=================================================================== +--- polarssl-1.3.7.orig/include/polarssl/config.h 2014-06-01 11:46:18.981400804 +0200 ++++ polarssl-1.3.7/include/polarssl/config.h 2014-06-01 11:46:18.977400804 +0200 +@@ -382,8 +382,8 @@ * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 * TLS_PSK_WITH_3DES_EDE_CBC_SHA * TLS_PSK_WITH_RC4_128_SHA @@ -10,7 +12,7 @@ /** * \def POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED -@@ -339,8 +339,8 @@ +@@ -406,8 +406,8 @@ * TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 * TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA * TLS_DHE_PSK_WITH_RC4_128_SHA @@ -20,7 +22,7 @@ /** * \def POLARSSL_KEY_EXCHANGE_ECDHE_PSK_ENABLED -@@ -359,8 +359,8 @@ +@@ -426,8 +426,8 @@ * TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 * TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA * TLS_ECDHE_PSK_WITH_RC4_128_SHA @@ -30,7 +32,7 @@ /** * \def POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED -@@ -384,8 +384,8 @@ +@@ -451,8 +451,8 @@ * TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 * TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA * TLS_RSA_PSK_WITH_RC4_128_SHA @@ -40,7 +42,7 @@ /** * \def POLARSSL_KEY_EXCHANGE_RSA_ENABLED -@@ -463,8 +463,8 @@ +@@ -530,8 +530,8 @@ * TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 * TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA * TLS_ECDHE_RSA_WITH_RC4_128_SHA @@ -50,7 +52,7 @@ /** * \def POLARSSL_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED -@@ -487,8 +487,8 @@ +@@ -554,8 +554,8 @@ * TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 * TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA * TLS_ECDHE_ECDSA_WITH_RC4_128_SHA @@ -60,7 +62,7 @@ /** * \def POLARSSL_KEY_EXCHANGE_ECDH_ECDSA_ENABLED -@@ -511,8 +511,8 @@ +@@ -578,8 +578,8 @@ * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 * TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 * TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 @@ -70,7 +72,7 @@ /** * \def POLARSSL_KEY_EXCHANGE_ECDH_RSA_ENABLED -@@ -535,8 +535,8 @@ +@@ -602,8 +602,8 @@ * TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 * TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256 * TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384 @@ -79,8 +81,8 @@ + */ /** - * \def POLARSSL_ERROR_STRERROR_BC -@@ -662,8 +662,8 @@ + * \def POLARSSL_PK_PARSE_EC_EXTENDED +@@ -758,8 +758,8 @@ * \def POLARSSL_SELF_TEST * * Enable the checkup functions (*_self_test). @@ -90,7 +92,7 @@ /** * \def POLARSSL_SSL_ALL_ALERT_MESSAGES -@@ -1107,8 +1107,8 @@ +@@ -1271,8 +1271,8 @@ * TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384 * TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256 * TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 @@ -100,7 +102,7 @@ /** * \def POLARSSL_CERTS_C -@@ -1121,8 +1121,8 @@ +@@ -1285,8 +1285,8 @@ * Requires: POLARSSL_PEM_PARSE_C * * This module is used for testing (ssl_client/server). @@ -110,7 +112,7 @@ /** * \def POLARSSL_CIPHER_C -@@ -1161,8 +1161,8 @@ +@@ -1325,8 +1325,8 @@ * library/ssl_tls.c * * This module provides debugging functions. @@ -120,7 +122,7 @@ /** * \def POLARSSL_DES_C -@@ -1217,8 +1217,8 @@ +@@ -1381,8 +1381,8 @@ * ECDHE-ECDSA, ECDHE-RSA, DHE-PSK * * Requires: POLARSSL_ECP_C @@ -130,7 +132,7 @@ /** * \def POLARSSL_ECDSA_C -@@ -1232,8 +1232,8 @@ +@@ -1396,8 +1396,8 @@ * ECDHE-ECDSA * * Requires: POLARSSL_ECP_C, POLARSSL_ASN1_WRITE_C, POLARSSL_ASN1_PARSE_C @@ -140,7 +142,7 @@ /** * \def POLARSSL_ECP_C -@@ -1245,8 +1245,8 @@ +@@ -1409,8 +1409,8 @@ * library/ecdsa.c * * Requires: POLARSSL_BIGNUM_C and at least one POLARSSL_ECP_DP_XXX_ENABLED @@ -150,7 +152,7 @@ /** * \def POLARSSL_ENTROPY_C -@@ -1285,8 +1285,8 @@ +@@ -1449,8 +1449,8 @@ * * This module enables the AES-GCM and CAMELLIA-GCM ciphersuites, if other * requisites are enabled as well. @@ -160,7 +162,7 @@ /** * \def POLARSSL_HAVEGE_C -@@ -1436,8 +1436,8 @@ +@@ -1607,8 +1607,8 @@ * Requires: POLARSSL_HAVE_ASM * * This modules adds support for the VIA PadLock on x86. @@ -170,7 +172,7 @@ /** * \def POLARSSL_PBKDF2_C -@@ -1584,8 +1584,8 @@ +@@ -1768,8 +1768,8 @@ * Module: library/ripemd160.c * Caller: library/md.c * @@ -180,7 +182,7 @@ /** * \def POLARSSL_RSA_C -@@ -1664,8 +1664,8 @@ +@@ -1848,8 +1848,8 @@ * Caller: * * Requires: POLARSSL_SSL_CACHE_C @@ -190,7 +192,7 @@ /** * \def POLARSSL_SSL_CLI_C -@@ -1741,8 +1741,8 @@ +@@ -1925,8 +1925,8 @@ * Caller: library/havege.c * * This module is used by the HAVEGE random number generator. @@ -200,7 +202,7 @@ /** * \def POLARSSL_VERSION_C -@@ -1862,8 +1862,8 @@ +@@ -2046,8 +2046,8 @@ * * Module: library/xtea.c * Caller: diff --git a/package/libs/polarssl/patches/210-gen_key_config_fix.patch b/package/libs/polarssl/patches/210-gen_key_config_fix.patch index d682e28d83..77e51b8384 100644 --- a/package/libs/polarssl/patches/210-gen_key_config_fix.patch +++ b/package/libs/polarssl/patches/210-gen_key_config_fix.patch @@ -1,6 +1,8 @@ ---- a/programs/pkey/gen_key.c -+++ b/programs/pkey/gen_key.c -@@ -155,7 +155,9 @@ int main( int argc, char *argv[] ) +Index: polarssl-1.3.7/programs/pkey/gen_key.c +=================================================================== +--- polarssl-1.3.7.orig/programs/pkey/gen_key.c 2014-06-01 11:46:58.917399668 +0200 ++++ polarssl-1.3.7/programs/pkey/gen_key.c 2014-06-01 11:48:18.653397400 +0200 +@@ -215,7 +215,9 @@ opt.type = DFL_TYPE; opt.rsa_keysize = DFL_RSA_KEYSIZE; @@ -9,19 +11,19 @@ +#endif opt.filename = DFL_FILENAME; opt.format = DFL_FORMAT; - -@@ -170,8 +172,10 @@ int main( int argc, char *argv[] ) + opt.use_dev_random = DFL_USE_DEV_RANDOM; +@@ -231,8 +233,10 @@ { if( strcmp( q, "rsa" ) == 0 ) opt.type = POLARSSL_PK_RSA; +#if defined(POLARSSL_ECP_C) - if( strcmp( q, "ec" ) == 0 ) + else if( strcmp( q, "ec" ) == 0 ) opt.type = POLARSSL_PK_ECKEY; +#endif else goto usage; } -@@ -190,12 +194,14 @@ int main( int argc, char *argv[] ) +@@ -251,12 +255,14 @@ if( opt.rsa_keysize < 1024 || opt.rsa_keysize > 8192 ) goto usage; } @@ -35,4 +37,4 @@ +#endif else if( strcmp( p, "filename" ) == 0 ) opt.filename = q; - else + else if( strcmp( p, "use_dev_random" ) == 0 ) -- 2.25.1