Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nettle
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
5
Merge Requests
5
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Nettle
nettle
Commits
cd957908
Commit
cd957908
authored
Jun 25, 2014
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use WITH_HOGWEED instead of HAVE_LIBGMP for preprocessor conditionals.
parent
0f1adf55
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
12 deletions
+13
-12
ChangeLog
ChangeLog
+5
-0
testsuite/bignum-test.c
testsuite/bignum-test.c
+5
-5
testsuite/sexp-format-test.c
testsuite/sexp-format-test.c
+3
-3
testsuite/testutils.h
testsuite/testutils.h
+0
-4
No files found.
ChangeLog
View file @
cd957908
2014-06-25 Niels Möller <nisse@lysator.liu.se>
* testsuite/bignum-test.c: Use WITH_HOGWEED instead of HAVE_LIBGMP
for preprocessor conditionals.
* testsuite/testutils.h: Likewise.
* testsuite/sexp-format-test.c: Likewise.
* testsuite/ecdsa-keygen-test.c (test_main): Use printf,
mpz_out_str and write_mpn instead of gmp_fprintf.
* testsuite/ecdsa-sign-test.c (test_ecdsa): Likewise.
...
...
testsuite/bignum-test.c
View file @
cd957908
...
...
@@ -7,7 +7,7 @@
#include <stdlib.h>
#include <string.h>
#if
HAVE_LIBGMP
#if
WITH_HOGWEED
#include "bignum.h"
static
void
...
...
@@ -43,13 +43,13 @@ test_size(long x, unsigned size)
ASSERT
(
nettle_mpz_sizeinbase_256_s
(
t
)
==
size
);
mpz_clear
(
t
);
}
#endif
/*
HAVE_LIBGMP
*/
#endif
/*
WITH_HOGWEED
*/
void
test_main
(
void
)
{
#if
HAVE_LIBGMP
#if
WITH_HOGWEED
test_size
(
0
,
1
);
test_size
(
1
,
1
);
test_size
(
0x7f
,
1
);
...
...
@@ -87,7 +87,7 @@ test_main(void)
test_bignum
(
"-8000"
,
SHEX
(
"8000"
));
test_bignum
(
"-8001"
,
SHEX
(
"ff7fff"
));
#else
/* !
HAVE_LIBGMP
*/
#else
/* !
WITH_HOGWEED
*/
SKIP
();
#endif
/* !
HAVE_LIBGMP
*/
#endif
/* !
WITH_HOGWEED
*/
}
testsuite/sexp-format-test.c
View file @
cd957908
...
...
@@ -3,7 +3,7 @@
#include "buffer.h"
#if
HAVE_LIBGMP
#if
WITH_HOGWEED
# include "bignum.h"
#endif
...
...
@@ -132,7 +132,7 @@ test_main(void)
nettle_buffer_clear
(
&
buffer
);
}
#if
HAVE_LIBGMP
#if
WITH_HOGWEED
{
mpz_t
x
;
mpz_t
y
;
...
...
@@ -162,5 +162,5 @@ test_main(void)
mpz_clear
(
y
);
mpz_clear
(
z
);
}
#endif
/*
HAVE_LIBGMP
*/
#endif
/*
WITH_HOGWEED
*/
}
testsuite/testutils.h
View file @
cd957908
...
...
@@ -12,10 +12,6 @@
#include <stdio.h>
#include <string.h>
#if HAVE_LIBGMP
# include "bignum.h"
#endif
#if WITH_HOGWEED
# include "rsa.h"
# include "dsa-compat.h"
...
...
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