mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-03 10:32:33 +01:00
sae: Add sae_is_h2e
Allows clients to know whether H2E was used by the SAE state machine
This commit is contained in:
parent
f67e5ea6d8
commit
c957d25dad
@ -32,8 +32,8 @@
|
||||
#include "src/handshake.h"
|
||||
#include "src/crypto.h"
|
||||
#include "src/mpdu.h"
|
||||
#include "src/sae.h"
|
||||
#include "src/auth-proto.h"
|
||||
#include "src/sae.h"
|
||||
|
||||
/* SHA-512 is the highest supported hashing function as of 802.11-2020 */
|
||||
#define SAE_MAX_HASH_LEN 64
|
||||
@ -1291,6 +1291,13 @@ static bool sae_start(struct auth_proto *ap)
|
||||
return sae_send_commit(sm, false);
|
||||
}
|
||||
|
||||
bool sae_sm_is_h2e(struct auth_proto *ap)
|
||||
{
|
||||
struct sae_sm *sm = l_container_of(ap, struct sae_sm, ap);
|
||||
|
||||
return sm->sae_type != CRYPTO_SAE_LOOPING;
|
||||
}
|
||||
|
||||
static void sae_free(struct auth_proto *ap)
|
||||
{
|
||||
struct sae_sm *sm = l_container_of(ap, struct sae_sm, ap);
|
||||
|
@ -20,6 +20,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
struct auth_proto;
|
||||
struct sae_sm;
|
||||
struct handshake_state;
|
||||
|
||||
@ -27,6 +28,8 @@ typedef void (*sae_tx_authenticate_func_t)(const uint8_t *data, size_t len,
|
||||
void *user_data);
|
||||
typedef void (*sae_tx_associate_func_t)(void *user_data);
|
||||
|
||||
bool sae_sm_is_h2e(struct auth_proto *ap);
|
||||
|
||||
struct auth_proto *sae_sm_new(struct handshake_state *hs,
|
||||
sae_tx_authenticate_func_t tx_auth,
|
||||
sae_tx_associate_func_t tx_assoc,
|
||||
|
Loading…
Reference in New Issue
Block a user