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
bbecbf2b
Commit
bbecbf2b
authored
Apr 11, 2014
by
Niels Möller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In aead tests, use aead->digest_size.
parent
360dfd98
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
ChangeLog
ChangeLog
+2
-0
testsuite/testutils.c
testsuite/testutils.c
+4
-4
No files found.
ChangeLog
View file @
bbecbf2b
2014-04-11 Niels Möller <nisse@lysator.liu.se>
* testsuite/testutils.c (test_aead): Use aead->digest_size.
* configure.ac: Skip GMP tests if public key support is disabled.
* eax.c (block16_xor): Fixed bug effecting 32-bit platforms.
...
...
testsuite/testutils.c
View file @
bbecbf2b
...
...
@@ -478,19 +478,19 @@ test_aead(const struct nettle_aead *aead,
{
void
*
ctx
=
xalloc
(
aead
->
context_size
);
uint8_t
*
data
;
uint8_t
*
buffer
=
xalloc
(
aead
->
block
_size
);
uint8_t
*
buffer
=
xalloc
(
aead
->
digest
_size
);
size_t
length
;
ASSERT
(
cleartext
->
length
==
ciphertext
->
length
);
length
=
cleartext
->
length
;
ASSERT
(
key
->
length
==
aead
->
key_size
);
ASSERT
(
digest
->
length
<=
aead
->
block
_size
);
ASSERT
(
digest
->
length
<=
aead
->
digest
_size
);
data
=
xalloc
(
length
);
/* encryption */
memset
(
buffer
,
0
,
aead
->
block
_size
);
memset
(
buffer
,
0
,
aead
->
digest
_size
);
aead
->
set_encrypt_key
(
ctx
,
key
->
data
);
if
(
nonce
->
length
!=
aead
->
nonce_size
)
...
...
@@ -513,7 +513,7 @@ test_aead(const struct nettle_aead *aead,
ASSERT
(
MEMEQ
(
digest
->
length
,
buffer
,
digest
->
data
));
/* decryption */
memset
(
buffer
,
0
,
aead
->
block
_size
);
memset
(
buffer
,
0
,
aead
->
digest
_size
);
aead
->
set_decrypt_key
(
ctx
,
key
->
data
);
...
...
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