Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Brian Smith
nettle
Commits
73081920
Commit
73081920
authored
Jun 04, 2010
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Parameter rename.
Rev: nettle/bignum.h:1.8 Rev: nettle/der-iterator.c:1.2
parent
14c5b388
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
bignum.h
bignum.h
+1
-1
der-iterator.c
der-iterator.c
+4
-4
No files found.
bignum.h
View file @
73081920
...
...
@@ -112,7 +112,7 @@ struct asn1_der_iterator;
int
nettle_asn1_der_get_bignum
(
struct
asn1_der_iterator
*
iterator
,
mpz_t
x
,
unsigned
lim
it
);
mpz_t
x
,
unsigned
max_b
it
s
);
#ifdef __cplusplus
}
...
...
der-iterator.c
View file @
73081920
...
...
@@ -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
lim
it
)
mpz_t
x
,
unsigned
max_b
it
s
)
{
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
(
lim
it
&&
(
8
*
i
->
length
>
(
16
+
lim
it
)))
if
(
max_b
it
s
&&
(
8
*
i
->
length
>
(
16
+
max_b
it
s
)))
return
0
;
nettle_mpz_set_str_256_s
(
x
,
i
->
length
,
i
->
data
);
/* FIXME: How to interpret a
lim
it for negative numbers? */
if
(
lim
it
&&
mpz_sizeinbase
(
x
,
2
)
>
lim
it
)
/* FIXME: How to interpret a
max_b
it
s
for negative numbers? */
if
(
max_b
it
s
&&
mpz_sizeinbase
(
x
,
2
)
>
max_b
it
s
)
return
0
;
return
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment