From: Vinay Gannevaram Date: Tue, 26 Sep 2023 14:47:43 +0000 (+0530) Subject: PASN: Copy PMK to PASN context on responder X-Git-Tag: hostap_2_11~963 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a9587ceef99da17787b0bea9c54b4656cf85dda;p=thirdparty%2Fhostap.git PASN: Copy PMK to PASN context on responder Wi-Fi Aware pairing responder needs to forward the derive PMK to the framework on successful pairing setup. The framework will set corresponding PMK while a pairing verification is initiated by the paired peer. Since the PMK is not updated for responder's PASN context, framework does not have a valid PMK and verification fails. Hence copy the derived PMK to PASN context. Signed-off-by: Jouni Malinen --- diff --git a/src/pasn/pasn_responder.c b/src/pasn/pasn_responder.c index 78a9dd7da..47be40324 100644 --- a/src/pasn/pasn_responder.c +++ b/src/pasn/pasn_responder.c @@ -335,6 +335,8 @@ pasn_derive_keys(struct pasn_data *pasn, } } + pasn->pmk_len = pmk_len; + os_memcpy(pasn->pmk, pmk, pmk_len); ret = pasn_pmk_to_ptk(pmk, pmk_len, peer_addr, own_addr, wpabuf_head(secret), wpabuf_len(secret), &pasn->ptk, pasn->akmp,