Use standard unsigned integer types

This commit is contained in:
Andreas Steffen
2016-03-24 18:52:48 +01:00
parent b210369314
commit b12c53ce77
584 changed files with 3430 additions and 3430 deletions
+2 -2
View File
@@ -112,7 +112,7 @@ struct simaka_card_t {
*/
void (*set_reauth)(simaka_card_t *this, identification_t *id,
identification_t *next, char mk[HASH_SIZE_SHA1],
u_int16_t counter);
uint16_t counter);
/**
* Retrieve parameters for fast reauthentication stored via set_reauth().
@@ -123,7 +123,7 @@ struct simaka_card_t {
* @return fast reauthentication identity, NULL if not found
*/
identification_t* (*get_reauth)(simaka_card_t *this, identification_t *id,
char mk[HASH_SIZE_SHA1], u_int16_t *counter);
char mk[HASH_SIZE_SHA1], uint16_t *counter);
};
#endif /** SIMAKA_CARD_H_ @}*/
+3 -3
View File
@@ -207,7 +207,7 @@ METHOD(simaka_manager_t, card_get_pseudonym, identification_t*,
METHOD(simaka_manager_t, card_set_reauth, void,
private_simaka_manager_t *this, identification_t *id, identification_t *next,
char mk[HASH_SIZE_SHA1], u_int16_t counter)
char mk[HASH_SIZE_SHA1], uint16_t counter)
{
enumerator_t *enumerator;
simaka_card_t *card;
@@ -227,7 +227,7 @@ METHOD(simaka_manager_t, card_set_reauth, void,
METHOD(simaka_manager_t, card_get_reauth, identification_t*,
private_simaka_manager_t *this, identification_t *id, char mk[HASH_SIZE_SHA1],
u_int16_t *counter)
uint16_t *counter)
{
enumerator_t *enumerator;
simaka_card_t *card;
@@ -393,7 +393,7 @@ METHOD(simaka_manager_t, provider_gen_pseudonym, identification_t*,
METHOD(simaka_manager_t, provider_is_reauth, identification_t*,
private_simaka_manager_t *this, identification_t *id, char mk[HASH_SIZE_SHA1],
u_int16_t *counter)
uint16_t *counter)
{
enumerator_t *enumerator;
simaka_provider_t *provider;
+3 -3
View File
@@ -131,7 +131,7 @@ struct simaka_manager_t {
*/
void (*card_set_reauth)(simaka_manager_t *this, identification_t *id,
identification_t *next, char mk[HASH_SIZE_SHA1],
u_int16_t counter);
uint16_t counter);
/**
* Retrieve fast reauthentication parameters from one of the registered cards.
@@ -143,7 +143,7 @@ struct simaka_manager_t {
*/
identification_t* (*card_get_reauth)(simaka_manager_t *this,
identification_t *id, char mk[HASH_SIZE_SHA1],
u_int16_t *counter);
uint16_t *counter);
/**
* Register a triplet provider (server) at the manager.
@@ -228,7 +228,7 @@ struct simaka_manager_t {
*/
identification_t* (*provider_is_reauth)(simaka_manager_t *this,
identification_t *id, char mk[HASH_SIZE_SHA1],
u_int16_t *counter);
uint16_t *counter);
/**
* Generate a fast reauth id using one of the registered providers.
+13 -13
View File
@@ -30,17 +30,17 @@ typedef struct attr_t attr_t;
*/
struct hdr_t {
/** EAP code (REQUEST/RESPONSE) */
u_int8_t code;
uint8_t code;
/** unique message identifier */
u_int8_t identifier;
uint8_t identifier;
/** length of whole message */
u_int16_t length;
uint16_t length;
/** EAP type => EAP_SIM/EAP_AKA */
u_int8_t type;
uint8_t type;
/** SIM subtype */
u_int8_t subtype;
uint8_t subtype;
/** reserved bytes */
u_int16_t reserved;
uint16_t reserved;
} __attribute__((__packed__));
/**
@@ -48,9 +48,9 @@ struct hdr_t {
*/
struct attr_hdr_t {
/** attribute type */
u_int8_t type;
uint8_t type;
/** attibute length */
u_int8_t length;
uint8_t length;
} __attribute__((__packed__));
/**
@@ -204,7 +204,7 @@ METHOD(simaka_message_t, is_request, bool,
return this->hdr->code == EAP_REQUEST;
}
METHOD(simaka_message_t, get_identifier, u_int8_t,
METHOD(simaka_message_t, get_identifier, uint8_t,
private_simaka_message_t *this)
{
return this->hdr->identifier;
@@ -366,7 +366,7 @@ static bool parse_attributes(private_simaka_message_t *this, chunk_t in)
case AT_IDENTITY:
case AT_VERSION_LIST:
{
u_int16_t len;
uint16_t len;
if (hdr->length < 1 || in.len < 4)
{
@@ -610,7 +610,7 @@ METHOD(simaka_message_t, generate, bool,
chunk_t out, encr, data, *target, mac = chunk_empty;
simaka_attribute_t type;
attr_hdr_t *hdr;
u_int16_t len;
uint16_t len;
signer_t *signer;
call_hook(this, FALSE, TRUE);
@@ -684,7 +684,7 @@ METHOD(simaka_message_t, generate, bool,
case AT_VERSION_LIST:
case AT_RES:
{
u_int16_t len, padding;
uint16_t len, padding;
len = htons(data.len);
if (type == AT_RES)
@@ -912,7 +912,7 @@ simaka_message_t *simaka_message_create_from_payload(chunk_t data,
/**
* See header.
*/
simaka_message_t *simaka_message_create(bool request, u_int8_t identifier,
simaka_message_t *simaka_message_create(bool request, uint8_t identifier,
eap_type_t type, simaka_subtype_t subtype,
simaka_crypto_t *crypto)
{
+2 -2
View File
@@ -176,7 +176,7 @@ struct simaka_message_t {
*
* @return EAP message identifier
*/
u_int8_t (*get_identifier)(simaka_message_t *this);
uint8_t (*get_identifier)(simaka_message_t *this);
/**
* Get the EAP type of the message.
@@ -257,7 +257,7 @@ struct simaka_message_t {
* @param crypto EAP-SIM/AKA crypto helper
* @return empty message of requested kind, NULL on error
*/
simaka_message_t *simaka_message_create(bool request, u_int8_t identifier,
simaka_message_t *simaka_message_create(bool request, uint8_t identifier,
eap_type_t type, simaka_subtype_t subtype,
simaka_crypto_t *crypto);
+1 -1
View File
@@ -112,7 +112,7 @@ struct simaka_provider_t {
* @return permanent identity, NULL if id not a reauth identity
*/
identification_t* (*is_reauth)(simaka_provider_t *this, identification_t *id,
char mk[HASH_SIZE_SHA1], u_int16_t *counter);
char mk[HASH_SIZE_SHA1], uint16_t *counter);
/**
* Generate a fast reauthentication identity, associated to a master key.