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
Wim Lewis
nettle
Commits
c165b7b2
Commit
c165b7b2
authored
Mar 28, 2014
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Undo dsa-compat.h name mangling for testsuite.
parent
ea94f78d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
3 deletions
+13
-3
ChangeLog
ChangeLog
+4
-0
testsuite/dsa-keygen-test.c
testsuite/dsa-keygen-test.c
+3
-3
testsuite/testutils.h
testsuite/testutils.h
+6
-0
No files found.
ChangeLog
View file @
c165b7b2
2014-03-28 Niels Möller <nisse@lysator.liu.se>
2014-03-28 Niels Möller <nisse@lysator.liu.se>
* testsuite/dsa-keygen-test.c (test_main): Explicitly use
dsa_compat_generate_keypair.
* testsuite/testutils.h: Undo dsa-compat.h name mangling.
* dsa-keygen.c (dsa_generate_keypair): New interface, generating
* dsa-keygen.c (dsa_generate_keypair): New interface, generating
only a keypair, and no new parameters.
only a keypair, and no new parameters.
* dsa-compat-keygen.c (dsa_compat_generate_keypair): New file.
* dsa-compat-keygen.c (dsa_compat_generate_keypair): New file.
...
...
testsuite/dsa-keygen-test.c
View file @
c165b7b2
...
@@ -23,7 +23,7 @@ test_main(void)
...
@@ -23,7 +23,7 @@ test_main(void)
knuth_lfib_init
(
&
lfib
,
13
);
knuth_lfib_init
(
&
lfib
,
13
);
params
=
(
struct
dsa_params
*
)
&
pub
;
params
=
(
struct
dsa_params
*
)
&
pub
;
ASSERT
(
dsa_generate_keypair
(
&
pub
,
&
key
,
ASSERT
(
dsa_
compat_
generate_keypair
(
&
pub
,
&
key
,
&
lfib
,
&
lfib
,
(
nettle_random_func
*
)
knuth_lfib_random
,
(
nettle_random_func
*
)
knuth_lfib_random
,
NULL
,
verbose
?
progress
:
NULL
,
NULL
,
verbose
?
progress
:
NULL
,
...
@@ -32,7 +32,7 @@ test_main(void)
...
@@ -32,7 +32,7 @@ test_main(void)
test_dsa_key
(
params
,
pub
.
y
,
key
.
x
,
160
);
test_dsa_key
(
params
,
pub
.
y
,
key
.
x
,
160
);
test_dsa160
(
&
pub
,
&
key
,
NULL
);
test_dsa160
(
&
pub
,
&
key
,
NULL
);
ASSERT
(
dsa_generate_keypair
(
&
pub
,
&
key
,
ASSERT
(
dsa_
compat_
generate_keypair
(
&
pub
,
&
key
,
&
lfib
,
&
lfib
,
(
nettle_random_func
*
)
knuth_lfib_random
,
(
nettle_random_func
*
)
knuth_lfib_random
,
NULL
,
verbose
?
progress
:
NULL
,
NULL
,
verbose
?
progress
:
NULL
,
...
@@ -41,7 +41,7 @@ test_main(void)
...
@@ -41,7 +41,7 @@ test_main(void)
test_dsa_key
(
params
,
pub
.
y
,
key
.
x
,
256
);
test_dsa_key
(
params
,
pub
.
y
,
key
.
x
,
256
);
test_dsa256
(
&
pub
,
&
key
,
NULL
);
test_dsa256
(
&
pub
,
&
key
,
NULL
);
ASSERT
(
dsa_generate_keypair
(
&
pub
,
&
key
,
ASSERT
(
dsa_
compat_
generate_keypair
(
&
pub
,
&
key
,
&
lfib
,
&
lfib
,
(
nettle_random_func
*
)
knuth_lfib_random
,
(
nettle_random_func
*
)
knuth_lfib_random
,
NULL
,
verbose
?
progress
:
NULL
,
NULL
,
verbose
?
progress
:
NULL
,
...
...
testsuite/testutils.h
View file @
c165b7b2
...
@@ -24,6 +24,10 @@
...
@@ -24,6 +24,10 @@
# include "ecc-internal.h"
# include "ecc-internal.h"
# include "ecdsa.h"
# include "ecdsa.h"
# include "gmp-glue.h"
# include "gmp-glue.h"
/* Undo some dsa-compat name mangling */
#undef dsa_generate_keypair
#define dsa_generate_keypair nettle_dsa_generate_keypair
#endif
#endif
#include "nettle-meta.h"
#include "nettle-meta.h"
...
@@ -198,11 +202,13 @@ test_dsa256(const struct dsa_public_key *pub,
...
@@ -198,11 +202,13 @@ test_dsa256(const struct dsa_public_key *pub,
const
struct
dsa_private_key
*
key
,
const
struct
dsa_private_key
*
key
,
const
struct
dsa_signature
*
expected
);
const
struct
dsa_signature
*
expected
);
#if 0
void
void
test_dsa_sign(const struct dsa_public_key *pub,
test_dsa_sign(const struct dsa_public_key *pub,
const struct dsa_private_key *key,
const struct dsa_private_key *key,
const struct nettle_hash *hash,
const struct nettle_hash *hash,
const struct dsa_signature *expected);
const struct dsa_signature *expected);
#endif
void
void
test_dsa_verify
(
const
struct
dsa_params
*
params
,
test_dsa_verify
(
const
struct
dsa_params
*
params
,
...
...
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