python3-pynacl: update to 1.6.2
authorAlexandru Ardelean <redacted>
Thu, 9 Apr 2026 05:32:23 +0000 (08:32 +0300)
committerAlexandru Ardelean <redacted>
Fri, 10 Apr 2026 11:00:41 +0000 (14:00 +0300)
Update package to 1.6.2.

Security fix:
- Updated bundled libsodium to 1.0.20-stable (2025-12-31 build) to
  resolve CVE-2025-69277

Refresh 001-always-compile-ed25519.patch for the updated source.

Signed-off-by: Alexandru Ardelean <redacted>
lang/python/python-pynacl/Makefile
lang/python/python-pynacl/test.sh [new file with mode: 0755]

index 18778aea0899b34e6ec6ed53c0f174393ec715d1..cc0eca5afdbbf1d2e99798e6548d25b2bb64bf02 100644 (file)
@@ -1,11 +1,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-pynacl
-PKG_VERSION:=1.6.1
+PKG_VERSION:=1.6.2
 PKG_RELEASE:=1
 
 PYPI_NAME:=pynacl
-PKG_HASH:=8d361dac0309f2b6ad33b349a56cd163c98430d409fa503b10b70b3ad66eaa1d
+PKG_HASH:=018494d6d696ae03c7e656e5e74cdfd8ea1326962cc401bcf018f1ed8436811c
 
 PKG_MAINTAINER:=Javier Marcet <javier@marcet.info>
 PKG_LICENSE:=Apache-2.0
diff --git a/lang/python/python-pynacl/test.sh b/lang/python/python-pynacl/test.sh
new file mode 100755 (executable)
index 0000000..8839609
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+[ "$1" = python3-pynacl ] || exit 0
+
+python3 - << 'EOF'
+import nacl.secret
+import nacl.utils
+import nacl.public
+
+# Secret-key encryption (SecretBox)
+key = nacl.utils.random(nacl.secret.SecretBox.KEY_SIZE)
+box = nacl.secret.SecretBox(key)
+message = b"secret message"
+encrypted = box.encrypt(message)
+decrypted = box.decrypt(encrypted)
+assert decrypted == message
+
+# Public-key encryption (Box)
+alice_priv = nacl.public.PrivateKey.generate()
+bob_priv = nacl.public.PrivateKey.generate()
+alice_box = nacl.public.Box(alice_priv, bob_priv.public_key)
+bob_box = nacl.public.Box(bob_priv, alice_priv.public_key)
+
+msg = b"hello bob"
+enc = alice_box.encrypt(msg)
+dec = bob_box.decrypt(enc)
+assert dec == msg
+EOF
git clone https://git.99rst.org/PROJECT