package/python-rsa: new package

Python-RSA is a pure-Python RSA implementation.

Signed-off-by: Raphaël Mélotte <raphael.melotte@essensium.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Raphaël Mélotte 2020-02-07 15:16:28 +01:00 committed by Thomas Petazzoni
parent 9080721161
commit 58c99c957b
7 changed files with 47 additions and 0 deletions

View File

@ -2281,7 +2281,10 @@ F: package/python-boto3/
F: package/python-botocore/
F: package/python-jmespath/
F: package/python-pymupdf/
F: package/python-rsa/
F: package/python-s3transfer/
F: support/testing/tests/package/sample_python_rsa.py
F: support/testing/tests/package/test_python_rsa.py
N: Refik Tuzakli <tuzakli.refik@gmail.com>
F: package/freescale-imx/

View File

@ -1184,6 +1184,7 @@ menu "External python modules"
source "package/python-requests-toolbelt/Config.in"
source "package/python-rpi-gpio/Config.in"
source "package/python-rpi-ws281x/Config.in"
source "package/python-rsa/Config.in"
source "package/python-rtslib-fb/Config.in"
source "package/python-s3transfer/Config.in"
source "package/python-scandir/Config.in"

View File

@ -0,0 +1,11 @@
config BR2_PACKAGE_PYTHON_RSA
bool "python-rsa"
depends on BR2_PACKAGE_PYTHON3
select BR2_PACKAGE_PYTHON_PYASN1 # runtime
help
Python-RSA is a pure-Python RSA implementation. It supports
encryption and decryption, signing and verifying signatures,
and key generation according to PKCS\#1 version 1.5. It can
be used as a Python library as well as on the command line.
https://stuvel.eu/rsa

View File

@ -0,0 +1,5 @@
# From https://pypi.org/project/rsa/
sha256 9d689e6ca1b3038bc82bf8d23e944b6b6037bc02301a574935b2dd946e0353b9 rsa-4.7.2.tar.gz
# Locally computed
sha256 073f28b7d389c8fe74f607e17c27f81eaa5ace69edc43a884f23f41b41c5c726 LICENSE

View File

@ -0,0 +1,14 @@
################################################################################
#
# python-rsa
#
################################################################################
PYTHON_RSA_VERSION = 4.7.2
PYTHON_RSA_SOURCE = rsa-$(PYTHON_RSA_VERSION).tar.gz
PYTHON_RSA_SITE = https://files.pythonhosted.org/packages/db/b5/475c45a58650b0580421746504b680cd2db4e81bc941e94ca53785250269
PYTHON_RSA_SETUP_TYPE = setuptools
PYTHON_RSA_LICENSE = Apache-2.0
PYTHON_RSA_LICENSE_FILES = LICENSE
$(eval $(python-package))

View File

@ -0,0 +1,2 @@
import rsa
(pubkey, privkey) = rsa.newkeys(512)

View File

@ -0,0 +1,11 @@
from tests.package.test_python import TestPythonPackageBase
class TestPythonPy3RSA(TestPythonPackageBase):
__test__ = True
config = TestPythonPackageBase.config + \
"""
BR2_PACKAGE_PYTHON3=y
BR2_PACKAGE_PYTHON_RSA=y
"""
sample_scripts = ["tests/package/sample_python_rsa.py"]