diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2015-06-18 22:50:18 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2015-06-18 22:50:18 +0200 |
commit | 9d275af092cb25a169803246dde291fc561a015a (patch) | |
tree | ed1457cd8457e7f30f1584c6693f8c35e0571b67 /tests/mini-alignment.c | |
parent | a3e3ef1942c04383dffadec45111cd86dfdbf887 (diff) | |
download | gnutls-9d275af092cb25a169803246dde291fc561a015a.tar.gz |
tests: don't enforce alignment rules for caller buffers
Diffstat (limited to 'tests/mini-alignment.c')
-rw-r--r-- | tests/mini-alignment.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/mini-alignment.c b/tests/mini-alignment.c index 5d86efc0f8..4944660a95 100644 --- a/tests/mini-alignment.c +++ b/tests/mini-alignment.c @@ -175,9 +175,11 @@ myaes_encrypt(void *_ctx, const void *src, size_t src_size, { struct myaes_ctx *ctx = _ctx; +#if 0 /* this is under the control of the caller */ if (((unsigned long)src)%16 != 0) { fail("encrypt: source is not 16-byte aligned: %lu\n", ((unsigned long)src)%16); } +#endif if (((unsigned long)dst)%16 != 0) { fail("encrypt: dest is not 16-byte aligned: %lu\n", ((unsigned long)dst)%16); @@ -197,9 +199,11 @@ myaes_decrypt(void *_ctx, const void *src, size_t src_size, fail("decrypt: source is not 16-byte aligned: %lu\n", ((unsigned long)src)%16); } +#if 0 /* this is under the control of the caller */ if (((unsigned long)dst)%16 != 0) { fail("decrypt: dest is not 16-byte aligned: %lu\n", ((unsigned long)dst)%16); } +#endif cbc_decrypt(&ctx->aes, (nettle_cipher_func*)aes_decrypt, 16, ctx->iv, src_size, dst, src); |