Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Brian Smith
nettle
Commits
fa14f30e
Commit
fa14f30e
authored
Oct 09, 2002
by
Niels Möller
Browse files
* dsa-keygen.c: Call the progress callback only if it's non-NULL.
Rev: src/nettle/dsa-keygen.c:1.2
parent
761cb986
Changes
1
Hide whitespace changes
Inline
Side-by-side
dsa-keygen.c
View file @
fa14f30e
...
...
@@ -85,7 +85,8 @@ dsa_nist_gen(mpz_t p, mpz_t q,
uint8_t
h1
[
SHA1_DIGEST_SIZE
];
uint8_t
h2
[
SHA1_DIGEST_SIZE
];
progress
(
progress_ctx
,
'.'
);
if
(
progress
)
progress
(
progress_ctx
,
'.'
);
nettle_mpz_random_size
(
s
,
random_ctx
,
random
,
SEED_BITS
);
...
...
@@ -122,7 +123,8 @@ dsa_nist_gen(mpz_t p, mpz_t q,
{
unsigned
k
;
progress
(
progress_ctx
,
','
);
if
(
progress
)
progress
(
progress_ctx
,
','
);
for
(
k
=
0
;
k
<=
n
;
k
++
)
{
mpz_set
(
t
,
s
);
...
...
@@ -153,7 +155,8 @@ dsa_nist_gen(mpz_t p, mpz_t q,
return
;
}
}
progress
(
progress_ctx
,
'+'
);
if
(
progress
)
progress
(
progress_ctx
,
'+'
);
}
}
}
...
...
@@ -181,7 +184,8 @@ dsa_find_generator(mpz_t g,
nettle_mpz_random
(
g
,
random_ctx
,
random
,
n
);
mpz_add_ui
(
g
,
g
,
2
);
progress
(
progress_ctx
,
'g'
);
if
(
progress
)
progress
(
progress_ctx
,
'g'
);
mpz_powm
(
g
,
g
,
e
,
p
);
if
(
mpz_cmp_ui
(
g
,
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