summaryrefslogtreecommitdiffstats
path: root/package/libs/polarssl/patches/210-gen_key_config_fix.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-03-14 15:05:46 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-03-14 15:05:46 +0000
commitb9825247c206beaf7cf846b5aa946f71fafae5d6 (patch)
treeabbfc15bf597f9abf7f27b0fb3af8178d7fdb15d /package/libs/polarssl/patches/210-gen_key_config_fix.patch
parent6ae77556dc41dd03ad8833466a571e7aedd33b60 (diff)
downloadmaster-31e0f0ae-b9825247c206beaf7cf846b5aa946f71fafae5d6.tar.gz
master-31e0f0ae-b9825247c206beaf7cf846b5aa946f71fafae5d6.tar.bz2
master-31e0f0ae-b9825247c206beaf7cf846b5aa946f71fafae5d6.zip
polarssl: update to version 1.3.4 and add openssl compat patch
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 39930
Diffstat (limited to 'package/libs/polarssl/patches/210-gen_key_config_fix.patch')
-rw-r--r--package/libs/polarssl/patches/210-gen_key_config_fix.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/package/libs/polarssl/patches/210-gen_key_config_fix.patch b/package/libs/polarssl/patches/210-gen_key_config_fix.patch
new file mode 100644
index 0000000000..d682e28d83
--- /dev/null
+++ b/package/libs/polarssl/patches/210-gen_key_config_fix.patch
@@ -0,0 +1,38 @@
+--- a/programs/pkey/gen_key.c
++++ b/programs/pkey/gen_key.c
+@@ -155,7 +155,9 @@ int main( int argc, char *argv[] )
+
+ opt.type = DFL_TYPE;
+ opt.rsa_keysize = DFL_RSA_KEYSIZE;
++#if defined(POLARSSL_ECP_C)
+ opt.ec_curve = DFL_EC_CURVE;
++#endif
+ opt.filename = DFL_FILENAME;
+ opt.format = DFL_FORMAT;
+
+@@ -170,8 +172,10 @@ int main( int argc, char *argv[] )
+ {
+ if( strcmp( q, "rsa" ) == 0 )
+ opt.type = POLARSSL_PK_RSA;
++#if defined(POLARSSL_ECP_C)
+ if( strcmp( q, "ec" ) == 0 )
+ opt.type = POLARSSL_PK_ECKEY;
++#endif
+ else
+ goto usage;
+ }
+@@ -190,12 +194,14 @@ int main( int argc, char *argv[] )
+ if( opt.rsa_keysize < 1024 || opt.rsa_keysize > 8192 )
+ goto usage;
+ }
++#if defined(POLARSSL_ECP_C)
+ else if( strcmp( p, "ec_curve" ) == 0 )
+ {
+ if( ( curve_info = ecp_curve_info_from_name( q ) ) == NULL )
+ goto usage;
+ opt.ec_curve = curve_info->grp_id;
+ }
++#endif
+ else if( strcmp( p, "filename" ) == 0 )
+ opt.filename = q;
+ else