mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-08 00:02:03 -04:00
Call ike_isa_auth_psk in listener authorize hook
This exchange initiates the AUTH verification in the TKM.
This commit is contained in:
parent
9df5645623
commit
3972769690
@ -18,9 +18,12 @@
|
|||||||
#include <encoding/payloads/auth_payload.h>
|
#include <encoding/payloads/auth_payload.h>
|
||||||
#include <utils/chunk.h>
|
#include <utils/chunk.h>
|
||||||
#include <tkm/types.h>
|
#include <tkm/types.h>
|
||||||
|
#include <tkm/constants.h>
|
||||||
|
#include <tkm/client.h>
|
||||||
|
|
||||||
#include "tkm_listener.h"
|
#include "tkm_listener.h"
|
||||||
#include "tkm_keymat.h"
|
#include "tkm_keymat.h"
|
||||||
|
#include "tkm_utils.h"
|
||||||
|
|
||||||
typedef struct private_tkm_listener_t private_tkm_listener_t;
|
typedef struct private_tkm_listener_t private_tkm_listener_t;
|
||||||
|
|
||||||
@ -56,9 +59,21 @@ METHOD(listener_t, authorize, bool,
|
|||||||
*success = FALSE;
|
*success = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
DBG1(DBG_IKE, "TKM based authentication successful"
|
signature_type signature;
|
||||||
" for ISA context %llu", isa_id);
|
chunk_to_sequence(auth, &signature);
|
||||||
*success = TRUE;
|
if (ike_isa_auth_psk(isa_id, signature) != TKM_OK)
|
||||||
|
{
|
||||||
|
DBG1(DBG_IKE, "TKM based authentication failed"
|
||||||
|
" for ISA context %llu", isa_id);
|
||||||
|
*success = FALSE;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DBG1(DBG_IKE, "TKM based authentication successful"
|
||||||
|
" for ISA context %llu", isa_id);
|
||||||
|
*success = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user