dect
/
libdect
Archived
13
0
Fork 0

auth: add definitions for AC and UPI length

Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
Patrick McHardy 2010-10-14 23:06:28 +02:00
parent c3ab65226d
commit a433fa4d8f
3 changed files with 5 additions and 3 deletions

View File

@ -105,7 +105,7 @@ static void mm_authenticate_cfm(struct dect_handle *dh,
struct mm_priv *priv = dect_mm_priv(mme);
uint8_t k[DECT_AUTH_KEY_LEN], ks[DECT_AUTH_KEY_LEN];
uint8_t dck[DECT_CIPHER_KEY_LEN];
uint8_t ac[4];
uint8_t ac[DECT_AUTH_CODE_LEN];
uint32_t res1;
if (!accept)

View File

@ -56,7 +56,7 @@ static void mm_authenticate_cfm(struct dect_handle *dh,
{
struct mm_priv *priv = dect_mm_priv(mme);
uint8_t k[DECT_AUTH_KEY_LEN], ks[DECT_AUTH_KEY_LEN];
uint8_t ac[4];
uint8_t ac[DECT_AUTH_CODE_LEN];
uint32_t res2;
if (!accept)
@ -95,7 +95,7 @@ static void mm_key_allocate_ind(struct dect_handle *dh,
};
uint8_t k[DECT_AUTH_KEY_LEN], ks[DECT_AUTH_KEY_LEN];
uint8_t dck[DECT_CIPHER_KEY_LEN];
uint8_t ac[4];
uint8_t ac[DECT_AUTH_CODE_LEN];
auth_type.auth_id = DECT_AUTH_DSAA;
auth_type.auth_key_type = DECT_KEY_AUTHENTICATION_CODE;

View File

@ -16,6 +16,8 @@ extern "C" {
* @{
*/
#define DECT_AUTH_CODE_LEN 4 /**< Length of authentication code */
#define DECT_UPI_LEN 4 /**< Length of User Personal Identification */
#define DECT_AUTH_KEY_LEN 16 /**< Length of a DECT authentication key */
#define DECT_CIPHER_KEY_LEN 8 /**< Length of a DECT cipher key */