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
+5 -5
View File
@@ -87,12 +87,12 @@ static bio_reader_t* read_tls(tls_socket_t *tls, size_t len)
/**
* Read a PT-TLS message, return header data
*/
bio_reader_t* pt_tls_read(tls_socket_t *tls, u_int32_t *vendor,
u_int32_t *type, u_int32_t *identifier)
bio_reader_t* pt_tls_read(tls_socket_t *tls, uint32_t *vendor,
uint32_t *type, uint32_t *identifier)
{
bio_reader_t *reader;
u_int32_t len;
u_int8_t reserved;
uint32_t len;
uint8_t reserved;
reader = read_tls(tls, PT_TLS_HEADER_LEN);
if (!reader)
@@ -135,7 +135,7 @@ bio_reader_t* pt_tls_read(tls_socket_t *tls, u_int32_t *vendor,
* Prepend a PT-TLS header to a writer, send data, destroy writer
*/
bool pt_tls_write(tls_socket_t *tls, pt_tls_message_type_t type,
u_int32_t identifier, chunk_t data)
uint32_t identifier, chunk_t data)
{
bio_writer_t *writer;
chunk_t out;
+3 -3
View File
@@ -105,8 +105,8 @@ enum pt_tls_auth_t {
* @param identifier receives Message Identifer
* @return reader over message value, NULL on error
*/
bio_reader_t* pt_tls_read(tls_socket_t *tls, u_int32_t *vendor,
u_int32_t *type, u_int32_t *identifier);
bio_reader_t* pt_tls_read(tls_socket_t *tls, uint32_t *vendor,
uint32_t *type, uint32_t *identifier);
/**
* Prepend a PT-TLS header to a writer, send data, destroy writer.
@@ -118,7 +118,7 @@ bio_reader_t* pt_tls_read(tls_socket_t *tls, u_int32_t *vendor,
* @return TRUE if data written successfully
*/
bool pt_tls_write(tls_socket_t *tls, pt_tls_message_type_t type,
u_int32_t identifier, chunk_t data);
uint32_t identifier, chunk_t data);
/**
* Dummy libpttls initialization function needed for integrity test
+8 -8
View File
@@ -60,7 +60,7 @@ struct private_pt_tls_client_t {
/**
* Current PT-TLS message identifier
*/
u_int32_t identifier;
uint32_t identifier;
};
/**
@@ -101,8 +101,8 @@ static bool negotiate_version(private_pt_tls_client_t *this)
{
bio_writer_t *writer;
bio_reader_t *reader;
u_int32_t type, vendor, identifier, reserved;
u_int8_t version;
uint32_t type, vendor, identifier, reserved;
uint8_t version;
bool res;
DBG1(DBG_TNC, "sending offer for PT-TLS version %d", PT_TLS_VERSION);
@@ -143,8 +143,8 @@ static bool negotiate_version(private_pt_tls_client_t *this)
*/
static status_t do_sasl(private_pt_tls_client_t *this, sasl_mechanism_t *sasl)
{
u_int32_t type, vendor, identifier;
u_int8_t result;
uint32_t type, vendor, identifier;
uint8_t result;
bio_reader_t *reader;
bio_writer_t *writer;
chunk_t data;
@@ -277,8 +277,8 @@ static status_t select_and_do_sasl(private_pt_tls_client_t *this)
{
bio_reader_t *reader;
sasl_mechanism_t *sasl = NULL;
u_int32_t type, vendor, identifier;
u_int8_t len;
uint32_t type, vendor, identifier;
uint8_t len;
chunk_t chunk;
char buf[21];
status_t status = NEED_MORE;
@@ -364,7 +364,7 @@ static bool assess(private_pt_tls_client_t *this, tls_t *tnccs)
size_t buflen = PT_TLS_MAX_MESSAGE_LEN;
char buf[buflen];
bio_reader_t *reader;
u_int32_t vendor, type, identifier;
uint32_t vendor, type, identifier;
chunk_t data;
switch (tnccs->build(tnccs, buf, &buflen, &msglen))
+7 -7
View File
@@ -55,7 +55,7 @@ struct private_pt_tls_server_t {
/**
* Message Identifier
*/
u_int32_t identifier;
uint32_t identifier;
/**
* TNCCS protocol handler, implemented as tls_t
@@ -71,8 +71,8 @@ static bool negotiate_version(private_pt_tls_server_t *this)
{
bio_reader_t *reader;
bio_writer_t *writer;
u_int32_t vendor, type, identifier;
u_int8_t reserved, vmin, vmax, vpref;
uint32_t vendor, type, identifier;
uint8_t reserved, vmin, vmax, vpref;
bool res;
reader = pt_tls_read(this->tls, &vendor, &type, &identifier);
@@ -161,7 +161,7 @@ static status_t process_sasl(private_pt_tls_server_t *this,
static status_t read_sasl(private_pt_tls_server_t *this,
sasl_mechanism_t *sasl)
{
u_int32_t vendor, type, identifier;
uint32_t vendor, type, identifier;
bio_reader_t *reader;
status_t status;
chunk_t data;
@@ -260,11 +260,11 @@ static bool send_sasl_mechs(private_pt_tls_server_t *this)
static status_t read_sasl_mech_selection(private_pt_tls_server_t *this,
sasl_mechanism_t **out)
{
u_int32_t vendor, type, identifier;
uint32_t vendor, type, identifier;
sasl_mechanism_t *sasl;
bio_reader_t *reader;
chunk_t chunk;
u_int8_t len;
uint8_t len;
char buf[21];
reader = pt_tls_read(this->tls, &vendor, &type, &identifier);
@@ -406,7 +406,7 @@ static status_t assess(private_pt_tls_server_t *this, tls_t *tnccs)
size_t buflen = PT_TLS_MAX_MESSAGE_LEN;
char buf[buflen];
bio_reader_t *reader;
u_int32_t vendor, type, identifier;
uint32_t vendor, type, identifier;
chunk_t data;
status_t status;