Use standard unsigned integer types
This commit is contained in:
@@ -43,7 +43,7 @@ struct private_openssl_crypter_t {
|
||||
/**
|
||||
* Look up an OpenSSL algorithm name and validate its key size
|
||||
*/
|
||||
static char* lookup_algorithm(u_int16_t ikev2_algo, size_t *key_size)
|
||||
static char* lookup_algorithm(uint16_t ikev2_algo, size_t *key_size)
|
||||
{
|
||||
struct {
|
||||
/* identifier specified in IKEv2 */
|
||||
|
||||
@@ -53,7 +53,7 @@ METHOD(hasher_t, reset, bool,
|
||||
}
|
||||
|
||||
METHOD(hasher_t, get_hash, bool,
|
||||
private_openssl_hasher_t *this, chunk_t chunk, u_int8_t *hash)
|
||||
private_openssl_hasher_t *this, chunk_t chunk, uint8_t *hash)
|
||||
{
|
||||
if (EVP_DigestUpdate(this->ctx, chunk.ptr, chunk.len) != 1)
|
||||
{
|
||||
|
||||
@@ -94,7 +94,7 @@ METHOD(mac_t, set_key, bool,
|
||||
}
|
||||
|
||||
METHOD(mac_t, get_mac, bool,
|
||||
private_mac_t *this, chunk_t data, u_int8_t *out)
|
||||
private_mac_t *this, chunk_t data, uint8_t *out)
|
||||
{
|
||||
if (!this->key_set)
|
||||
{
|
||||
|
||||
@@ -47,7 +47,7 @@ struct private_openssl_rng_t {
|
||||
};
|
||||
|
||||
METHOD(rng_t, get_bytes, bool,
|
||||
private_openssl_rng_t *this, size_t bytes, u_int8_t *buffer)
|
||||
private_openssl_rng_t *this, size_t bytes, uint8_t *buffer)
|
||||
{
|
||||
if (this->quality == RNG_WEAK)
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@ struct private_openssl_sha1_prf_t {
|
||||
};
|
||||
|
||||
METHOD(prf_t, get_bytes, bool,
|
||||
private_openssl_sha1_prf_t *this, chunk_t seed, u_int8_t *bytes)
|
||||
private_openssl_sha1_prf_t *this, chunk_t seed, uint8_t *bytes)
|
||||
{
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
|
||||
if (!SHA1_Update(&this->ctx, seed.ptr, seed.len))
|
||||
@@ -53,7 +53,7 @@ METHOD(prf_t, get_bytes, bool,
|
||||
|
||||
if (bytes)
|
||||
{
|
||||
u_int32_t *hash = (u_int32_t*)bytes;
|
||||
uint32_t *hash = (uint32_t*)bytes;
|
||||
|
||||
hash[0] = htonl(this->ctx.h0);
|
||||
hash[1] = htonl(this->ctx.h1);
|
||||
|
||||
Reference in New Issue
Block a user