From 31dbc888cc4ba3e04894ffb137d0e3d9bac6f244 Mon Sep 17 00:00:00 2001 From: Max S Kash Date: Mon, 27 Sep 2021 00:52:30 +0500 Subject: [PATCH] ttyd: fix ssl ca option init Signed-off-by: Max S Kash --- utils/ttyd/Makefile | 2 +- .../ttyd/patches/090-fix-ssl-ca-option-init.patch | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 utils/ttyd/patches/090-fix-ssl-ca-option-init.patch diff --git a/utils/ttyd/Makefile b/utils/ttyd/Makefile index eb253fd222..147eda81ec 100644 --- a/utils/ttyd/Makefile +++ b/utils/ttyd/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ttyd PKG_VERSION:=1.6.3 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/tsl0922/ttyd/tar.gz/$(PKG_VERSION)? diff --git a/utils/ttyd/patches/090-fix-ssl-ca-option-init.patch b/utils/ttyd/patches/090-fix-ssl-ca-option-init.patch new file mode 100644 index 0000000000..06803aeab1 --- /dev/null +++ b/utils/ttyd/patches/090-fix-ssl-ca-option-init.patch @@ -0,0 +1,14 @@ +--- a/src/server.c ++++ b/src/server.c +@@ -509,9 +509,10 @@ int main(int argc, char **argv) { + if (ssl) { + info.ssl_cert_filepath = cert_path; + info.ssl_private_key_filepath = key_path; +- if (strlen(ca_path) > 0) ++ if (strlen(ca_path) > 0) { + info.ssl_ca_filepath = ca_path; + info.options |= LWS_SERVER_OPTION_REQUIRE_VALID_OPENSSL_CLIENT_CERT; ++ } + #if LWS_LIBRARY_VERSION_MAJOR >= 2 + info.options |= LWS_SERVER_OPTION_REDIRECT_HTTP_TO_HTTPS; + #endif