*** wl18xx wpa-supplicant patches ***
cover *** wl18xx wpa-supplicant patches ***
*** BLURB HERE ***
Hari Nagalla (3):
Add MESH support
Fix openssl1.1 build errors
migrate to openssl1.1
.../wpa-supplicant/wpa-supplicant.inc | 3 +- .../wpa-supplicant/crypto_openssl.patch | 127 ++++++++++++++++++ .../wpa-supplicant/wpa-supplicant/defconfig | 5 + 3 files changed, 134 insertions(+), 1 deletion(-) create mode 100644 meta-arago-extras/recipes-connectivity/wpa-supplicant/wpa-supplicant/crypto_openssl.patch
Signature · 1 line
2.17.1
PATCH 1/3 Add MESH support
--- .../wpa-supplicant/wpa-supplicant/defconfig | 5 +++++ 1 file changed, 5 insertions(+)
meta-arago-extras/recipes-connectivity/wpa-supplicant/wpa-supplicant/defconfig +5 -0
@@ -541,3 +541,8 @@ include $(wildcard $(LOCAL_PATH)/android_config_*.inc) NEED_BGSCAN=y CONFIG_BGSCAN_LEARN=y CONFIG_BGSCAN_SIMPLE=y + +CONFIG_DRIVER_NL80211_QCA=y +CONFIG_EAP_AKA_PRIME=y +CONFIG_MESH=y +CONFIG_SAE=y
Signature · 1 line
2.17.1
PATCH 2/3 Fix openssl1.1 build errors
In reply to Hari Nagalla--- .../wpa-supplicant/crypto_openssl.patch | 127 ++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 meta-arago-extras/recipes-connectivity/wpa-supplicant/wpa-supplicant/crypto_openssl.patch
meta-arago-extras/recipes-connectivity/wpa-supplicant/wpa-supplicant/crypto_openssl.patch new file +127 -0
@@ -0,0 +1,127 @@ +--- a/src/crypto/crypto_openssl.c 2019-11-09 06:46:42.112779317 -0600 ++++ b/src/crypto/crypto_openssl.c.new 2019-11-09 13:16:57.560629882 -0600 +@@ -602,11 +602,15 @@ + + void * dh5_init(struct wpabuf **priv, struct wpabuf **publ) + { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || \ ++ (defined(LIBRESSL_VERSION_NUMBER) && \ ++ LIBRESSL_VERSION_NUMBER < 0x20700000L) + DH *dh; + struct wpabuf *pubkey = NULL, *privkey = NULL; + size_t publen, privlen; + + *priv = NULL; ++ wpabuf_free(*publ); + *publ = NULL; + + dh = DH_new(); +@@ -645,11 +649,65 @@ + wpabuf_clear_free(privkey); + DH_free(dh); + return NULL; ++#else ++ DH *dh; ++ struct wpabuf *pubkey = NULL, *privkey = NULL; ++ size_t publen, privlen; ++ BIGNUM *p = NULL, *g; ++ const BIGNUM *priv_key = NULL, *pub_key = NULL; ++ ++ *priv = NULL; ++ wpabuf_free(*publ); ++ *publ = NULL; ++ ++ dh = DH_new(); ++ if (dh == NULL) ++ return NULL; ++ ++ g = BN_new(); ++ p = get_group5_prime(); ++ if (!g || BN_set_word(g, 2) != 1 || !p || ++ DH_set0_pqg(dh, p, NULL, g) != 1) ++ goto err; ++ p = NULL; ++ g = NULL; ++ ++ if (DH_generate_key(dh) != 1) ++ goto err; ++ ++ DH_get0_key(dh, &pub_key, &priv_key); ++ publen = BN_num_bytes(pub_key); ++ pubkey = wpabuf_alloc(publen); ++ if (!pubkey) ++ goto err; ++ privlen = BN_num_bytes(priv_key); ++ privkey = wpabuf_alloc(privlen); ++ if (!privkey) ++ goto err; ++ ++ BN_bn2bin(pub_key, wpabuf_put(pubkey, publen)); ++ BN_bn2bin(priv_key, wpabuf_put(privkey, privlen)); ++ ++ *priv = privkey; ++ *publ = pubkey; ++ return dh; ++ ++err: ++ BN_free(p); ++ BN_free(g); ++ wpabuf_clear_free(pubkey); ++ wpabuf_clear_free(privkey); ++ DH_free(dh); ++ return NULL; ++#endif + } + + + void * dh5_init_fixed(const struct wpabuf *priv, const struct wpabuf *publ) + { ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || \ ++ (defined(LIBRESSL_VERSION_NUMBER) && \ ++ LIBRESSL_VERSION_NUMBER < 0x20700000L) + DH *dh; + + dh = DH_new(); +@@ -680,6 +738,42 @@ + err: + DH_free(dh); + return NULL; ++#else ++ DH *dh; ++ BIGNUM *p = NULL, *g, *priv_key = NULL, *pub_key = NULL; ++ ++ dh = DH_new(); ++ if (dh == NULL) ++ return NULL; ++ ++ g = BN_new(); ++ p = get_group5_prime(); ++ if (!g || BN_set_word(g, 2) != 1 || !p || ++ DH_set0_pqg(dh, p, NULL, g) != 1) ++ goto err; ++ p = NULL; ++ g = NULL; ++ ++ priv_key = BN_bin2bn(wpabuf_head(priv), wpabuf_len(priv), NULL); ++ pub_key = BN_bin2bn(wpabuf_head(publ), wpabuf_len(publ), NULL); ++ if (!priv_key || !pub_key || DH_set0_key(dh, pub_key, priv_key) != 1) ++ goto err; ++ pub_key = NULL; ++ priv_key = NULL; ++ ++ if (DH_generate_key(dh) != 1) ++ goto err; ++ ++ return dh; ++ ++err: ++ BN_free(p); ++ BN_free(g); ++ BN_free(pub_key); ++ BN_clear_free(priv_key); ++ DH_free(dh); ++ return NULL; ++#endif + } + +
Signature · 1 line
2.17.1
PATCH 3/3 migrate to openssl1.1
In reply to Hari Nagalla--- .../recipes-connectivity/wpa-supplicant/wpa-supplicant.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta-arago-extras/recipes-connectivity/wpa-supplicant/wpa-supplicant.inc +2 -1
@@ -9,7 +9,7 @@ LICENSE = "GPLv2 | BSD" inherit pkgconfig -DEPENDS = "gnutls dbus libnl openssl10 libgcrypt" +DEPENDS = "gnutls dbus libnl openssl libgcrypt" RRECOMMENDS_${PN} = "wpa-supplicant-passphrase wpa-supplicant-cli" # To prevent users from accidently picking up this customized version of
@@ -25,6 +25,7 @@ SRC_URI = "git://git.ti.com/wilink8-wlan/hostap.git;protocol=git;branch=${BRANCH file://p2p_supplicant.conf \ file://99_wpa_supplicant \ " +SRC_URI += "file://crypto_openssl.patch;patchdir=.." S = "${WORKDIR}/git/wpa_supplicant"
Signature · 1 line
2.17.1