summaryrefslogtreecommitdiff
path: root/der-iterator.c
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2010-06-04 15:33:12 +0200
committerNiels Möller <nisse@lysator.liu.se>2010-06-04 15:33:12 +0200
commit730819200c3c91606fb52ddf00099ecfc4b24ce8 (patch)
tree0a14e8102d3fc89c39ef4bdc036ad65dfeedd25b /der-iterator.c
parent14c5b3888f49db6793eb6446a040312e0fa85e6c (diff)
downloadnettle-730819200c3c91606fb52ddf00099ecfc4b24ce8.tar.gz
Parameter rename.
Rev: nettle/bignum.h:1.8 Rev: nettle/der-iterator.c:1.2
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 f137c446..a7244710 100644
--- a/der-iterator.c
+++ b/der-iterator.c
@@ -249,7 +249,7 @@ asn1_der_get_uint32(struct asn1_der_iterator *i,
#if HAVE_LIBGMP
int
asn1_der_get_bignum(struct asn1_der_iterator *i,
- mpz_t x, unsigned limit)
+ mpz_t x, unsigned max_bits)
{
if (i->length > 1
&& ((i->data[0] == 0 && i->data[1] < 0x80)
@@ -258,13 +258,13 @@ asn1_der_get_bignum(struct asn1_der_iterator *i,
return 0;
/* Allow some extra here, for leading sign octets. */
- if (limit && (8 * i->length > (16 + limit)))
+ if (max_bits && (8 * i->length > (16 + max_bits)))
return 0;
nettle_mpz_set_str_256_s(x, i->length, i->data);
- /* FIXME: How to interpret a limit for negative numbers? */
- if (limit && mpz_sizeinbase(x, 2) > limit)
+ /* FIXME: How to interpret a max_bits for negative numbers? */
+ if (max_bits && mpz_sizeinbase(x, 2) > max_bits)
return 0;
return 1;