From: Shivani Baranwal Date: Sun, 4 Aug 2024 21:13:59 +0000 (+0530) Subject: P2P2: Set DevIK expiration time to 24 hours X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ff802a51e49b3c656b70a5ac491bf9e8059fb8b;p=thirdparty%2Fhostap.git P2P2: Set DevIK expiration time to 24 hours Add a location for storing expiration time for DevIK. For now, this is hardcoded to 24 hours and the value will be used in a subsequence commit to construct the indication to the peer. Signed-off-by: Shivani Baranwal --- diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c index 923f0725c..c5b4c05d6 100644 --- a/src/p2p/p2p.c +++ b/src/p2p/p2p.c @@ -3016,8 +3016,10 @@ static int p2p_pairing_info_init(struct p2p_data *p2p) os_memcpy(pairing_info->dev_ik.dik_data, p2p->cfg->pairing_config.dik_data, p2p->cfg->pairing_config.dik_len); + pairing_info->dev_ik.expiration = 24; /* hours */ p2p_pairing_info_deinit(p2p); + p2p->pairing_info = pairing_info; #ifdef CONFIG_PASN p2p->initiator_pmksa = pasn_initiator_pmksa_cache_init(); diff --git a/src/p2p/p2p_i.h b/src/p2p/p2p_i.h index 8e257f9e1..3bde27e9c 100644 --- a/src/p2p/p2p_i.h +++ b/src/p2p/p2p_i.h @@ -198,6 +198,8 @@ struct p2p_id_key { int akmp; /* Cipher version type */ int cipher_version; + /* DevIK expiration time in hours */ + u32 expiration; /* Buffer to hold the DevIK */ u8 dik_data[DEVICE_IDENTITY_KEY_MAX_LEN]; /* Length of DevIK */