summaryrefslogtreecommitdiffstats
path: root/package/libs/polarssl/patches
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-01-30 20:07:04 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-01-30 20:07:04 +0000
commit36183f83dc4dd26ddb8c060e2f2c5bef13039632 (patch)
tree0d6d2e71e65deceb2010bce8baebe4caca656eb4 /package/libs/polarssl/patches
parent35082b76a007061c3c0dd52654e6dbbfcd332247 (diff)
polarssl: add from /packages, update to 1.2.4, fix openssl compatibility
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35411 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/libs/polarssl/patches')
-rw-r--r--package/libs/polarssl/patches/100-disable-testsuites.patch21
-rw-r--r--package/libs/polarssl/patches/200-reduce_config.patch112
-rw-r--r--package/libs/polarssl/patches/300-openssl_cipher_name_compat.patch53
-rw-r--r--package/libs/polarssl/patches/310-fix_blowfish_key_len.patch29
4 files changed, 215 insertions, 0 deletions
diff --git a/package/libs/polarssl/patches/100-disable-testsuites.patch b/package/libs/polarssl/patches/100-disable-testsuites.patch
new file mode 100644
index 000000000..cf9485e6c
--- /dev/null
+++ b/package/libs/polarssl/patches/100-disable-testsuites.patch
@@ -0,0 +1,21 @@
+--- 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
new file mode 100644
index 000000000..080fa944f
--- /dev/null
+++ b/package/libs/polarssl/patches/200-reduce_config.patch
@@ -0,0 +1,112 @@
+--- a/include/polarssl/config.h
++++ b/include/polarssl/config.h
+@@ -166,8 +166,8 @@
+ * Requires: POLARSSL_BIGNUM_C, POLARSSL_RSA_C
+ *
+ * Enable the RSA prime-number generation code.
+- */
+ #define POLARSSL_GENPRIME
++ */
+
+ /**
+ * \def POLARSSL_FS_IO
+@@ -224,8 +224,8 @@
+ * \def POLARSSL_SELF_TEST
+ *
+ * Enable the checkup functions (*_self_test).
+- */
+ #define POLARSSL_SELF_TEST
++ */
+
+ /**
+ * \def POLARSSL_SSL_HW_RECORD_ACCEL
+@@ -384,8 +384,8 @@
+ * TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256
+ * TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256
+ * TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256
+- */
+ #define POLARSSL_CAMELLIA_C
++ */
+
+ /**
+ * \def POLARSSL_CERTS_C
+@@ -396,8 +396,8 @@
+ * Caller:
+ *
+ * This module is used for testing (ssl_client/server).
+- */
+ #define POLARSSL_CERTS_C
++ */
+
+ /**
+ * \def POLARSSL_CIPHER_C
+@@ -436,8 +436,8 @@
+ * library/ssl_tls.c
+ *
+ * This module provides debugging functions.
+- */
+ #define POLARSSL_DEBUG_C
++ */
+
+ /**
+ * \def POLARSSL_DES_C
+@@ -519,8 +519,8 @@
+ * enabled as well):
+ * TLS_RSA_WITH_AES_128_GCM_SHA256
+ * TLS_RSA_WITH_AES_256_GCM_SHA384
+- */
+ #define POLARSSL_GCM_C
++ */
+
+ /**
+ * \def POLARSSL_HAVEGE_C
+@@ -533,8 +533,8 @@
+ * Requires: POLARSSL_TIMING_C
+ *
+ * This module enables the HAVEGE random number generator.
+- */
+ #define POLARSSL_HAVEGE_C
++ */
+
+ /**
+ * \def POLARSSL_MD_C
+@@ -608,8 +608,8 @@
+ * Caller: library/aes.c
+ *
+ * This modules adds support for the VIA PadLock on x86.
+- */
+ #define POLARSSL_PADLOCK_C
++ */
+
+ /**
+ * \def POLARSSL_PBKDF2_C
+@@ -722,8 +722,8 @@
+ * Caller:
+ *
+ * Requires: POLARSSL_SSL_CACHE_C
+- */
+ #define POLARSSL_SSL_CACHE_C
++ */
+
+ /**
+ * \def POLARSSL_SSL_CLI_C
+@@ -777,8 +777,8 @@
+ * Caller: library/havege.c
+ *
+ * This module is used by the HAVEGE random number generator.
+- */
+ #define POLARSSL_TIMING_C
++ */
+
+ /**
+ * \def POLARSSL_VERSION_C
+@@ -827,8 +827,8 @@
+ *
+ * Module: library/xtea.c
+ * Caller:
+- */
+ #define POLARSSL_XTEA_C
++ */
+ /* \} name */
+
+ #endif /* config.h */
diff --git a/package/libs/polarssl/patches/300-openssl_cipher_name_compat.patch b/package/libs/polarssl/patches/300-openssl_cipher_name_compat.patch
new file mode 100644
index 000000000..6ca43c312
--- /dev/null
+++ b/package/libs/polarssl/patches/300-openssl_cipher_name_compat.patch
@@ -0,0 +1,53 @@
+--- a/library/cipher.c
++++ b/library/cipher.c
+@@ -279,15 +279,21 @@ const cipher_info_t *cipher_info_from_st
+ #if defined(POLARSSL_BLOWFISH_C)
+ if( !strcasecmp( "BLOWFISH-CBC", cipher_name ) )
+ return cipher_info_from_type( POLARSSL_CIPHER_BLOWFISH_CBC );
++ if( !strcasecmp( "BF-CBC", cipher_name ) )
++ return cipher_info_from_type( POLARSSL_CIPHER_BLOWFISH_CBC );
+
+ #if defined(POLARSSL_CIPHER_MODE_CFB)
+ if( !strcasecmp( "BLOWFISH-CFB64", cipher_name ) )
+ return cipher_info_from_type( POLARSSL_CIPHER_BLOWFISH_CFB64 );
++ if( !strcasecmp( "BF-CFB64", cipher_name ) )
++ return cipher_info_from_type( POLARSSL_CIPHER_BLOWFISH_CFB64 );
+ #endif /* defined(POLARSSL_CIPHER_MODE_CFB) */
+
+ #if defined(POLARSSL_CIPHER_MODE_CTR)
+ if( !strcasecmp( "BLOWFISH-CTR", cipher_name ) )
+ return cipher_info_from_type( POLARSSL_CIPHER_BLOWFISH_CTR );
++ if( !strcasecmp( "BF-CTR", cipher_name ) )
++ return cipher_info_from_type( POLARSSL_CIPHER_BLOWFISH_CTR );
+ #endif /* defined(POLARSSL_CIPHER_MODE_CTR) */
+ #endif
+
+--- a/library/cipher_wrap.c
++++ b/library/cipher_wrap.c
+@@ -643,7 +643,7 @@ const cipher_info_t blowfish_cbc_info =
+ POLARSSL_CIPHER_BLOWFISH_CBC,
+ POLARSSL_MODE_CBC,
+ 32,
+- "BLOWFISH-CBC",
++ "BF-CBC",
+ 8,
+ 8,
+ &blowfish_info
+@@ -654,7 +654,7 @@ const cipher_info_t blowfish_cfb64_info
+ POLARSSL_CIPHER_BLOWFISH_CFB64,
+ POLARSSL_MODE_CFB,
+ 32,
+- "BLOWFISH-CFB64",
++ "BF-CFB64",
+ 8,
+ 8,
+ &blowfish_info
+@@ -666,7 +666,7 @@ const cipher_info_t blowfish_ctr_info =
+ POLARSSL_CIPHER_BLOWFISH_CTR,
+ POLARSSL_MODE_CTR,
+ 32,
+- "BLOWFISH-CTR",
++ "BF-CTR",
+ 8,
+ 8,
+ &blowfish_info
diff --git a/package/libs/polarssl/patches/310-fix_blowfish_key_len.patch b/package/libs/polarssl/patches/310-fix_blowfish_key_len.patch
new file mode 100644
index 000000000..0b4878e19
--- /dev/null
+++ b/package/libs/polarssl/patches/310-fix_blowfish_key_len.patch
@@ -0,0 +1,29 @@
+--- a/library/cipher_wrap.c
++++ b/library/cipher_wrap.c
+@@ -642,7 +642,7 @@ const cipher_base_t blowfish_info = {
+ const cipher_info_t blowfish_cbc_info = {
+ POLARSSL_CIPHER_BLOWFISH_CBC,
+ POLARSSL_MODE_CBC,
+- 32,
++ 128,
+ "BF-CBC",
+ 8,
+ 8,
+@@ -653,7 +653,7 @@ const cipher_info_t blowfish_cbc_info =
+ const cipher_info_t blowfish_cfb64_info = {
+ POLARSSL_CIPHER_BLOWFISH_CFB64,
+ POLARSSL_MODE_CFB,
+- 32,
++ 128,
+ "BF-CFB64",
+ 8,
+ 8,
+@@ -665,7 +665,7 @@ const cipher_info_t blowfish_cfb64_info
+ const cipher_info_t blowfish_ctr_info = {
+ POLARSSL_CIPHER_BLOWFISH_CTR,
+ POLARSSL_MODE_CTR,
+- 32,
++ 128,
+ "BF-CTR",
+ 8,
+ 8,