summaryrefslogtreecommitdiff
path: root/lib/accelerated/x86
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2014-11-25 19:42:10 +0100
committerNikos Mavrogiannopoulos <nmav@redhat.com>2014-12-03 10:12:19 +0100
commitad47401d49e115d0f184a6e1f1716e17c55d15ad (patch)
tree9dd4052a238f293115696edfeb937461bcea700b /lib/accelerated/x86
parent866a12f01142b6655f848b63a4a55f8a03fa2c4a (diff)
downloadgnutls-ad47401d49e115d0f184a6e1f1716e17c55d15ad.tar.gz
aes-gcm-aead.h: generalized
Diffstat (limited to 'lib/accelerated/x86')
-rw-r--r--lib/accelerated/x86/aes-gcm-aead.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/accelerated/x86/aes-gcm-aead.h b/lib/accelerated/x86/aes-gcm-aead.h
index 0fb88f1f11..a1a71edbc5 100644
--- a/lib/accelerated/x86/aes-gcm-aead.h
+++ b/lib/accelerated/x86/aes-gcm-aead.h
@@ -1,13 +1,11 @@
static int
-aes_gcm_aead_encrypt(void *_ctx,
+aes_gcm_aead_encrypt(void *ctx,
const void *nonce, size_t nonce_size,
const void *auth, size_t auth_size,
size_t tag_size,
const void *plain, size_t plain_size,
void *encr, size_t encr_size)
{
- struct gcm_padlock_aes_ctx *ctx = _ctx;
-
/* proper AEAD cipher */
if (encr_size < plain_size + tag_size)
return gnutls_assert_val(GNUTLS_E_SHORT_MEMORY_BUFFER);
@@ -22,14 +20,13 @@ aes_gcm_aead_encrypt(void *_ctx,
}
static int
-aes_gcm_aead_decrypt(void *_ctx,
+aes_gcm_aead_decrypt(void *ctx,
const void *nonce, size_t nonce_size,
const void *auth, size_t auth_size,
size_t tag_size,
const void *encr, size_t encr_size,
void *plain, size_t plain_size)
{
- struct gcm_padlock_aes_ctx *ctx = _ctx;
uint8_t tag[MAX_HASH_SIZE];
if (encr_size < tag_size)