python3-pynacl: update to 1.6.2

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 <alex@shruggie.ro>
This commit is contained in:
Alexandru Ardelean
2026-04-09 08:32:23 +03:00
committed by Alexandru Ardelean
parent a509f32047
commit eb513f6cec
2 changed files with 30 additions and 2 deletions

View 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

View File

@@ -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