dropbear: tighten ECC configuration
authorKonstantin Demin <rockdrilla@gmail.com>
Tue, 16 Oct 2018 13:31:34 +0000 (16:31 +0300)
committerHans Dedecker <dedeckeh@gmail.com>
Thu, 8 Nov 2018 10:07:05 +0000 (11:07 +0100)
it's primary to avoid configuration/build errors in future.

cherry-pick upstream commits:
b4b11c8155b09e4d56925d2d4336c10d802adf11
ba94bcd2e876cf79a66f3f9f4e46473f89c288c8

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
package/network/services/dropbear/patches/003-accurate-ecdsa-default-size.patch [new file with mode: 0644]

diff --git a/package/network/services/dropbear/patches/003-accurate-ecdsa-default-size.patch b/package/network/services/dropbear/patches/003-accurate-ecdsa-default-size.patch
new file mode 100644 (file)
index 0000000..63f1ae8
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/ecdsa.h
++++ b/ecdsa.h
+@@ -16,7 +16,7 @@
+ #elif DROPBEAR_ECC_521
+ #define ECDSA_DEFAULT_SIZE 521
+ #else
+-#define ECDSA_DEFAULT_SIZE 0
++#error ECDSA cannot be enabled without enabling at least one size (256, 384, 521)
+ #endif
+ ecc_key *gen_ecdsa_priv_key(unsigned int bit_size);