summaryrefslogtreecommitdiff
path: root/der-iterator.c
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2013-04-26 14:09:12 +0200
committerNiels Möller <nisse@lysator.liu.se>2013-04-26 14:10:13 +0200
commit64bb6b36b0b12873a9ad93b77bc006f6fd7a70da (patch)
tree82f1b3ba62b7661112a77112a67f0fc9428ab5c2 /der-iterator.c
parentc9460c81c186c3f0cb10e16d72dcd8aaa8001d21 (diff)
downloadnettle-64bb6b36b0b12873a9ad93b77bc006f6fd7a70da.tar.gz
Use size_t for asn1 parser.
Diffstat (limited to 'der-iterator.c')
-rw-r--r--der-iterator.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/der-iterator.c b/der-iterator.c
index 2e6efd5f..236d3cb5 100644
--- a/der-iterator.c
+++ b/der-iterator.c
@@ -87,7 +87,7 @@ enum {
* first element. */
static void
asn1_der_iterator_init(struct asn1_der_iterator *iterator,
- unsigned length, const uint8_t *input)
+ size_t length, const uint8_t *input)
{
iterator->buffer_length = length;
iterator->buffer = input;
@@ -133,7 +133,7 @@ asn1_der_iterator_next(struct asn1_der_iterator *i)
if (LEFT(i) < k)
return ASN1_ITERATOR_ERROR;
- if (k > sizeof(unsigned))
+ if (k > sizeof(i->length))
return ASN1_ITERATOR_ERROR;
i->pos += k;
@@ -164,7 +164,7 @@ asn1_der_iterator_next(struct asn1_der_iterator *i)
enum asn1_iterator_result
asn1_der_iterator_first(struct asn1_der_iterator *i,
- unsigned length, const uint8_t *input)
+ size_t length, const uint8_t *input)
{
asn1_der_iterator_init(i, length, input);
return asn1_der_iterator_next(i);
@@ -216,7 +216,7 @@ asn1_der_get_uint32(struct asn1_der_iterator *i,
/* Big endian, two's complement, minimum number of octets (except 0,
which is encoded as a single octet */
uint32_t value = 0;
- unsigned length = i->length;
+ size_t length = i->length;
unsigned k;
if (!length || length > 5)