forked from pool/python-cryptography
- update to 42.0.1:
* Fixed an issue with incorrect keyword-argument naming with EllipticCurvePrivateKey :meth:`~cryptography.hazmat.primitive s.asymmetric.ec.EllipticCurvePrivateKey.sign`. * Resolved compatibility issue with loading certain RSA public keys in :func:`~cryptography.hazmat.primitives.serialization. load_pem_public_key`. * BACKWARDS INCOMPATIBLE: Dropped support for LibreSSL < 3.7. * BACKWARDS INCOMPATIBLE: Loading a PKCS7 with no content field using :func:`~cryptography.hazmat.primitives.serialization.pk cs7.load_pem_pkcs7_certificates` or :func:`~cryptography.hazm at.primitives.serialization.pkcs7.load_der_pkcs7_certificates ` will now raise a ValueError rather than return an empty list. * Parsing SSH certificates no longer permits malformed critical options with values, as documented in the 41.0.2 release notes. * Updated Windows, macOS, and Linux wheels to be compiled with OpenSSL 3.2.0. * Updated the minimum supported Rust version (MSRV) to 1.63.0, from 1.56.0. * We now publish both py37 and py39 abi3 wheels. This should resolve some errors relating to initializing a module multiple times per process. * Support :class:`~cryptography.hazmat.primitives.asymmetric.pa dding.PSS` for X.509 certificate signing requests and certificate revocation lists with the keyword-only argument rsa_padding on the sign methods for :class:`~cryptography.x509.CertificateSigningRequestBuilder` and OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cryptography?expand=0&rev=205
This commit is contained in:
@@ -8,9 +8,11 @@
|
||||
tests/bench/test_x509.py | 16 ++++++-------
|
||||
7 files changed, 37 insertions(+), 68 deletions(-)
|
||||
|
||||
--- a/pyproject.toml
|
||||
+++ b/pyproject.toml
|
||||
@@ -69,8 +69,6 @@ ssh = ["bcrypt >=3.1.5"]
|
||||
Index: cryptography-42.0.1/pyproject.toml
|
||||
===================================================================
|
||||
--- cryptography-42.0.1.orig/pyproject.toml
|
||||
+++ cryptography-42.0.1/pyproject.toml
|
||||
@@ -71,8 +71,6 @@ ssh = ["bcrypt >=3.1.5"]
|
||||
nox = ["nox"]
|
||||
test = [
|
||||
"pytest >=6.2.0",
|
||||
@@ -18,9 +20,9 @@
|
||||
- "pytest-cov",
|
||||
"pytest-xdist",
|
||||
"pretend",
|
||||
]
|
||||
@@ -85,7 +83,7 @@ line-length = 79
|
||||
target-version = ["py37"]
|
||||
"certifi",
|
||||
@@ -92,7 +90,7 @@ rust-version = ">=1.63.0"
|
||||
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
-addopts = "-r s --capture=no --strict-markers --benchmark-disable"
|
||||
@@ -28,7 +30,7 @@
|
||||
console_output_style = "progress-even-when-capture-no"
|
||||
markers = [
|
||||
"skip_fips: this test is not executed in FIPS mode",
|
||||
@@ -107,33 +105,6 @@ module = [
|
||||
@@ -114,33 +112,6 @@ module = [
|
||||
]
|
||||
ignore_missing_imports = true
|
||||
|
||||
@@ -60,11 +62,13 @@
|
||||
-]
|
||||
-
|
||||
[tool.ruff]
|
||||
# UP006: Minimum Python 3.9
|
||||
# UP007, UP038: Minimum Python 3.10
|
||||
--- a/src/cryptography.egg-info/requires.txt
|
||||
+++ b/src/cryptography.egg-info/requires.txt
|
||||
@@ -26,8 +26,6 @@ bcrypt>=3.1.5
|
||||
ignore = ['N818']
|
||||
select = ['E', 'F', 'I', 'N', 'W', 'UP', 'RUF']
|
||||
Index: cryptography-42.0.1/src/cryptography.egg-info/requires.txt
|
||||
===================================================================
|
||||
--- cryptography-42.0.1.orig/src/cryptography.egg-info/requires.txt
|
||||
+++ cryptography-42.0.1/src/cryptography.egg-info/requires.txt
|
||||
@@ -28,8 +28,6 @@ bcrypt>=3.1.5
|
||||
|
||||
[test]
|
||||
pytest>=6.2.0
|
||||
@@ -72,10 +76,12 @@
|
||||
-pytest-cov
|
||||
pytest-xdist
|
||||
pretend
|
||||
|
||||
--- a/tests/bench/test_aead.py
|
||||
+++ b/tests/bench/test_aead.py
|
||||
@@ -19,84 +19,84 @@ from ..hazmat.primitives.test_aead impor
|
||||
certifi
|
||||
Index: cryptography-42.0.1/tests/bench/test_aead.py
|
||||
===================================================================
|
||||
--- cryptography-42.0.1.orig/tests/bench/test_aead.py
|
||||
+++ cryptography-42.0.1/tests/bench/test_aead.py
|
||||
@@ -26,84 +26,84 @@ def _aead_supported(cls):
|
||||
not _aead_supported(ChaCha20Poly1305),
|
||||
reason="Requires OpenSSL with ChaCha20Poly1305 support",
|
||||
)
|
||||
@@ -180,8 +186,10 @@
|
||||
ct = aes.encrypt(b"\x00" * 12, b"hello world plaintext", None)
|
||||
- benchmark(aes.decrypt, b"\x00" * 12, ct, None)
|
||||
+ aes.decrypt(b"\x00" * 12, ct, None)
|
||||
--- a/tests/bench/test_ec_load.py
|
||||
+++ b/tests/bench/test_ec_load.py
|
||||
Index: cryptography-42.0.1/tests/bench/test_ec_load.py
|
||||
===================================================================
|
||||
--- cryptography-42.0.1.orig/tests/bench/test_ec_load.py
|
||||
+++ cryptography-42.0.1/tests/bench/test_ec_load.py
|
||||
@@ -5,9 +5,9 @@
|
||||
from ..hazmat.primitives.fixtures_ec import EC_KEY_SECP256R1
|
||||
|
||||
@@ -196,8 +204,10 @@
|
||||
- benchmark(EC_KEY_SECP256R1.private_key)
|
||||
+def test_load_ec_private_numbers():
|
||||
+ EC_KEY_SECP256R1.private_key()
|
||||
--- a/tests/bench/test_hashes.py
|
||||
+++ b/tests/bench/test_hashes.py
|
||||
Index: cryptography-42.0.1/tests/bench/test_hashes.py
|
||||
===================================================================
|
||||
--- cryptography-42.0.1.orig/tests/bench/test_hashes.py
|
||||
+++ cryptography-42.0.1/tests/bench/test_hashes.py
|
||||
@@ -5,10 +5,10 @@
|
||||
from cryptography.hazmat.primitives import hashes
|
||||
|
||||
@@ -211,8 +221,10 @@
|
||||
|
||||
- benchmark(bench)
|
||||
+ bench()
|
||||
--- a/tests/bench/test_hmac.py
|
||||
+++ b/tests/bench/test_hmac.py
|
||||
Index: cryptography-42.0.1/tests/bench/test_hmac.py
|
||||
===================================================================
|
||||
--- cryptography-42.0.1.orig/tests/bench/test_hmac.py
|
||||
+++ cryptography-42.0.1/tests/bench/test_hmac.py
|
||||
@@ -5,10 +5,10 @@
|
||||
from cryptography.hazmat.primitives import hashes, hmac
|
||||
|
||||
@@ -226,16 +238,18 @@
|
||||
|
||||
- benchmark(bench)
|
||||
+ bench()
|
||||
--- a/tests/bench/test_x509.py
|
||||
+++ b/tests/bench/test_x509.py
|
||||
@@ -9,34 +9,34 @@ from cryptography import x509
|
||||
Index: cryptography-42.0.1/tests/bench/test_x509.py
|
||||
===================================================================
|
||||
--- cryptography-42.0.1.orig/tests/bench/test_x509.py
|
||||
+++ cryptography-42.0.1/tests/bench/test_x509.py
|
||||
@@ -13,40 +13,40 @@ from cryptography import x509
|
||||
from ..utils import load_vectors_from_file
|
||||
|
||||
|
||||
-def test_object_identier_constructor(benchmark):
|
||||
-def test_object_identifier_constructor(benchmark):
|
||||
- benchmark(x509.ObjectIdentifier, "1.3.6.1.4.1.11129.2.4.5")
|
||||
+def test_object_identier_constructor():
|
||||
+ x509.ObjectIdentifier("1.3.6.1.4.1.11129.2.4.5")
|
||||
+def test_object_identifier_constructor():
|
||||
+ x509.ObjectIdentifier, "1.3.6.1.4.1.11129.2.4.5"
|
||||
|
||||
|
||||
-def test_aki_public_bytes(benchmark):
|
||||
@@ -246,7 +260,7 @@
|
||||
authority_cert_serial_number=None,
|
||||
)
|
||||
- benchmark(aki.public_bytes)
|
||||
+ aki.public_bytes()
|
||||
+ aki.public_bytes
|
||||
|
||||
|
||||
-def test_load_der_certificate(benchmark):
|
||||
@@ -258,7 +272,7 @@
|
||||
)
|
||||
|
||||
- benchmark(x509.load_der_x509_certificate, cert_bytes)
|
||||
+ x509.load_der_x509_certificate(cert_bytes)
|
||||
+ x509.load_der_x509_certificate, cert_bytes
|
||||
|
||||
|
||||
-def test_load_pem_certificate(benchmark):
|
||||
@@ -270,4 +284,17 @@
|
||||
)
|
||||
|
||||
- benchmark(x509.load_pem_x509_certificate, cert_bytes)
|
||||
+ x509.load_pem_x509_certificate(cert_bytes)
|
||||
+ x509.load_pem_x509_certificate, cert_bytes
|
||||
|
||||
|
||||
-def test_verify_docs_python_org(benchmark, pytestconfig):
|
||||
+def test_verify_docs_python_org(pytestconfig):
|
||||
limbo_root = pytestconfig.getoption("--x509-limbo-root", skip=True)
|
||||
with open(os.path.join(limbo_root, "limbo.json"), "rb") as f:
|
||||
[testcase] = [
|
||||
@@ -78,4 +78,4 @@ def test_verify_docs_python_org(benchmar
|
||||
)
|
||||
verifier.verify(leaf, intermediates)
|
||||
|
||||
- benchmark(bench)
|
||||
+ bench
|
||||
|
Reference in New Issue
Block a user