From 638683d211fcd9437dbc789869829d23f78f6abc Mon Sep 17 00:00:00 2001 From: "7u83@mail.ru" <7u83@mail.ru@noemail.net> Date: Sat, 5 Mar 2016 07:50:53 +0000 Subject: [PATCH] Reads dtls_psk from config now. FossilOrigin-Name: 00fca3d674f2e44f67023ae26c0bacc7cddb169e5564719c1516634e23580505 --- src/wtp/conf_uci.c | 5 ++++- src/wtp/wtp_uci.default.conf | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/wtp/conf_uci.c b/src/wtp/conf_uci.c index 3a95c3e8..006164fd 100644 --- a/src/wtp/conf_uci.c +++ b/src/wtp/conf_uci.c @@ -161,7 +161,10 @@ int read_config(const char * filename){ str = uci_lookup_option_string(ctx,section,"ssl_cert"); if (str) conf_sslcertfilename=strdup(str); - + + str = uci_lookup_option_string(ctx,section,"dtls_psk"); + if (str) + conf_dtls_psk=strdup(str); str = uci_lookup_option_string(ctx,section,"ssl_cipher"); if (str) diff --git a/src/wtp/wtp_uci.default.conf b/src/wtp/wtp_uci.default.conf index 05b1a71f..e620e4d5 100644 --- a/src/wtp/wtp_uci.default.conf +++ b/src/wtp/wtp_uci.default.conf @@ -18,6 +18,9 @@ config 'wtp' option ssl_cert option ssl_key + # DTSL pre-shared key + option dtls_psk + # ciphers # option ssl_cipher