]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P2: Set DevIK expiration time to 24 hours
authorShivani Baranwal <quic_shivbara@quicinc.com>
Sun, 4 Aug 2024 21:13:59 +0000 (02:43 +0530)
committerJouni Malinen <j@w1.fi>
Fri, 27 Sep 2024 09:44:30 +0000 (12:44 +0300)
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 <quic_shivbara@quicinc.com>
src/p2p/p2p.c
src/p2p/p2p_i.h

index 923f0725c26c7c4fb72bbde017828852a9c0e078..c5b4c05d63a32cdcffb1475839c10a07d4e05e7c 100644 (file)
@@ -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();
index 8e257f9e1e6fc36343e05c99b6a1a6401886839d..3bde27e9c8715a93cd0780a5a827244da26d3458 100644 (file)
@@ -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 */