Commit 57e71a91 authored by Colin Watson's avatar Colin Watson

Restore crypto_aead_aes256gcm_*BYTES on old CPUs.

parents 1e489722 179b907c
# see git-dpm(1) from git-dpm package
97927e81954f84f59b8e61e9b5d32a49d7c58835
97927e81954f84f59b8e61e9b5d32a49d7c58835
179b907c934ed223175846f6c31e50dfc7910aeb
179b907c934ed223175846f6c31e50dfc7910aeb
6655b431658be027b850f4b5d9b89f37da66fc2e
6655b431658be027b850f4b5d9b89f37da66fc2e
python-libnacl_1.5.2.orig.tar.gz
......
python-libnacl (1.5.2-3) UNRELEASED; urgency=medium
* Restore crypto_aead_aes256gcm_*BYTES on old CPUs.
-- Colin Watson <cjwatson@debian.org> Fri, 04 Aug 2017 10:04:53 +0100
python-libnacl (1.5.2-2) unstable; urgency=medium
* Check whether AEAD functions are available (closes: #869241).
......
From 179b907c934ed223175846f6c31e50dfc7910aeb Mon Sep 17 00:00:00 2001
From: Colin Watson <cjwatson@debian.org>
Date: Fri, 4 Aug 2017 09:59:46 +0100
Subject: Restore crypto_aead_aes256gcm_*BYTES on old CPUs
`crypto_aead_aes256gcm_KEYBYTES`, `crypto_aead_aes256gcm_NPUBBYTES`, and
`crypto_aead_aes256gcm_ABYTES` should still be available even if CPU
support for AES256-GCM encryption/decryption is missing.
`libnacl.utils.aead_key` relies on this, and is needed by the
`test_ietf_aead` test which is run even without CPU support for
AES256-GCM.
Bug-Debian: https://bugs.debian.org/869241
Forwarded: https://github.com/saltstack/libnacl/pull/100
Last-Update: 2017-08-04
Patch-Name: aead-aes256gcm-restore-foobytes.patch
---
libnacl/__init__.py | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/libnacl/__init__.py b/libnacl/__init__.py
index 23a58e5..940eeaf 100644
--- a/libnacl/__init__.py
+++ b/libnacl/__init__.py
@@ -101,13 +101,10 @@ try:
except AttributeError:
HAS_SEAL = False
try:
- if nacl.crypto_aead_aes256gcm_is_available():
- crypto_aead_aes256gcm_KEYBYTES = nacl.crypto_aead_aes256gcm_keybytes()
- crypto_aead_aes256gcm_NPUBBYTES = nacl.crypto_aead_aes256gcm_npubbytes()
- crypto_aead_aes256gcm_ABYTES = nacl.crypto_aead_aes256gcm_abytes()
- HAS_AEAD_AES256GCM = True
- else:
- HAS_AEAD_AES256GCM = False
+ crypto_aead_aes256gcm_KEYBYTES = nacl.crypto_aead_aes256gcm_keybytes()
+ crypto_aead_aes256gcm_NPUBBYTES = nacl.crypto_aead_aes256gcm_npubbytes()
+ crypto_aead_aes256gcm_ABYTES = nacl.crypto_aead_aes256gcm_abytes()
+ HAS_AEAD_AES256GCM = bool(nacl.crypto_aead_aes256gcm_is_available())
crypto_aead_chacha20poly1305_ietf_KEYBYTES = nacl.crypto_aead_chacha20poly1305_ietf_keybytes()
crypto_aead_chacha20poly1305_ietf_NPUBBYTES = nacl.crypto_aead_chacha20poly1305_ietf_npubbytes()
crypto_aead_chacha20poly1305_ietf_ABYTES = nacl.crypto_aead_chacha20poly1305_ietf_abytes()
aead-check-available.patch
aead-aes256gcm-restore-foobytes.patch
......@@ -101,13 +101,10 @@ try:
except AttributeError:
HAS_SEAL = False
try:
if nacl.crypto_aead_aes256gcm_is_available():
crypto_aead_aes256gcm_KEYBYTES = nacl.crypto_aead_aes256gcm_keybytes()
crypto_aead_aes256gcm_NPUBBYTES = nacl.crypto_aead_aes256gcm_npubbytes()
crypto_aead_aes256gcm_ABYTES = nacl.crypto_aead_aes256gcm_abytes()
HAS_AEAD_AES256GCM = True
else:
HAS_AEAD_AES256GCM = False
crypto_aead_aes256gcm_KEYBYTES = nacl.crypto_aead_aes256gcm_keybytes()
crypto_aead_aes256gcm_NPUBBYTES = nacl.crypto_aead_aes256gcm_npubbytes()
crypto_aead_aes256gcm_ABYTES = nacl.crypto_aead_aes256gcm_abytes()
HAS_AEAD_AES256GCM = bool(nacl.crypto_aead_aes256gcm_is_available())
crypto_aead_chacha20poly1305_ietf_KEYBYTES = nacl.crypto_aead_chacha20poly1305_ietf_keybytes()
crypto_aead_chacha20poly1305_ietf_NPUBBYTES = nacl.crypto_aead_chacha20poly1305_ietf_npubbytes()
crypto_aead_chacha20poly1305_ietf_ABYTES = nacl.crypto_aead_chacha20poly1305_ietf_abytes()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment