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
Wim Lewis
nettle
Commits
1f5b9812
Commit
1f5b9812
authored
Jan 06, 2019
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests: Fix assert call with side effects.
(cherry picked from commit
73d3c6d5
)
parent
19fa22a4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
ChangeLog
ChangeLog
+5
-0
testsuite/rsa-compute-root-test.c
testsuite/rsa-compute-root-test.c
+3
-1
No files found.
ChangeLog
View file @
1f5b9812
...
...
@@ -12,6 +12,11 @@
* sha512-compress.c: Add missing include of sha2-internal.h.
2019-01-06 Niels Möller <nisse@lysator.liu.se>
* testsuite/rsa-compute-root-test.c (generate_keypair): Fix assert
call with side-effects.
2018-12-26 Niels Möller <nisse@lysator.liu.se>
* examples/hogweed-benchmark.c (make_openssl_rsa_ctx): New helper
...
...
testsuite/rsa-compute-root-test.c
View file @
1f5b9812
...
...
@@ -86,6 +86,7 @@ generate_keypair (gmp_randstate_t rands,
mpz_t
q1
;
mpz_t
phi
;
mpz_t
tmp
;
int
res
;
mpz_init
(
p1
);
mpz_init
(
q1
);
...
...
@@ -124,7 +125,8 @@ generate_keypair (gmp_randstate_t rands,
}
mpz_mul
(
phi
,
p1
,
q1
);
assert
(
mpz_invert
(
key
->
d
,
pub
->
e
,
phi
));
res
=
mpz_invert
(
key
->
d
,
pub
->
e
,
phi
);
assert
(
res
);
mpz_fdiv_r
(
key
->
a
,
key
->
d
,
p1
);
mpz_fdiv_r
(
key
->
b
,
key
->
d
,
q1
);
...
...
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