summaryrefslogtreecommitdiffstats
path: root/rules
diff options
context:
space:
mode:
authorClemens Gruber <clemens.gruber@pqgruber.com>2017-09-01 18:39:20 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2017-09-05 08:08:11 +0200
commit31b1a8eb9bad4d398186c8d6af8a4ee9ab86bc96 (patch)
tree59863fc0366e79a24295cb65ac3fe22b45bb3103 /rules
parent7e04b2f9bbb19e1443672982d48d97c56049e8f9 (diff)
downloadptxdist-31b1a8eb9bad4d398186c8d6af8a4ee9ab86bc96.tar.gz
ptxdist-31b1a8eb9bad4d398186c8d6af8a4ee9ab86bc96.tar.xz
mosh: make the crypto library configurable
Mosh supports OpenSSL and Nettle. Let the user decide, but default to OpenSSL, which was hardcoded before. Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'rules')
-rw-r--r--rules/mosh.in25
-rw-r--r--rules/mosh.make2
2 files changed, 24 insertions, 3 deletions
diff --git a/rules/mosh.in b/rules/mosh.in
index 49ace4a35..398917fc7 100644
--- a/rules/mosh.in
+++ b/rules/mosh.in
@@ -1,12 +1,13 @@
## SECTION=networking
-config MOSH
+menuconfig MOSH
tristate
prompt "mosh"
select PROTOBUF
select NCURSES
select ZLIB
- select OPENSSL
+ select NETTLE if MOSH_NETTLE
+ select OPENSSL if MOSH_OPENSSL
select OPENSSH if RUNTIME
select OPENSSH_SSH if RUNTIME
select OPENSSH_SSHD if RUNTIME
@@ -15,3 +16,23 @@ config MOSH
connectivity, and provides intelligent local echo and line editing of
user keystrokes. Mosh is a replacement for SSH. It's more robust and
responsive, especially over Wi-Fi, cellular, and long-distance links.
+
+if MOSH
+
+choice
+ prompt "crypto library"
+ default MOSH_OPENSSL
+ help
+ Select the crypto library to be used
+
+ config MOSH_NETTLE
+ bool
+ prompt "nettle"
+
+ config MOSH_OPENSSL
+ bool
+ prompt "openssl"
+
+endchoice
+
+endif
diff --git a/rules/mosh.make b/rules/mosh.make
index 4fec37973..fe4b027f9 100644
--- a/rules/mosh.make
+++ b/rules/mosh.make
@@ -41,7 +41,7 @@ MOSH_CONF_OPT := \
--without-utempter \
--with-ncurses \
--without-ncursesw \
- --with-crypto-library=openssl
+ --with-crypto-library=$(call ptx/ifdef, PTXCONF_MOSH_NETTLE, nettle, openssl)
# ----------------------------------------------------------------------------