forked from pool/python-M2Crypto
[info=84719d15958723c50ce3c421816606b4b175f5b71c6aa0f22a7a3a90f2a78fd6]
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-M2Crypto?expand=0&rev=143
This commit is contained in:
committed by
Git OBS Bridge
parent
ae1e17768e
commit
9a0dc67b3f
477
0.45.1.patch
477
0.45.1.patch
@@ -1,71 +1,41 @@
|
||||
diff --git a/.build.yml b/.build.yml
|
||||
index 14cec19..69ceec0 100644
|
||||
--- a/.build.yml
|
||||
+++ b/.build.yml
|
||||
@@ -1,4 +1,4 @@
|
||||
-image: fedora/latest
|
||||
+image: fedora/rawhide
|
||||
oauth: git.sr.ht/REPOSITORIES:RW git.sr.ht/PROFILE:RO
|
||||
packages:
|
||||
- hut
|
||||
@@ -9,7 +9,6 @@ packages:
|
||||
- openssl-devel
|
||||
- openssl-devel-engine
|
||||
- openssl
|
||||
- - crypto-policies-scripts
|
||||
- python3-setuptools
|
||||
- python3-twisted
|
||||
- python3-pexpect
|
||||
@@ -32,7 +31,6 @@ tasks:
|
||||
python3 -mpip install -v --upgrade --target $(readlink -f build/lib.*) --no-compile --ignore-installed --no-deps --no-index dist/m2crypto*.whl
|
||||
- test: |
|
||||
cd m2crypto
|
||||
- sudo update-crypto-policies --set LEGACY
|
||||
PYTHONPATH=$(readlink -f build/lib.*) python3 -munittest -b -v tests.alltests.suite
|
||||
[ -n "$GIT_REF" ] && REASON="$JOB_ID ($GIT_REF)"
|
||||
[ -n "$PATCHSET_URL" ] && REASON="$JOB_ID ($PATCHSET_URL)"
|
||||
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
|
||||
index 4c877d9..8926913 100644
|
||||
--- a/.gitlab-ci.yml
|
||||
+++ b/.gitlab-ci.yml
|
||||
@@ -95,7 +95,7 @@ fedora:
|
||||
stage: build
|
||||
script:
|
||||
- dnf makecache
|
||||
- - dnf install -y @development-tools fedora-packager rpmdevtools crypto-policies-scripts
|
||||
+ - dnf install -y @development-tools fedora-packager rpmdevtools
|
||||
- dnf install -y swig python3-devel python3-pip openssl-devel openssl python3-setuptools python3-twisted openssl-devel-engine
|
||||
- mkdir -p $HOME/.local/bin
|
||||
- ls $HOME/.local/bin
|
||||
@@ -104,7 +104,6 @@ fedora:
|
||||
- ls $HOME/.local/bin
|
||||
- python3 -mpip wheel --verbose --no-cache-dir --no-clean --no-build-isolation --wheel-dir dist/ --editable .
|
||||
- python3 -mpip install -v --upgrade --target $(readlink -f build/lib.*) --no-compile --ignore-installed --no-deps --no-index dist/m2crypto*.whl
|
||||
- - update-crypto-policies --set LEGACY
|
||||
- PYTHONPATH=$(readlink -f build/lib.*) python3 -munittest -b -v tests.alltests.suite
|
||||
|
||||
fedora-rawhide:
|
||||
@@ -113,7 +112,7 @@ fedora-rawhide:
|
||||
stage: build
|
||||
script:
|
||||
- dnf makecache
|
||||
- - dnf install -y @development-tools fedora-packager rpmdevtools crypto-policies-scripts
|
||||
+ - dnf install -y @development-tools fedora-packager rpmdevtools
|
||||
- dnf install -y swig python3-devel python3-pip openssl-devel openssl python3-setuptools python3-twisted openssl-devel-engine
|
||||
- mkdir -p $HOME/.local/bin
|
||||
- ls $HOME/.local/bin
|
||||
@@ -122,7 +121,6 @@ fedora-rawhide:
|
||||
- ls $HOME/.local/bin
|
||||
- python3 -mpip wheel --verbose --no-cache-dir --no-clean --no-build-isolation --wheel-dir dist/ --editable .
|
||||
- python3 -mpip install --break-system-packages -v --upgrade --target $(readlink -f build/lib.*) --no-compile --ignore-installed --no-deps --no-index dist/m2crypto*.whl
|
||||
- - update-crypto-policies --set LEGACY
|
||||
- PYTHONPATH=$(readlink -f build/lib.*) python3 -munittest -b -v tests.alltests.suite
|
||||
allow_failure: true
|
||||
|
||||
diff --git a/CHANGES b/CHANGES
|
||||
index 7402513..2e1c006 100644
|
||||
--- a/CHANGES
|
||||
+++ b/CHANGES
|
||||
---
|
||||
CHANGES | 5 +
|
||||
MANIFEST.in | 1
|
||||
doc/howto.migration.rst | 14 ++--
|
||||
src/M2Crypto/AuthCookie.py | 2
|
||||
src/M2Crypto/DSA.py | 2
|
||||
src/M2Crypto/EVP.py | 12 +--
|
||||
src/M2Crypto/RSA.py | 8 +-
|
||||
src/M2Crypto/SMIME.py | 2
|
||||
src/M2Crypto/SSL/Checker.py | 10 +-
|
||||
src/M2Crypto/__init__.py | 2
|
||||
tests/ca.pem | 150 ++++++++++++++++++++++----------------------
|
||||
tests/ca_key.pem | 50 +++++++-------
|
||||
tests/makecerts.py | 37 ++++++++++
|
||||
tests/recipient.pem | 150 ++++++++++++++++++++++----------------------
|
||||
tests/recipient_key.pem | 50 +++++++-------
|
||||
tests/rsa.priv.pem | 40 +++++++----
|
||||
tests/rsa.priv2.pem | 45 ++++++++-----
|
||||
tests/rsa.pub.pem | 11 ++-
|
||||
tests/server.pem | 150 ++++++++++++++++++++++----------------------
|
||||
tests/server_key.pem | 50 +++++++-------
|
||||
tests/signer.pem | 102 ++++++++++++++---------------
|
||||
tests/signer_key.pem | 50 +++++++-------
|
||||
tests/test_authcookie.py | 4 -
|
||||
tests/test_dsa.py | 4 -
|
||||
tests/test_ecdsa.py | 2
|
||||
tests/test_evp.py | 60 +++++++++--------
|
||||
tests/test_rsa.py | 55 ++++++++++------
|
||||
tests/test_ssl_offline.py | 2
|
||||
tests/test_x509.py | 16 ++--
|
||||
tests/x509.pem | 150 ++++++++++++++++++++++----------------------
|
||||
tests/x509_key.pem | 50 +++++++-------
|
||||
31 files changed, 684 insertions(+), 602 deletions(-)
|
||||
|
||||
Index: m2crypto-0.45.0/CHANGES
|
||||
===================================================================
|
||||
--- m2crypto-0.45.0.orig/CHANGES 2025-04-17 05:30:40.000000000 +0200
|
||||
+++ m2crypto-0.45.0/CHANGES 2025-04-23 00:03:54.558098702 +0200
|
||||
@@ -1,3 +1,8 @@
|
||||
+0.45.1 - 2025-04-19
|
||||
+-------------------
|
||||
@@ -75,11 +45,11 @@ index 7402513..2e1c006 100644
|
||||
0.45.0 - 2025-04-17
|
||||
-------------------
|
||||
|
||||
diff --git a/MANIFEST.in b/MANIFEST.in
|
||||
index d4c773f..9d35ffe 100644
|
||||
--- a/MANIFEST.in
|
||||
+++ b/MANIFEST.in
|
||||
@@ -4,6 +4,7 @@ include src/SWIG/*.def
|
||||
Index: m2crypto-0.45.0/MANIFEST.in
|
||||
===================================================================
|
||||
--- m2crypto-0.45.0.orig/MANIFEST.in 2025-04-17 05:30:40.000000000 +0200
|
||||
+++ m2crypto-0.45.0/MANIFEST.in 2025-04-23 00:03:54.558262580 +0200
|
||||
@@ -4,6 +4,7 @@
|
||||
recursive-include tests *.py *.pem *.der *.b64 README *.pgp *.dat *.p7* *.crt *.txt
|
||||
recursive-include doc *
|
||||
recursive-include contrib *
|
||||
@@ -87,11 +57,11 @@ index d4c773f..9d35ffe 100644
|
||||
recursive-exclude .keys *
|
||||
include INSTALL.rst
|
||||
include README.rst
|
||||
diff --git a/doc/howto.migration.rst b/doc/howto.migration.rst
|
||||
index 4e26db9..f4e2213 100644
|
||||
--- a/doc/howto.migration.rst
|
||||
+++ b/doc/howto.migration.rst
|
||||
@@ -109,7 +109,8 @@ M2Crypto
|
||||
Index: m2crypto-0.45.0/doc/howto.migration.rst
|
||||
===================================================================
|
||||
--- m2crypto-0.45.0.orig/doc/howto.migration.rst 2025-04-17 05:30:40.000000000 +0200
|
||||
+++ m2crypto-0.45.0/doc/howto.migration.rst 2025-04-23 00:03:54.558376194 +0200
|
||||
@@ -109,7 +109,8 @@
|
||||
.. testoutput::
|
||||
:hide:
|
||||
|
||||
@@ -101,7 +71,7 @@ index 4e26db9..f4e2213 100644
|
||||
|
||||
PyCA/cryptography
|
||||
-----------------
|
||||
@@ -132,7 +133,7 @@ PyCA/cryptography
|
||||
@@ -132,7 +133,7 @@
|
||||
.. testoutput::
|
||||
:hide:
|
||||
|
||||
@@ -110,7 +80,7 @@ index 4e26db9..f4e2213 100644
|
||||
|
||||
|
||||
Encrypting and decrypting
|
||||
@@ -198,9 +199,8 @@ M2Crypto
|
||||
@@ -198,9 +199,8 @@
|
||||
|
||||
/C=US/ST=California/O=M2Crypto/CN=Heikki Toivonen
|
||||
/C=US/ST=California/O=M2Crypto/CN=X509
|
||||
@@ -122,7 +92,7 @@ index 4e26db9..f4e2213 100644
|
||||
|
||||
PyCA/cryptography
|
||||
-----------------
|
||||
@@ -221,8 +221,8 @@ PyCA/cryptography
|
||||
@@ -221,8 +221,8 @@
|
||||
|
||||
<Name(C=US,ST=California,O=M2Crypto,CN=Heikki Toivonen)>
|
||||
<Name(C=US,ST=California,O=M2Crypto,CN=X509)>
|
||||
@@ -133,11 +103,11 @@ index 4e26db9..f4e2213 100644
|
||||
|
||||
|
||||
Signature verification
|
||||
diff --git a/src/M2Crypto/AuthCookie.py b/src/M2Crypto/AuthCookie.py
|
||||
index 3c05ca0..ffb3476 100644
|
||||
--- a/src/M2Crypto/AuthCookie.py
|
||||
+++ b/src/M2Crypto/AuthCookie.py
|
||||
@@ -114,7 +114,7 @@ class AuthCookieJar:
|
||||
Index: m2crypto-0.45.0/src/M2Crypto/AuthCookie.py
|
||||
===================================================================
|
||||
--- m2crypto-0.45.0.orig/src/M2Crypto/AuthCookie.py 2025-04-17 05:30:40.000000000 +0200
|
||||
+++ m2crypto-0.45.0/src/M2Crypto/AuthCookie.py 2025-04-23 00:03:54.558582292 +0200
|
||||
@@ -114,7 +114,7 @@
|
||||
self._key = Rand.rand_bytes(self._keylen)
|
||||
|
||||
def _hmac(self, key: bytes, data: str) -> str:
|
||||
@@ -146,11 +116,11 @@ index 3c05ca0..ffb3476 100644
|
||||
|
||||
def makeCookie(self, expiry: float, data: str) -> AuthCookie:
|
||||
"""
|
||||
diff --git a/src/M2Crypto/DSA.py b/src/M2Crypto/DSA.py
|
||||
index 22e3261..8530e43 100644
|
||||
--- a/src/M2Crypto/DSA.py
|
||||
+++ b/src/M2Crypto/DSA.py
|
||||
@@ -30,7 +30,7 @@ class DSA:
|
||||
Index: m2crypto-0.45.0/src/M2Crypto/DSA.py
|
||||
===================================================================
|
||||
--- m2crypto-0.45.0.orig/src/M2Crypto/DSA.py 2025-04-17 05:30:40.000000000 +0200
|
||||
+++ m2crypto-0.45.0/src/M2Crypto/DSA.py 2025-04-23 00:03:54.558765177 +0200
|
||||
@@ -30,7 +30,7 @@
|
||||
from M2Crypto import EVP, DSA, util
|
||||
|
||||
message = 'Kilroy was here!'
|
||||
@@ -159,11 +129,11 @@ index 22e3261..8530e43 100644
|
||||
md.update(message)
|
||||
digest = md.final()
|
||||
|
||||
diff --git a/src/M2Crypto/EVP.py b/src/M2Crypto/EVP.py
|
||||
index 4ed295a..87d9934 100644
|
||||
--- a/src/M2Crypto/EVP.py
|
||||
+++ b/src/M2Crypto/EVP.py
|
||||
@@ -78,7 +78,7 @@ class HMAC(object):
|
||||
Index: m2crypto-0.45.0/src/M2Crypto/EVP.py
|
||||
===================================================================
|
||||
--- m2crypto-0.45.0.orig/src/M2Crypto/EVP.py 2025-04-17 05:30:40.000000000 +0200
|
||||
+++ m2crypto-0.45.0/src/M2Crypto/EVP.py 2025-04-23 00:03:54.558961817 +0200
|
||||
@@ -78,7 +78,7 @@
|
||||
|
||||
m2_hmac_ctx_free = m2.hmac_ctx_free
|
||||
|
||||
@@ -172,7 +142,7 @@ index 4ed295a..87d9934 100644
|
||||
md = getattr(m2, algo, None)
|
||||
if md is None:
|
||||
raise ValueError('unknown algorithm', algo)
|
||||
@@ -102,7 +102,7 @@ class HMAC(object):
|
||||
@@ -102,7 +102,7 @@
|
||||
digest = final
|
||||
|
||||
|
||||
@@ -181,7 +151,7 @@ index 4ed295a..87d9934 100644
|
||||
md = getattr(m2, algo, None)
|
||||
if md is None:
|
||||
raise ValueError('unknown algorithm', algo)
|
||||
@@ -171,7 +171,7 @@ class PKey(object):
|
||||
@@ -171,7 +171,7 @@
|
||||
self,
|
||||
pkey: Optional[bytes] = None,
|
||||
_pyfree: int = 0,
|
||||
@@ -190,7 +160,7 @@ index 4ed295a..87d9934 100644
|
||||
) -> None:
|
||||
if pkey is not None:
|
||||
self.pkey: bytes = pkey
|
||||
@@ -200,7 +200,7 @@ class PKey(object):
|
||||
@@ -200,7 +200,7 @@
|
||||
self.md = mda()
|
||||
self.ctx: Context = m2.md_ctx_new()
|
||||
|
||||
@@ -199,7 +169,7 @@ index 4ed295a..87d9934 100644
|
||||
"""
|
||||
Reset internal message digest context.
|
||||
|
||||
@@ -379,7 +379,7 @@ class PKey(object):
|
||||
@@ -379,7 +379,7 @@
|
||||
rsa = RSA.RSA_pub(rsa_ptr, 1)
|
||||
return rsa
|
||||
|
||||
@@ -208,7 +178,7 @@ index 4ed295a..87d9934 100644
|
||||
"""
|
||||
Assign the EC key pair to self.
|
||||
|
||||
@@ -399,7 +399,7 @@ class PKey(object):
|
||||
@@ -399,7 +399,7 @@
|
||||
ret = m2.pkey_set1_ec(self.pkey, ec.ec)
|
||||
return ret
|
||||
|
||||
@@ -217,11 +187,11 @@ index 4ed295a..87d9934 100644
|
||||
"""
|
||||
Return the underlying EC key if that is what the EVP
|
||||
instance is holding.
|
||||
diff --git a/src/M2Crypto/RSA.py b/src/M2Crypto/RSA.py
|
||||
index 85503a6..ecc49f0 100644
|
||||
--- a/src/M2Crypto/RSA.py
|
||||
+++ b/src/M2Crypto/RSA.py
|
||||
@@ -196,7 +196,7 @@ class RSA(object):
|
||||
Index: m2crypto-0.45.0/src/M2Crypto/RSA.py
|
||||
===================================================================
|
||||
--- m2crypto-0.45.0.orig/src/M2Crypto/RSA.py 2025-04-17 05:30:40.000000000 +0200
|
||||
+++ m2crypto-0.45.0/src/M2Crypto/RSA.py 2025-04-23 00:03:54.559155351 +0200
|
||||
@@ -196,7 +196,7 @@
|
||||
return self._check_cache
|
||||
|
||||
def sign_rsassa_pss(
|
||||
@@ -230,7 +200,7 @@ index 85503a6..ecc49f0 100644
|
||||
) -> bytes:
|
||||
"""
|
||||
Signs a digest with the private key using RSASSA-PSS
|
||||
@@ -226,7 +226,7 @@ class RSA(object):
|
||||
@@ -226,7 +226,7 @@
|
||||
self,
|
||||
data: bytes,
|
||||
signature: bytes,
|
||||
@@ -239,7 +209,7 @@ index 85503a6..ecc49f0 100644
|
||||
salt_length: int = 20,
|
||||
) -> int:
|
||||
"""
|
||||
@@ -258,7 +258,7 @@ class RSA(object):
|
||||
@@ -258,7 +258,7 @@
|
||||
self.rsa, data, plain_signature, hash(), salt_length
|
||||
)
|
||||
|
||||
@@ -248,7 +218,7 @@ index 85503a6..ecc49f0 100644
|
||||
"""
|
||||
Signs a digest with the private key
|
||||
|
||||
@@ -277,7 +277,7 @@ class RSA(object):
|
||||
@@ -277,7 +277,7 @@
|
||||
return m2.rsa_sign(self.rsa, digest, digest_type)
|
||||
|
||||
def verify(
|
||||
@@ -257,11 +227,11 @@ index 85503a6..ecc49f0 100644
|
||||
) -> int:
|
||||
"""
|
||||
Verifies the signature with the public key
|
||||
diff --git a/src/M2Crypto/SMIME.py b/src/M2Crypto/SMIME.py
|
||||
index 18c4074..5baf630 100644
|
||||
--- a/src/M2Crypto/SMIME.py
|
||||
+++ b/src/M2Crypto/SMIME.py
|
||||
@@ -229,7 +229,7 @@ class SMIME(object):
|
||||
Index: m2crypto-0.45.0/src/M2Crypto/SMIME.py
|
||||
===================================================================
|
||||
--- m2crypto-0.45.0.orig/src/M2Crypto/SMIME.py 2025-04-17 05:30:40.000000000 +0200
|
||||
+++ m2crypto-0.45.0/src/M2Crypto/SMIME.py 2025-04-23 00:03:54.559323638 +0200
|
||||
@@ -229,7 +229,7 @@
|
||||
self,
|
||||
data_bio: BIO.BIO,
|
||||
flags: int = 0,
|
||||
@@ -270,11 +240,11 @@ index 18c4074..5baf630 100644
|
||||
) -> PKCS7:
|
||||
if not hasattr(self, 'pkey'):
|
||||
raise SMIME_Error('no private key: use load_key()')
|
||||
diff --git a/src/M2Crypto/SSL/Checker.py b/src/M2Crypto/SSL/Checker.py
|
||||
index 4e1f096..ab50573 100644
|
||||
--- a/src/M2Crypto/SSL/Checker.py
|
||||
+++ b/src/M2Crypto/SSL/Checker.py
|
||||
@@ -80,7 +80,7 @@ class Checker:
|
||||
Index: m2crypto-0.45.0/src/M2Crypto/SSL/Checker.py
|
||||
===================================================================
|
||||
--- m2crypto-0.45.0.orig/src/M2Crypto/SSL/Checker.py 2025-04-17 05:30:40.000000000 +0200
|
||||
+++ m2crypto-0.45.0/src/M2Crypto/SSL/Checker.py 2025-04-23 00:03:54.559492055 +0200
|
||||
@@ -80,7 +80,7 @@
|
||||
self,
|
||||
host: Optional[str] = None,
|
||||
peerCertHash: Optional[bytes] = None,
|
||||
@@ -283,7 +253,7 @@ index 4e1f096..ab50573 100644
|
||||
) -> None:
|
||||
self.host = host
|
||||
self.fingerprint = peerCertHash
|
||||
@@ -96,15 +96,13 @@ class Checker:
|
||||
@@ -96,15 +96,13 @@
|
||||
self.host: str = host
|
||||
|
||||
if self.fingerprint:
|
||||
@@ -302,24 +272,24 @@ index 4e1f096..ab50573 100644
|
||||
else:
|
||||
raise ValueError(
|
||||
'Unexpected digest {0}'.format(self.digest)
|
||||
diff --git a/src/M2Crypto/__init__.py b/src/M2Crypto/__init__.py
|
||||
index 10a0d97..1ae5b25 100644
|
||||
--- a/src/M2Crypto/__init__.py
|
||||
+++ b/src/M2Crypto/__init__.py
|
||||
@@ -17,7 +17,7 @@ Copyright (C) 2004-2007 OSAF. All Rights Reserved.
|
||||
Index: m2crypto-0.45.0/src/M2Crypto/__init__.py
|
||||
===================================================================
|
||||
--- m2crypto-0.45.0.orig/src/M2Crypto/__init__.py 2025-04-17 05:30:40.000000000 +0200
|
||||
+++ m2crypto-0.45.0/src/M2Crypto/__init__.py 2025-04-23 00:04:20.544257972 +0200
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
Copyright 2008-2011 Heikki Toivonen. All rights reserved.
|
||||
"""
|
||||
-__version__: str = '0.46.0'
|
||||
-__version__: str = '0.45.0'
|
||||
+__version__: str = '0.45.1'
|
||||
version: str = __version__
|
||||
|
||||
try:
|
||||
diff --git a/tests/ca.pem b/tests/ca.pem
|
||||
index 986a432..9989211 100644
|
||||
--- a/tests/ca.pem
|
||||
+++ b/tests/ca.pem
|
||||
@@ -5,98 +5,98 @@ Certificate:
|
||||
Index: m2crypto-0.45.0/tests/ca.pem
|
||||
===================================================================
|
||||
--- m2crypto-0.45.0.orig/tests/ca.pem 2025-04-17 05:30:40.000000000 +0200
|
||||
+++ m2crypto-0.45.0/tests/ca.pem 2025-04-23 00:03:54.559914651 +0200
|
||||
@@ -5,98 +5,98 @@
|
||||
Signature Algorithm: sha256WithRSAEncryption
|
||||
Issuer: C=US, ST=California, O=M2Crypto, CN=Heikki Toivonen
|
||||
Validity
|
||||
@@ -493,10 +463,10 @@ index 986a432..9989211 100644
|
||||
+E44hV8J+JpQi7fbq5Ffmem2lfHwHtjYjwnmwuPKiE1hSpWLaUIZjOhuqGd4TLr24
|
||||
+sh6NaEekgZEE8XJpFL/aFVqZr6HjF4+FW/fGKVKzjvzW93EsOhSf
|
||||
-----END RSA PRIVATE KEY-----
|
||||
diff --git a/tests/ca_key.pem b/tests/ca_key.pem
|
||||
index 72a9e40..75efc21 100644
|
||||
--- a/tests/ca_key.pem
|
||||
+++ b/tests/ca_key.pem
|
||||
Index: m2crypto-0.45.0/tests/ca_key.pem
|
||||
===================================================================
|
||||
--- m2crypto-0.45.0.orig/tests/ca_key.pem 2025-04-17 05:30:40.000000000 +0200
|
||||
+++ m2crypto-0.45.0/tests/ca_key.pem 2025-04-23 00:03:54.560027503 +0200
|
||||
@@ -1,27 +1,27 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
-MIIEpQIBAAKCAQEAyvzrFB+NaOuLDwa2DslnsueXjkQFjaOSp+FcTHbgHnwYUGOM
|
||||
@@ -550,17 +520,17 @@ index 72a9e40..75efc21 100644
|
||||
+E44hV8J+JpQi7fbq5Ffmem2lfHwHtjYjwnmwuPKiE1hSpWLaUIZjOhuqGd4TLr24
|
||||
+sh6NaEekgZEE8XJpFL/aFVqZr6HjF4+FW/fGKVKzjvzW93EsOhSf
|
||||
-----END RSA PRIVATE KEY-----
|
||||
diff --git a/tests/makecerts.py b/tests/makecerts.py
|
||||
index b5c9fe6..078004e 100755
|
||||
--- a/tests/makecerts.py
|
||||
+++ b/tests/makecerts.py
|
||||
Index: m2crypto-0.45.0/tests/makecerts.py
|
||||
===================================================================
|
||||
--- m2crypto-0.45.0.orig/tests/makecerts.py 2025-04-17 05:30:40.000000000 +0200
|
||||
+++ m2crypto-0.45.0/tests/makecerts.py 2025-04-23 00:03:54.560129996 +0200
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
#
|
||||
# Create test certificates:
|
||||
#
|
||||
@@ -154,7 +154,6 @@ def mk_ca():
|
||||
@@ -154,7 +154,6 @@
|
||||
|
||||
return cert, pk
|
||||
|
||||
@@ -568,7 +538,7 @@ index b5c9fe6..078004e 100755
|
||||
def mk_server(ca, capk):
|
||||
r, _ = req('server')
|
||||
r.set_subject(make_subject(cn='localhost'))
|
||||
@@ -203,6 +202,38 @@ def mk_ec_pair():
|
||||
@@ -203,6 +202,38 @@
|
||||
pub_key.save_pub_key('ec.pub.pem')
|
||||
|
||||
|
||||
@@ -607,7 +577,7 @@ index b5c9fe6..078004e 100755
|
||||
if __name__ == '__main__':
|
||||
names = ['ca', 'server', 'recipient', 'signer', 'x509']
|
||||
|
||||
@@ -218,5 +249,7 @@ if __name__ == '__main__':
|
||||
@@ -218,5 +249,7 @@
|
||||
mk_signer(ca_bits, pk_bits)
|
||||
mk_recipient(ca_bits, pk_bits)
|
||||
|
||||
@@ -615,11 +585,11 @@ index b5c9fe6..078004e 100755
|
||||
+
|
||||
# FIXME This doesn't work well.
|
||||
# mk_ec_pair()
|
||||
diff --git a/tests/recipient.pem b/tests/recipient.pem
|
||||
index 99b2777..9b06761 100644
|
||||
--- a/tests/recipient.pem
|
||||
+++ b/tests/recipient.pem
|
||||
@@ -5,99 +5,99 @@ Certificate:
|
||||
Index: m2crypto-0.45.0/tests/recipient.pem
|
||||
===================================================================
|
||||
--- m2crypto-0.45.0.orig/tests/recipient.pem 2025-04-17 05:30:40.000000000 +0200
|
||||
+++ m2crypto-0.45.0/tests/recipient.pem 2025-04-23 00:03:54.560285218 +0200
|
||||
@@ -5,99 +5,99 @@
|
||||
Signature Algorithm: sha256WithRSAEncryption
|
||||
Issuer: C=US, ST=California, O=M2Crypto, CN=Heikki Toivonen
|
||||
Validity
|
||||
@@ -794,10 +764,10 @@ index 99b2777..9b06761 100644
|
||||
+BuJOLkGhwZiLMBSTiAjMIGm6g8Qhy+iEmCWfUZgega9iDbr0aHHt14ySGT7nhzK8
|
||||
+y7iPc5n3z0/s3eprxEv9nHo7lotCQlp7q+/8J1a3N4OROwKqWOZ5
|
||||
-----END RSA PRIVATE KEY-----
|
||||
diff --git a/tests/recipient_key.pem b/tests/recipient_key.pem
|
||||
index 4087188..20ad166 100644
|
||||
--- a/tests/recipient_key.pem
|
||||
+++ b/tests/recipient_key.pem
|
||||
Index: m2crypto-0.45.0/tests/recipient_key.pem
|
||||
===================================================================
|
||||
--- m2crypto-0.45.0.orig/tests/recipient_key.pem 2025-04-17 05:30:40.000000000 +0200
|
||||
+++ m2crypto-0.45.0/tests/recipient_key.pem 2025-04-23 00:03:54.560388262 +0200
|
||||
@@ -1,27 +1,27 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
-MIIEpQIBAAKCAQEAoJY+k26/IIa5GgvgSyk3NhBTOTsmL3+jhSxcL2f9DEnHFWh7
|
||||
@@ -851,10 +821,10 @@ index 4087188..20ad166 100644
|
||||
+BuJOLkGhwZiLMBSTiAjMIGm6g8Qhy+iEmCWfUZgega9iDbr0aHHt14ySGT7nhzK8
|
||||
+y7iPc5n3z0/s3eprxEv9nHo7lotCQlp7q+/8J1a3N4OROwKqWOZ5
|
||||
-----END RSA PRIVATE KEY-----
|
||||
diff --git a/tests/rsa.priv.pem b/tests/rsa.priv.pem
|
||||
index 0b8b163..a6ddf0b 100644
|
||||
--- a/tests/rsa.priv.pem
|
||||
+++ b/tests/rsa.priv.pem
|
||||
Index: m2crypto-0.45.0/tests/rsa.priv.pem
|
||||
===================================================================
|
||||
--- m2crypto-0.45.0.orig/tests/rsa.priv.pem 2025-04-17 05:30:40.000000000 +0200
|
||||
+++ m2crypto-0.45.0/tests/rsa.priv.pem 2025-04-23 00:03:54.560482680 +0200
|
||||
@@ -1,16 +1,28 @@
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
-MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAM1lIRXaaLVgzlvW
|
||||
@@ -898,10 +868,10 @@ index 0b8b163..a6ddf0b 100644
|
||||
+RXJ8s4Hgc+UcBmq3AuIPSMLRJHcmTeHCUfeZzRyYRg8VelvjMC4oWRSko9umpPe7
|
||||
++Nwp/F6vX+CL8cDyhJKQa2w=
|
||||
-----END PRIVATE KEY-----
|
||||
diff --git a/tests/rsa.priv2.pem b/tests/rsa.priv2.pem
|
||||
index 013ab5e..a6ddf0b 100644
|
||||
--- a/tests/rsa.priv2.pem
|
||||
+++ b/tests/rsa.priv2.pem
|
||||
Index: m2crypto-0.45.0/tests/rsa.priv2.pem
|
||||
===================================================================
|
||||
--- m2crypto-0.45.0.orig/tests/rsa.priv2.pem 2025-04-17 05:30:40.000000000 +0200
|
||||
+++ m2crypto-0.45.0/tests/rsa.priv2.pem 2025-04-23 00:03:54.560569033 +0200
|
||||
@@ -1,17 +1,28 @@
|
||||
------BEGIN ENCRYPTED PRIVATE KEY-----
|
||||
-MIICxjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQIq+j6kBSOkTkCAggA
|
||||
@@ -948,10 +918,10 @@ index 013ab5e..a6ddf0b 100644
|
||||
+RXJ8s4Hgc+UcBmq3AuIPSMLRJHcmTeHCUfeZzRyYRg8VelvjMC4oWRSko9umpPe7
|
||||
++Nwp/F6vX+CL8cDyhJKQa2w=
|
||||
+-----END PRIVATE KEY-----
|
||||
diff --git a/tests/rsa.pub.pem b/tests/rsa.pub.pem
|
||||
index e4f13e0..edd6a3b 100644
|
||||
--- a/tests/rsa.pub.pem
|
||||
+++ b/tests/rsa.pub.pem
|
||||
Index: m2crypto-0.45.0/tests/rsa.pub.pem
|
||||
===================================================================
|
||||
--- m2crypto-0.45.0.orig/tests/rsa.pub.pem 2025-04-17 05:30:40.000000000 +0200
|
||||
+++ m2crypto-0.45.0/tests/rsa.pub.pem 2025-04-23 00:03:54.560641369 +0200
|
||||
@@ -1,6 +1,9 @@
|
||||
-----BEGIN PUBLIC KEY-----
|
||||
-MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDNZSEV2mi1YM5b1hdkujjBSbHx
|
||||
@@ -966,11 +936,11 @@ index e4f13e0..edd6a3b 100644
|
||||
+hKTT/8L/9mlIPkMUeurGZjallk5ejN5q/nJOrSeezzYGQSynVz2hB8X7uzLVO1YU
|
||||
+5wIDAQAB
|
||||
-----END PUBLIC KEY-----
|
||||
diff --git a/tests/server.pem b/tests/server.pem
|
||||
index a046f80..a0e0e57 100644
|
||||
--- a/tests/server.pem
|
||||
+++ b/tests/server.pem
|
||||
@@ -5,98 +5,98 @@ Certificate:
|
||||
Index: m2crypto-0.45.0/tests/server.pem
|
||||
===================================================================
|
||||
--- m2crypto-0.45.0.orig/tests/server.pem 2025-04-17 05:30:40.000000000 +0200
|
||||
+++ m2crypto-0.45.0/tests/server.pem 2025-04-23 00:03:54.560770893 +0200
|
||||
@@ -5,98 +5,98 @@
|
||||
Signature Algorithm: sha256WithRSAEncryption
|
||||
Issuer: C=US, ST=California, O=M2Crypto, CN=Heikki Toivonen
|
||||
Validity
|
||||
@@ -1144,10 +1114,10 @@ index a046f80..a0e0e57 100644
|
||||
++9LCRnQPC00PsMB9QbWdb3WmHrnpiWwd0Re/e5BSSOtpbW/A+WT9SPHU5z8+dVyQ
|
||||
+1mnG1XXjIOdaIDbANdGuE6qUYUQBQFUiBawJfhMxsfBwPHdcRi0f
|
||||
-----END RSA PRIVATE KEY-----
|
||||
diff --git a/tests/server_key.pem b/tests/server_key.pem
|
||||
index 1dc37fb..d803c6c 100644
|
||||
--- a/tests/server_key.pem
|
||||
+++ b/tests/server_key.pem
|
||||
Index: m2crypto-0.45.0/tests/server_key.pem
|
||||
===================================================================
|
||||
--- m2crypto-0.45.0.orig/tests/server_key.pem 2025-04-17 05:30:40.000000000 +0200
|
||||
+++ m2crypto-0.45.0/tests/server_key.pem 2025-04-23 00:03:54.560867565 +0200
|
||||
@@ -1,27 +1,27 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
-MIIEogIBAAKCAQEAudeHNHqLxsb67AVgdU+65jwLO3D01gpXIDgt796cYUVp1GmV
|
||||
@@ -1201,11 +1171,11 @@ index 1dc37fb..d803c6c 100644
|
||||
++9LCRnQPC00PsMB9QbWdb3WmHrnpiWwd0Re/e5BSSOtpbW/A+WT9SPHU5z8+dVyQ
|
||||
+1mnG1XXjIOdaIDbANdGuE6qUYUQBQFUiBawJfhMxsfBwPHdcRi0f
|
||||
-----END RSA PRIVATE KEY-----
|
||||
diff --git a/tests/signer.pem b/tests/signer.pem
|
||||
index f1e6294..f3670be 100644
|
||||
--- a/tests/signer.pem
|
||||
+++ b/tests/signer.pem
|
||||
@@ -5,72 +5,72 @@ Certificate:
|
||||
Index: m2crypto-0.45.0/tests/signer.pem
|
||||
===================================================================
|
||||
--- m2crypto-0.45.0.orig/tests/signer.pem 2025-04-17 05:30:40.000000000 +0200
|
||||
+++ m2crypto-0.45.0/tests/signer.pem 2025-04-23 00:03:54.560978444 +0200
|
||||
@@ -5,72 +5,72 @@
|
||||
Signature Algorithm: sha256WithRSAEncryption
|
||||
Issuer: C=US, ST=California, O=M2Crypto, CN=Heikki Toivonen
|
||||
Validity
|
||||
@@ -1329,10 +1299,10 @@ index f1e6294..f3670be 100644
|
||||
+woWgFyggvmFq2K1PznNr1f1LhR9T6FOlm3fjlPup7Q/Qs5qIGA2pTRPY9pOCF4Yh
|
||||
+tMZU
|
||||
-----END CERTIFICATE-----
|
||||
diff --git a/tests/signer_key.pem b/tests/signer_key.pem
|
||||
index 3863a0f..c52cb96 100644
|
||||
--- a/tests/signer_key.pem
|
||||
+++ b/tests/signer_key.pem
|
||||
Index: m2crypto-0.45.0/tests/signer_key.pem
|
||||
===================================================================
|
||||
--- m2crypto-0.45.0.orig/tests/signer_key.pem 2025-04-17 05:30:40.000000000 +0200
|
||||
+++ m2crypto-0.45.0/tests/signer_key.pem 2025-04-23 00:03:54.561072420 +0200
|
||||
@@ -1,27 +1,27 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
-MIIEowIBAAKCAQEAvf/XX/hlApKYRHL+4luT4KJ4ACxdzXeS6/1fxvwJy/l23ZXt
|
||||
@@ -1386,11 +1356,11 @@ index 3863a0f..c52cb96 100644
|
||||
+j8iTj72VYNb6xIXxGrZvkeoiIJzVxUqOaipIdN8a174AY9E4TvXzKkCdOpyUdF02
|
||||
+Z7LwYu/00uTLvGRYqDAGxBSH18tGHJjbmvmDX0ta3+FdFiXPivfBBQ==
|
||||
-----END RSA PRIVATE KEY-----
|
||||
diff --git a/tests/test_authcookie.py b/tests/test_authcookie.py
|
||||
index c844bee..e38bcd9 100755
|
||||
--- a/tests/test_authcookie.py
|
||||
+++ b/tests/test_authcookie.py
|
||||
@@ -67,7 +67,7 @@ class AuthCookieTestCase(unittest.TestCase):
|
||||
Index: m2crypto-0.45.0/tests/test_authcookie.py
|
||||
===================================================================
|
||||
--- m2crypto-0.45.0.orig/tests/test_authcookie.py 2025-04-17 05:30:40.000000000 +0200
|
||||
+++ m2crypto-0.45.0/tests/test_authcookie.py 2025-04-23 00:03:54.561155096 +0200
|
||||
@@ -67,7 +67,7 @@
|
||||
# Peek inside the cookie jar...
|
||||
key = self.jar._key # pylint: disable=protected-access
|
||||
mac = util.bin_to_hex(
|
||||
@@ -1399,7 +1369,7 @@ index c844bee..e38bcd9 100755
|
||||
)
|
||||
self.assertEqual(c.mac(), mac)
|
||||
# Ok, stop peeking now.
|
||||
@@ -121,7 +121,7 @@ class AuthCookieTestCase(unittest.TestCase):
|
||||
@@ -121,7 +121,7 @@
|
||||
self.assertAlmostEqual(exp, self.exp, places=4)
|
||||
key = self.jar._key # pylint: disable=protected-access
|
||||
mac = util.bin_to_hex(
|
||||
@@ -1408,11 +1378,11 @@ index c844bee..e38bcd9 100755
|
||||
)
|
||||
self.assertEqual(digest, mac)
|
||||
|
||||
diff --git a/tests/test_dsa.py b/tests/test_dsa.py
|
||||
index 7b1860b..8ffc60f 100644
|
||||
--- a/tests/test_dsa.py
|
||||
+++ b/tests/test_dsa.py
|
||||
@@ -17,8 +17,8 @@ class DSATestCase(unittest.TestCase):
|
||||
Index: m2crypto-0.45.0/tests/test_dsa.py
|
||||
===================================================================
|
||||
--- m2crypto-0.45.0.orig/tests/test_dsa.py 2025-04-17 05:30:40.000000000 +0200
|
||||
+++ m2crypto-0.45.0/tests/test_dsa.py 2025-04-23 00:03:54.561245476 +0200
|
||||
@@ -17,8 +17,8 @@
|
||||
pubkey = 'tests/dsa.pub.pem'
|
||||
param = 'tests/dsa.param.pem'
|
||||
|
||||
@@ -1423,11 +1393,11 @@ index 7b1860b..8ffc60f 100644
|
||||
|
||||
def callback(self, *args):
|
||||
pass
|
||||
diff --git a/tests/test_ecdsa.py b/tests/test_ecdsa.py
|
||||
index 99678b3..b2f209f 100644
|
||||
--- a/tests/test_ecdsa.py
|
||||
+++ b/tests/test_ecdsa.py
|
||||
@@ -25,7 +25,7 @@ class ECDSATestCase(unittest.TestCase):
|
||||
Index: m2crypto-0.45.0/tests/test_ecdsa.py
|
||||
===================================================================
|
||||
--- m2crypto-0.45.0.orig/tests/test_ecdsa.py 2025-04-17 05:30:40.000000000 +0200
|
||||
+++ m2crypto-0.45.0/tests/test_ecdsa.py 2025-04-23 00:03:54.561319005 +0200
|
||||
@@ -25,7 +25,7 @@
|
||||
privkey = 'tests/ec.priv.pem'
|
||||
pubkey = 'tests/ec.pub.pem'
|
||||
|
||||
@@ -1436,11 +1406,11 @@ index 99678b3..b2f209f 100644
|
||||
|
||||
def setUp(self):
|
||||
assert os.path.exists(self.errkey) and os.access(
|
||||
diff --git a/tests/test_evp.py b/tests/test_evp.py
|
||||
index 2699fef..de39727 100644
|
||||
--- a/tests/test_evp.py
|
||||
+++ b/tests/test_evp.py
|
||||
@@ -12,7 +12,7 @@ import hashlib
|
||||
Index: m2crypto-0.45.0/tests/test_evp.py
|
||||
===================================================================
|
||||
--- m2crypto-0.45.0.orig/tests/test_evp.py 2025-04-17 05:30:40.000000000 +0200
|
||||
+++ m2crypto-0.45.0/tests/test_evp.py 2025-04-23 00:03:54.561453388 +0200
|
||||
@@ -12,7 +12,7 @@
|
||||
import io
|
||||
import logging
|
||||
|
||||
@@ -1449,7 +1419,7 @@ index 2699fef..de39727 100644
|
||||
|
||||
from M2Crypto import BIO, EVP, RSA, EC, Rand, m2, util
|
||||
from tests import unittest
|
||||
@@ -118,33 +118,33 @@ class EVPTestCase(unittest.TestCase):
|
||||
@@ -118,33 +118,33 @@
|
||||
def test_get_digestbyname(self):
|
||||
with self.assertRaises(EVP.EVPError):
|
||||
m2.get_digestbyname('sha513')
|
||||
@@ -1493,7 +1463,7 @@ index 2699fef..de39727 100644
|
||||
|
||||
def test_as_der_capture_key(self):
|
||||
"""
|
||||
@@ -168,7 +168,7 @@ class EVPTestCase(unittest.TestCase):
|
||||
@@ -168,7 +168,7 @@
|
||||
def test_hmac(self):
|
||||
self.assertEqual(
|
||||
util.octx_to_num(EVP.hmac(b'key', b'data')),
|
||||
@@ -1502,7 +1472,7 @@ index 2699fef..de39727 100644
|
||||
util.octx_to_num(EVP.hmac(b'key', b'data')),
|
||||
)
|
||||
if not fips_mode: # Disabled algorithms
|
||||
@@ -258,7 +258,7 @@ class EVPTestCase(unittest.TestCase):
|
||||
@@ -258,7 +258,7 @@
|
||||
self.assertNotEqual(pem, pem2)
|
||||
|
||||
message = b'This is the message string'
|
||||
@@ -1511,7 +1481,7 @@ index 2699fef..de39727 100644
|
||||
self.assertEqual(rsa.sign(digest), rsa2.sign(digest))
|
||||
|
||||
rsa3 = RSA.gen_key(1024, 3, callback=self._gen_callback)
|
||||
@@ -315,7 +315,7 @@ class EVPTestCase(unittest.TestCase):
|
||||
@@ -315,7 +315,7 @@
|
||||
self.assertNotEqual(pem, pem2)
|
||||
|
||||
message = b'This is the message string'
|
||||
@@ -1520,7 +1490,7 @@ index 2699fef..de39727 100644
|
||||
ec_sign = ec.sign_dsa(digest)
|
||||
ec2_sign = ec.sign_dsa(digest)
|
||||
self.assertEqual(
|
||||
@@ -535,7 +535,7 @@ class CipherTestCase(unittest.TestCase):
|
||||
@@ -535,7 +535,7 @@
|
||||
b'12345678',
|
||||
enc,
|
||||
1,
|
||||
@@ -1529,7 +1499,7 @@ index 2699fef..de39727 100644
|
||||
b'saltsalt',
|
||||
5,
|
||||
)
|
||||
@@ -551,7 +551,7 @@ class CipherTestCase(unittest.TestCase):
|
||||
@@ -551,7 +551,7 @@
|
||||
b'12345678',
|
||||
dec,
|
||||
1,
|
||||
@@ -1538,7 +1508,7 @@ index 2699fef..de39727 100644
|
||||
b'saltsalt',
|
||||
5,
|
||||
)
|
||||
@@ -848,40 +848,42 @@ class HMACTestCase(unittest.TestCase):
|
||||
@@ -848,40 +848,42 @@
|
||||
data1 = [
|
||||
b'',
|
||||
b'More text test vectors to stuff up EBCDIC machines :-)',
|
||||
@@ -1591,7 +1561,7 @@ index 2699fef..de39727 100644
|
||||
chain = []
|
||||
hmac = EVP.HMAC(key, algo)
|
||||
hmac.update(repr(start))
|
||||
@@ -894,7 +896,7 @@ class HMACTestCase(unittest.TestCase):
|
||||
@@ -894,7 +896,7 @@
|
||||
chain.append((digest, i))
|
||||
return chain
|
||||
|
||||
@@ -1600,7 +1570,7 @@ index 2699fef..de39727 100644
|
||||
chain = []
|
||||
digest = EVP.hmac(key, start, algo)
|
||||
chain.append((digest, start))
|
||||
@@ -903,7 +905,7 @@ class HMACTestCase(unittest.TestCase):
|
||||
@@ -903,7 +905,7 @@
|
||||
chain.append((digest, i))
|
||||
return chain
|
||||
|
||||
@@ -1609,7 +1579,7 @@ index 2699fef..de39727 100644
|
||||
digest = EVP.hmac(key, start, algo)
|
||||
c = chain[0]
|
||||
if c[0] != digest or c[1] != start:
|
||||
@@ -915,7 +917,7 @@ class HMACTestCase(unittest.TestCase):
|
||||
@@ -915,7 +917,7 @@
|
||||
return 1
|
||||
|
||||
def verify_chain_HMAC(
|
||||
@@ -1618,11 +1588,11 @@ index 2699fef..de39727 100644
|
||||
): # noqa
|
||||
hmac = EVP.HMAC(key, algo)
|
||||
hmac.update(start)
|
||||
diff --git a/tests/test_rsa.py b/tests/test_rsa.py
|
||||
index 09aff49..608e72f 100644
|
||||
--- a/tests/test_rsa.py
|
||||
+++ b/tests/test_rsa.py
|
||||
@@ -23,7 +23,7 @@ class RSATestCase(unittest.TestCase):
|
||||
Index: m2crypto-0.45.0/tests/test_rsa.py
|
||||
===================================================================
|
||||
--- m2crypto-0.45.0.orig/tests/test_rsa.py 2025-04-17 05:30:40.000000000 +0200
|
||||
+++ m2crypto-0.45.0/tests/test_rsa.py 2025-04-23 00:03:54.561696916 +0200
|
||||
@@ -23,7 +23,7 @@
|
||||
privkey2 = 'tests/rsa.priv2.pem'
|
||||
pubkey = 'tests/rsa.pub.pem'
|
||||
|
||||
@@ -1631,7 +1601,7 @@ index 09aff49..608e72f 100644
|
||||
b'The magic words are squeamish ossifrage.'
|
||||
).digest()
|
||||
|
||||
@@ -58,25 +58,41 @@ class RSATestCase(unittest.TestCase):
|
||||
@@ -58,25 +58,41 @@
|
||||
|
||||
def test_loadkey_pp(self):
|
||||
rsa = RSA.load_key(self.privkey2, self.pp_callback)
|
||||
@@ -1678,7 +1648,7 @@ index 09aff49..608e72f 100644
|
||||
)
|
||||
with self.assertRaises(AttributeError):
|
||||
getattr(rsa, 'nosuchprop')
|
||||
@@ -86,7 +102,7 @@ class RSATestCase(unittest.TestCase):
|
||||
@@ -86,7 +102,7 @@
|
||||
with open(self.privkey, "rb") as f:
|
||||
keybio = BIO.MemoryBuffer(f.read())
|
||||
rsa = RSA.load_key_bio(keybio)
|
||||
@@ -1687,7 +1657,7 @@ index 09aff49..608e72f 100644
|
||||
self.assertEqual(
|
||||
rsa.e, b'\000\000\000\003\001\000\001'
|
||||
) # aka 65537 aka 0xf4
|
||||
@@ -155,7 +171,7 @@ class RSATestCase(unittest.TestCase):
|
||||
@@ -155,7 +171,7 @@
|
||||
|
||||
def test_loadpub(self):
|
||||
rsa = RSA.load_pub_key(self.pubkey)
|
||||
@@ -1696,7 +1666,7 @@ index 09aff49..608e72f 100644
|
||||
self.assertEqual(
|
||||
rsa.e, b'\000\000\000\003\001\000\001'
|
||||
) # aka 65537 aka 0xf4
|
||||
@@ -225,7 +241,7 @@ class RSATestCase(unittest.TestCase):
|
||||
@@ -225,7 +241,7 @@
|
||||
old = RSA.load_pub_key(self.pubkey)
|
||||
new = RSA.new_pub_key(old.pub())
|
||||
self.assertTrue(new.check_key())
|
||||
@@ -1705,7 +1675,7 @@ index 09aff49..608e72f 100644
|
||||
# aka 65537 aka 0xf4
|
||||
self.assertEqual(new.e, b'\000\000\000\003\001\000\001')
|
||||
|
||||
@@ -233,7 +249,7 @@ class RSATestCase(unittest.TestCase):
|
||||
@@ -233,7 +249,7 @@
|
||||
"""
|
||||
Testing signing and verifying digests
|
||||
"""
|
||||
@@ -1714,7 +1684,7 @@ index 09aff49..608e72f 100644
|
||||
|
||||
if m2.OPENSSL_VERSION_NUMBER >= 0x90800F:
|
||||
algos['sha224'] = ''
|
||||
@@ -242,7 +258,7 @@ class RSATestCase(unittest.TestCase):
|
||||
@@ -242,7 +258,7 @@
|
||||
algos['sha512'] = ''
|
||||
|
||||
message = b"This is the message string"
|
||||
@@ -1723,7 +1693,7 @@ index 09aff49..608e72f 100644
|
||||
rsa = RSA.load_key(self.privkey)
|
||||
rsa2 = RSA.load_pub_key(self.pubkey)
|
||||
for algo in algos.keys():
|
||||
@@ -270,7 +286,7 @@ class RSATestCase(unittest.TestCase):
|
||||
@@ -270,7 +286,7 @@
|
||||
message = b"This is the message string"
|
||||
import hashlib
|
||||
|
||||
@@ -1732,7 +1702,7 @@ index 09aff49..608e72f 100644
|
||||
if not fips_mode:
|
||||
algos['md5'] = 47
|
||||
algos['ripemd160'] = 43
|
||||
@@ -325,7 +341,7 @@ class RSATestCase(unittest.TestCase):
|
||||
@@ -325,7 +341,7 @@
|
||||
"""
|
||||
rsa = RSA.load_key(self.privkey)
|
||||
digest = b'a' * 16
|
||||
@@ -1741,7 +1711,7 @@ index 09aff49..608e72f 100644
|
||||
with self.assertRaises(ValueError):
|
||||
rsa.verify(digest, signature, 'bad_digest_method')
|
||||
|
||||
@@ -336,8 +352,8 @@ class RSATestCase(unittest.TestCase):
|
||||
@@ -336,8 +352,8 @@
|
||||
"""
|
||||
rsa = RSA.load_key(self.privkey)
|
||||
message = b"This is the message string"
|
||||
@@ -1752,7 +1722,7 @@ index 09aff49..608e72f 100644
|
||||
with self.assertRaises(RSA.RSAError):
|
||||
rsa.verify(digest, signature, 'md5')
|
||||
|
||||
@@ -355,8 +371,9 @@ class RSATestCase(unittest.TestCase):
|
||||
@@ -355,8 +371,9 @@
|
||||
* 2
|
||||
)
|
||||
|
||||
@@ -1764,7 +1734,7 @@ index 09aff49..608e72f 100644
|
||||
|
||||
def test_verify_bad_signature(self):
|
||||
"""
|
||||
@@ -364,10 +381,10 @@ class RSATestCase(unittest.TestCase):
|
||||
@@ -364,10 +381,10 @@
|
||||
"""
|
||||
rsa = RSA.load_key(self.privkey)
|
||||
message = b"This is the message string"
|
||||
@@ -1777,11 +1747,11 @@ index 09aff49..608e72f 100644
|
||||
other_signature = rsa.sign(other_digest)
|
||||
|
||||
with self.assertRaises(RSA.RSAError):
|
||||
diff --git a/tests/test_ssl_offline.py b/tests/test_ssl_offline.py
|
||||
index 12ca51c..9a2db1d 100644
|
||||
--- a/tests/test_ssl_offline.py
|
||||
+++ b/tests/test_ssl_offline.py
|
||||
@@ -19,7 +19,7 @@ class CheckerTestCase(unittest.TestCase):
|
||||
Index: m2crypto-0.45.0/tests/test_ssl_offline.py
|
||||
===================================================================
|
||||
--- m2crypto-0.45.0.orig/tests/test_ssl_offline.py 2025-04-17 05:30:40.000000000 +0200
|
||||
+++ m2crypto-0.45.0/tests/test_ssl_offline.py 2025-04-23 00:03:54.561832622 +0200
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
check = SSL.Checker.Checker(
|
||||
host=srv_host,
|
||||
@@ -1790,11 +1760,11 @@ index 12ca51c..9a2db1d 100644
|
||||
)
|
||||
x509 = X509.load_cert('tests/server.pem')
|
||||
self.assertTrue(check(x509, srv_host))
|
||||
diff --git a/tests/test_x509.py b/tests/test_x509.py
|
||||
index 3951420..675280c 100644
|
||||
--- a/tests/test_x509.py
|
||||
+++ b/tests/test_x509.py
|
||||
@@ -30,7 +30,7 @@ class X509TestCase(unittest.TestCase):
|
||||
Index: m2crypto-0.45.0/tests/test_x509.py
|
||||
===================================================================
|
||||
--- m2crypto-0.45.0.orig/tests/test_x509.py 2025-04-17 05:30:40.000000000 +0200
|
||||
+++ m2crypto-0.45.0/tests/test_x509.py 2025-04-23 00:03:54.561955373 +0200
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
def setUp(self):
|
||||
self.expected_hash = (
|
||||
@@ -1803,7 +1773,7 @@ index 3951420..675280c 100644
|
||||
)
|
||||
|
||||
def mkreq(self, bits, ca=0):
|
||||
@@ -56,7 +56,7 @@ class X509TestCase(unittest.TestCase):
|
||||
@@ -56,7 +56,7 @@
|
||||
with self.assertRaises(ValueError):
|
||||
x.sign(pk, 'sha513')
|
||||
|
||||
@@ -1812,7 +1782,7 @@ index 3951420..675280c 100644
|
||||
self.assertTrue(x.verify(pk))
|
||||
pk2 = x.get_pubkey()
|
||||
self.assertTrue(x.verify(pk2))
|
||||
@@ -364,7 +364,7 @@ class X509TestCase(unittest.TestCase):
|
||||
@@ -364,7 +364,7 @@
|
||||
self.assertEqual(ext.get_critical(), 0)
|
||||
cert.add_ext(ext)
|
||||
|
||||
@@ -1821,7 +1791,7 @@ index 3951420..675280c 100644
|
||||
with self.assertRaises(ValueError):
|
||||
cert.sign(pk, 'nosuchalgo')
|
||||
|
||||
@@ -446,7 +446,7 @@ class X509TestCase(unittest.TestCase):
|
||||
@@ -446,7 +446,7 @@
|
||||
cert.set_pubkey(pkey)
|
||||
ext = X509.new_extension('basicConstraints', 'CA:TRUE')
|
||||
cert.add_ext(ext)
|
||||
@@ -1830,7 +1800,7 @@ index 3951420..675280c 100644
|
||||
|
||||
if m2.OPENSSL_VERSION_NUMBER >= 0x0090800F:
|
||||
self.assertTrue(cert.check_ca())
|
||||
@@ -490,9 +490,9 @@ class X509TestCase(unittest.TestCase):
|
||||
@@ -490,9 +490,9 @@
|
||||
end_entity_cert.set_pubkey(
|
||||
end_entity_cert_req.get_pubkey()
|
||||
)
|
||||
@@ -1842,7 +1812,7 @@ index 3951420..675280c 100644
|
||||
self.assertTrue(proxycert.verify(pk2))
|
||||
self.assertEqual(
|
||||
proxycert.get_ext_at(0).get_name(), 'proxyCertInfo'
|
||||
@@ -590,14 +590,14 @@ class X509TestCase(unittest.TestCase):
|
||||
@@ -590,14 +590,14 @@
|
||||
|
||||
def test_fingerprint(self):
|
||||
x509 = X509.load_cert('tests/x509.pem')
|
||||
@@ -1859,14 +1829,11 @@ index 3951420..675280c 100644
|
||||
self.assertEqual(fp, self.expected_hash)
|
||||
|
||||
def test_save_der_string(self):
|
||||
diff --git a/tests/x509.der b/tests/x509.der
|
||||
index a92cb85..aa6584e 100644
|
||||
Binary files a/tests/x509.der and b/tests/x509.der differ
|
||||
diff --git a/tests/x509.pem b/tests/x509.pem
|
||||
index a1bfc11..e77c732 100644
|
||||
--- a/tests/x509.pem
|
||||
+++ b/tests/x509.pem
|
||||
@@ -5,98 +5,98 @@ Certificate:
|
||||
Index: m2crypto-0.45.0/tests/x509.pem
|
||||
===================================================================
|
||||
--- m2crypto-0.45.0.orig/tests/x509.pem 2025-04-17 05:30:40.000000000 +0200
|
||||
+++ m2crypto-0.45.0/tests/x509.pem 2025-04-23 00:03:54.562297367 +0200
|
||||
@@ -5,98 +5,98 @@
|
||||
Signature Algorithm: sha256WithRSAEncryption
|
||||
Issuer: C=US, ST=California, O=M2Crypto, CN=Heikki Toivonen
|
||||
Validity
|
||||
@@ -2040,10 +2007,10 @@ index a1bfc11..e77c732 100644
|
||||
+Mx0SUa0Dc/HSM9QJ+ZEQG42O66jC9wA0EZlsjNdYAJVJAnWARWhqDmRyHDLLOwz1
|
||||
+XHdGs9trY2L3jGwKQ/28DX9jCbCeaPF6NOFTvWWjuCi3Sb4ystCBaNY=
|
||||
-----END RSA PRIVATE KEY-----
|
||||
diff --git a/tests/x509_key.pem b/tests/x509_key.pem
|
||||
index b222459..1910b5c 100644
|
||||
--- a/tests/x509_key.pem
|
||||
+++ b/tests/x509_key.pem
|
||||
Index: m2crypto-0.45.0/tests/x509_key.pem
|
||||
===================================================================
|
||||
--- m2crypto-0.45.0.orig/tests/x509_key.pem 2025-04-17 05:30:40.000000000 +0200
|
||||
+++ m2crypto-0.45.0/tests/x509_key.pem 2025-04-23 00:03:54.562412614 +0200
|
||||
@@ -1,27 +1,27 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
-MIIEogIBAAKCAQEAj70+biwbETupMY1U2cbiEXrBYQ3aiC1XlWShVN4Z/x8mDDts
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
mtime: 1745359367
|
||||
commit: 86344b7783030609ad34907e5d32dbbdfc63f3eb05e2e6aa80180350e9009a85
|
||||
mtime: 1745359512
|
||||
commit: 84719d15958723c50ce3c421816606b4b175f5b71c6aa0f22a7a3a90f2a78fd6
|
||||
url: https://src.opensuse.org/mcepl/python-M2Crypto
|
||||
revision: factory
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:947bc8ccb2d0df48a278e6ae41c6fc98dd8fc91ed1360f50eac12c9304893e2a
|
||||
oid sha256:8cbb7c8032f79d627d676d58604860a67d5f620368fe57df9444eac42d74366e
|
||||
size 256
|
||||
|
||||
Reference in New Issue
Block a user