summaryrefslogtreecommitdiffstats
path: root/libsodium-upstream.patch
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2015-10-21 07:25:04 +0200
committerRemi Collet <fedora@famillecollet.com>2015-10-21 07:25:04 +0200
commit698882d5792f4a6da4009133effb6643fb5cd44b (patch)
treee197b3a70f6d0c4f50fe5cec191a103822bbc1a4 /libsodium-upstream.patch
parent3171db0682ea146b479dd9b4bd53d99272c8ad4d (diff)
libsodium-last: 1.0.4
Diffstat (limited to 'libsodium-upstream.patch')
-rw-r--r--libsodium-upstream.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/libsodium-upstream.patch b/libsodium-upstream.patch
new file mode 100644
index 0000000..b4fa729
--- /dev/null
+++ b/libsodium-upstream.patch
@@ -0,0 +1,45 @@
+From 63b9c02f0c093d496edd2ebeb40e04b87813fea7 Mon Sep 17 00:00:00 2001
+From: Frank Denis <github@pureftpd.org>
+Date: Tue, 20 Oct 2015 17:48:35 +0200
+Subject: [PATCH] Alignment
+
+---
+ src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c b/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c
+index 31f12da..9177252 100644
+--- a/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c
++++ b/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c
+@@ -507,7 +507,6 @@ crypto_aead_aes256gcm_encrypt_afternm(unsigned char *c, unsigned long long *clen
+ const unsigned char *npub,
+ const crypto_aead_aes256gcm_state *ctx_)
+ {
+- unsigned char H[16];
+ const __m128i rev = _mm_set_epi8(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
+ const context *ctx = (const context *) ctx_;
+ const __m128i *rkeys = ctx->rkeys;
+@@ -515,6 +514,7 @@ crypto_aead_aes256gcm_encrypt_afternm(unsigned char *c, unsigned long long *clen
+ unsigned long long i, j;
+ unsigned long long adlen_rnd64 = adlen & ~63ULL;
+ unsigned long long mlen_rnd128 = mlen & ~127ULL;
++ CRYPTO_ALIGN(16) unsigned char H[16];
+ CRYPTO_ALIGN(16) unsigned char n2[16];
+ CRYPTO_ALIGN(16) unsigned char T[16];
+ CRYPTO_ALIGN(16) unsigned char accum[16];
+@@ -623,7 +623,6 @@ crypto_aead_aes256gcm_decrypt_afternm(unsigned char *m, unsigned long long *mlen
+ const unsigned char *npub,
+ const crypto_aead_aes256gcm_state *ctx_)
+ {
+- unsigned char H[16];
+ const __m128i rev = _mm_set_epi8(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
+ const context *ctx = (const context *) ctx_;
+ const __m128i *rkeys = ctx->rkeys;
+@@ -632,6 +631,7 @@ crypto_aead_aes256gcm_decrypt_afternm(unsigned char *m, unsigned long long *mlen
+ unsigned long long adlen_rnd64 = adlen & ~63ULL;
+ unsigned long long mlen;
+ unsigned long long mlen_rnd128;
++ CRYPTO_ALIGN(16) unsigned char H[16];
+ CRYPTO_ALIGN(16) unsigned char n2[16];
+ CRYPTO_ALIGN(16) unsigned char T[16];
+ CRYPTO_ALIGN(16) unsigned char accum[16];