Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
nettle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Brian Smith
nettle
Commits
73081920
Commit
73081920
authored
14 years ago
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
Parameter rename.
Rev: nettle/bignum.h:1.8 Rev: nettle/der-iterator.c:1.2
parent
14c5b388
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bignum.h
+1
-1
1 addition, 1 deletion
bignum.h
der-iterator.c
+4
-4
4 additions, 4 deletions
der-iterator.c
with
5 additions
and
5 deletions
bignum.h
+
1
−
1
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
}
...
...
This diff is collapsed.
Click to expand it.
der-iterator.c
+
4
−
4
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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment