Use standard unsigned integer types
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
*/
|
||||
static public_key_t *parse_public_key(chunk_t blob)
|
||||
{
|
||||
u_int32_t alg;
|
||||
uint32_t alg;
|
||||
public_key_t *key;
|
||||
|
||||
if (!pgp_read_scalar(&blob, 1, &alg))
|
||||
@@ -74,7 +74,7 @@ static public_key_t *parse_rsa_public_key(chunk_t blob)
|
||||
static private_key_t *parse_rsa_private_key(chunk_t blob)
|
||||
{
|
||||
chunk_t mpi[6];
|
||||
u_int32_t s2k;
|
||||
uint32_t s2k;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
@@ -143,7 +143,7 @@ static private_key_t *parse_private_key(chunk_t blob)
|
||||
{
|
||||
chunk_t packet;
|
||||
pgp_packet_tag_t tag;
|
||||
u_int32_t version, created, days, alg;
|
||||
uint32_t version, created, days, alg;
|
||||
private_key_t *key;
|
||||
|
||||
if (!pgp_read_packet(&blob, &packet, &tag))
|
||||
|
||||
@@ -40,17 +40,17 @@ struct private_pgp_cert_t {
|
||||
/**
|
||||
* version of the public key
|
||||
*/
|
||||
u_int32_t version;
|
||||
uint32_t version;
|
||||
|
||||
/**
|
||||
* creation time
|
||||
*/
|
||||
u_int32_t created;
|
||||
uint32_t created;
|
||||
|
||||
/**
|
||||
* days the certificate is valid
|
||||
*/
|
||||
u_int32_t valid;
|
||||
uint32_t valid;
|
||||
|
||||
/**
|
||||
* userid of the certificate
|
||||
@@ -349,7 +349,7 @@ static bool parse_public_key(private_pgp_cert_t *this, chunk_t packet)
|
||||
*/
|
||||
static bool parse_signature(private_pgp_cert_t *this, chunk_t packet)
|
||||
{
|
||||
u_int32_t version, len, type, created;
|
||||
uint32_t version, len, type, created;
|
||||
|
||||
if (!pgp_read_scalar(&packet, 1, &version))
|
||||
{
|
||||
|
||||
@@ -73,9 +73,9 @@ ENUM_END(pgp_packet_tag_names, PGP_PKT_MOD_DETECT_CODE);
|
||||
/**
|
||||
* Read a PGP scalar of bytes length, advance blob
|
||||
*/
|
||||
bool pgp_read_scalar(chunk_t *blob, size_t bytes, u_int32_t *scalar)
|
||||
bool pgp_read_scalar(chunk_t *blob, size_t bytes, uint32_t *scalar)
|
||||
{
|
||||
u_int32_t res = 0;
|
||||
uint32_t res = 0;
|
||||
|
||||
if (bytes > blob->len)
|
||||
{
|
||||
@@ -96,7 +96,7 @@ bool pgp_read_scalar(chunk_t *blob, size_t bytes, u_int32_t *scalar)
|
||||
*/
|
||||
bool pgp_read_mpi(chunk_t *blob, chunk_t *mpi)
|
||||
{
|
||||
u_int32_t bits, bytes;
|
||||
uint32_t bits, bytes;
|
||||
|
||||
if (!pgp_read_scalar(blob, 2, &bits))
|
||||
{
|
||||
@@ -117,7 +117,7 @@ bool pgp_read_mpi(chunk_t *blob, chunk_t *mpi)
|
||||
/**
|
||||
* Read length of an PGP old packet length encoding
|
||||
*/
|
||||
static bool pgp_old_packet_length(chunk_t *blob, u_int32_t *length)
|
||||
static bool pgp_old_packet_length(chunk_t *blob, uint32_t *length)
|
||||
{
|
||||
/* bits 0 and 1 define the packet length type */
|
||||
u_char type;
|
||||
@@ -141,7 +141,7 @@ static bool pgp_old_packet_length(chunk_t *blob, u_int32_t *length)
|
||||
*/
|
||||
bool pgp_read_packet(chunk_t *blob, chunk_t *data, pgp_packet_tag_t *tag)
|
||||
{
|
||||
u_int32_t len;
|
||||
uint32_t len;
|
||||
u_char t;
|
||||
|
||||
if (!blob->len)
|
||||
|
||||
@@ -115,7 +115,7 @@ bool pgp_read_mpi(chunk_t *blob, chunk_t *mpi);
|
||||
* @param scalar resultin scalar
|
||||
* @return TRUE if scalar parsed successfully
|
||||
*/
|
||||
bool pgp_read_scalar(chunk_t *blob, size_t bytes, u_int32_t *scalar);
|
||||
bool pgp_read_scalar(chunk_t *blob, size_t bytes, uint32_t *scalar);
|
||||
|
||||
/**
|
||||
* Parse a PGP packet.
|
||||
|
||||
Reference in New Issue
Block a user