summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2021-05-21 16:25:27 -0400
committerStefano Rivera <stefanor@debian.org>2021-05-21 21:35:48 +0100
commit71840e811ac468ae9f966a9711e1d84176a0de46 (patch)
treebb9c0dd81916fe86d0dd1f4b72d7b2f68bcd7d1e
parentd931476647ff7aadfd8e4cd7473ac97aa6a10444 (diff)
Fix crypto_kdf_derive_from_key() on 32-bit platforms
Bug-Upstream: https://github.com/saltstack/libnacl/issues/126 Bug-Debian: https://bugs.debian.org/988102 Forwarded: https://github.com/saltstack/libnacl/pull/130 Gbp-Pq: Name 32bit-kdf.patch
-rw-r--r--libnacl/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/libnacl/__init__.py b/libnacl/__init__.py
index 98a53d9..f799b23 100644
--- a/libnacl/__init__.py
+++ b/libnacl/__init__.py
@@ -1195,7 +1195,7 @@ def crypto_kdf_derive_from_key(subkey_size, subkey_id, context, master_key):
"""
size = int(subkey_size)
buf = ctypes.create_string_buffer(size)
- nacl.crypto_kdf_derive_from_key(buf, subkey_size, subkey_id, context, master_key)
+ nacl.crypto_kdf_derive_from_key(buf, subkey_size, ctypes.c_ulonglong(subkey_id), context, master_key)
return buf.raw