mirror of
https://github.com/openwrt/packages.git
synced 2025-12-22 08:14:32 +04:00
python-cryptography: Update to 41.0.4
This includes a patch to update the version of ouroboros (Rust crate) used, to fix RUSTSEC-2023-0042[1]. Upstream has switch from ouroboros to self_cell so this patch should only be necessary for cryptography 41. [1]: https://rustsec.org/advisories/RUSTSEC-2023-0042.html Signed-off-by: Jeffery To <jeffery.to@gmail.com>
This commit is contained in:
12
lang/python/python-cryptography/test.sh
Normal file
12
lang/python/python-cryptography/test.sh
Normal file
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ "$1" = python3-cryptography ] || exit 0
|
||||
|
||||
python3 - << EOF
|
||||
import sys
|
||||
from cryptography.fernet import Fernet
|
||||
key = Fernet.generate_key()
|
||||
f = Fernet(key)
|
||||
token = f.encrypt(b"my deep dark secret")
|
||||
sys.exit(0 if f.decrypt(token) == b"my deep dark secret" else 1)
|
||||
EOF
|
||||
Reference in New Issue
Block a user