This is an automated email from the ASF dual-hosted git repository.
linguini1 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 1e490d3fb dropbear: rename libtomcrypt symbols to avoid NuttX
collisions
1e490d3fb is described below
commit 1e490d3fbe941705d51d2d218080e8d1308985b1
Author: Abhishek Mishra <[email protected]>
AuthorDate: Sat Jul 18 15:04:05 2026 +0000
dropbear: rename libtomcrypt symbols to avoid NuttX collisions
Rename base64_encode, base64_decode, and ecc_make_key in bundled
libtomcrypt to avoid duplicate symbol link errors when dropbear is built
alongside netutils/codecs and NuttX crypto (e.g. sim:dropbear).
Signed-off-by: Abhishek Mishra <[email protected]>
---
netutils/dropbear/CMakeLists.txt | 9 +++++++--
netutils/dropbear/Makefile | 7 +++++++
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/netutils/dropbear/CMakeLists.txt b/netutils/dropbear/CMakeLists.txt
index 8ca691be0..eb31d0012 100644
--- a/netutils/dropbear/CMakeLists.txt
+++ b/netutils/dropbear/CMakeLists.txt
@@ -192,8 +192,13 @@ if(CONFIG_NETUTILS_DROPBEAR)
endif()
target_compile_definitions(
- ${PROGNAME} PRIVATE LOCALOPTIONS_H_EXISTS=1 DROPBEAR_NUTTX=1
- DROPBEAR_NUTTX_PASSWD=1)
+ ${PROGNAME}
+ PRIVATE LOCALOPTIONS_H_EXISTS=1
+ DROPBEAR_NUTTX=1
+ DROPBEAR_NUTTX_PASSWD=1
+ base64_encode=dropbear_ltc_base64_encode
+ base64_decode=dropbear_ltc_base64_decode
+ ecc_make_key=dropbear_ltc_ecc_make_key)
if(CONFIG_NETUTILS_DROPBEAR_SCP)
target_compile_definitions(
diff --git a/netutils/dropbear/Makefile b/netutils/dropbear/Makefile
index 53b1f2f72..17e5ec8db 100644
--- a/netutils/dropbear/Makefile
+++ b/netutils/dropbear/Makefile
@@ -130,6 +130,13 @@ endif
# Match the ESP-IDF port behavior: LTC_SOURCE is only for libtomcrypt sources.
$(foreach src,$(TOMCRYPT_SRCS),$(eval $(src)_CFLAGS +=
${DEFINE_PREFIX}LTC_SOURCE=1))
+# Avoid duplicate symbols when NuttX/apps also provide these APIs.
+# Apply to all dropbear sources so libtomcrypt definitions and dropbear
+# callers (e.g. signkey.c) use the same renamed symbols.
+CFLAGS += ${DEFINE_PREFIX}base64_encode=dropbear_ltc_base64_encode
+CFLAGS += ${DEFINE_PREFIX}base64_decode=dropbear_ltc_base64_decode
+CFLAGS += ${DEFINE_PREFIX}ecc_make_key=dropbear_ltc_ecc_make_key
+
MAINSRC = dropbear_main.c
ifneq ($(CONFIG_NETUTILS_DROPBEAR_SCP),)