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
Wim Lewis
nettle
Commits
bbecbf2b
Commit
bbecbf2b
authored
Apr 11, 2014
by
Niels Möller
Browse files
In aead tests, use aead->digest_size.
parent
360dfd98
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
bbecbf2b
2014-04-11 Niels Möller <nisse@lysator.liu.se>
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.
* configure.ac: Skip GMP tests if public key support is disabled.
* eax.c (block16_xor): Fixed bug effecting 32-bit platforms.
* 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,
...
@@ -478,19 +478,19 @@ test_aead(const struct nettle_aead *aead,
{
{
void
*
ctx
=
xalloc
(
aead
->
context_size
);
void
*
ctx
=
xalloc
(
aead
->
context_size
);
uint8_t
*
data
;
uint8_t
*
data
;
uint8_t
*
buffer
=
xalloc
(
aead
->
block
_size
);
uint8_t
*
buffer
=
xalloc
(
aead
->
digest
_size
);
size_t
length
;
size_t
length
;
ASSERT
(
cleartext
->
length
==
ciphertext
->
length
);
ASSERT
(
cleartext
->
length
==
ciphertext
->
length
);
length
=
cleartext
->
length
;
length
=
cleartext
->
length
;
ASSERT
(
key
->
length
==
aead
->
key_size
);
ASSERT
(
key
->
length
==
aead
->
key_size
);
ASSERT
(
digest
->
length
<=
aead
->
block
_size
);
ASSERT
(
digest
->
length
<=
aead
->
digest
_size
);
data
=
xalloc
(
length
);
data
=
xalloc
(
length
);
/* encryption */
/* encryption */
memset
(
buffer
,
0
,
aead
->
block
_size
);
memset
(
buffer
,
0
,
aead
->
digest
_size
);
aead
->
set_encrypt_key
(
ctx
,
key
->
data
);
aead
->
set_encrypt_key
(
ctx
,
key
->
data
);
if
(
nonce
->
length
!=
aead
->
nonce_size
)
if
(
nonce
->
length
!=
aead
->
nonce_size
)
...
@@ -513,7 +513,7 @@ test_aead(const struct nettle_aead *aead,
...
@@ -513,7 +513,7 @@ test_aead(const struct nettle_aead *aead,
ASSERT
(
MEMEQ
(
digest
->
length
,
buffer
,
digest
->
data
));
ASSERT
(
MEMEQ
(
digest
->
length
,
buffer
,
digest
->
data
));
/* decryption */
/* decryption */
memset
(
buffer
,
0
,
aead
->
block
_size
);
memset
(
buffer
,
0
,
aead
->
digest
_size
);
aead
->
set_decrypt_key
(
ctx
,
key
->
data
);
aead
->
set_decrypt_key
(
ctx
,
key
->
data
);
...
...
Write
Preview
Supports
Markdown
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