Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Nettle
nettle
Commits
4b9ffde5
Commit
4b9ffde5
authored
Jun 26, 2014
by
Nikos Mavrogiannopoulos
Committed by
Niels Möller
Jun 26, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hogweed-benchmark: do not abort() if an openssl algorithm isn't available
parent
2a22cbdc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
examples/hogweed-benchmark.c
examples/hogweed-benchmark.c
+9
-1
No files found.
examples/hogweed-benchmark.c
View file @
4b9ffde5
...
...
@@ -146,6 +146,11 @@ bench_alg (const struct alg *alg)
void
*
ctx
;
ctx
=
alg
->
init
(
alg
->
size
);
if
(
ctx
==
NULL
)
{
printf
(
"%15s %4d N/A
\n
"
,
alg
->
name
,
alg
->
size
);
return
;
}
sign
=
time_function
(
alg
->
sign
,
ctx
);
verify
=
time_function
(
alg
->
verify
,
ctx
);
...
...
@@ -604,7 +609,10 @@ bench_openssl_ecdsa_init (unsigned size)
default:
die
(
"Internal error.
\n
"
);
}
assert
(
ctx
->
key
);
/* This curve isn't supported in this build of openssl */
if
(
ctx
->
key
==
NULL
)
return
NULL
;
if
(
!
EC_KEY_generate_key
(
ctx
->
key
))
die
(
"Openssl EC_KEY_generate_key failed.
\n
"
);
...
...
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