FreeBSD Bugzilla – Attachment 216817 Details for
Bug 248307
devel/py-rauth: Add Cryptodome support (Break dependency on security/py-pycrypto)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
devel/py-rauth: Break dependency on security/py-pycrypto
patch-devel_py-rauth-0.7.2_1.txt (text/plain), 3.03 KB, created by
John W. O'Brien
on 2020-07-27 19:15:00 UTC
(
hide
)
Description:
devel/py-rauth: Break dependency on security/py-pycrypto
Filename:
MIME Type:
Creator:
John W. O'Brien
Created:
2020-07-27 19:15:00 UTC
Size:
3.03 KB
patch
obsolete
>Index: devel/py-rauth/Makefile >=================================================================== >--- devel/py-rauth/Makefile (revision 543525) >+++ devel/py-rauth/Makefile (working copy) >@@ -3,6 +3,7 @@ > > PORTNAME= rauth > PORTVERSION= 0.7.2 >+PORTREVISION= 1 > CATEGORIES= devel www python > PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} > >@@ -15,7 +16,7 @@ > RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}requests>=1.2.3:www/py-requests@${PY_FLAVOR} > TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}nose>=1.2.1:devel/py-nose@${PY_FLAVOR} \ > ${PYTHON_PKGNAMEPREFIX}mock>=1.0.1:devel/py-mock@${PY_FLAVOR} \ >- ${PYTHON_PKGNAMEPREFIX}pycrypto>=2.5:security/py-pycrypto@${PY_FLAVOR} >+ ${PYTHON_PKGNAMEPREFIX}pycryptodome>=0:security/py-pycryptodome@${PY_FLAVOR} > > USES= python > USE_GITHUB= yes >Index: devel/py-rauth/files/patch-rauth__oauth.py >=================================================================== >--- devel/py-rauth/files/patch-rauth__oauth.py (nonexistent) >+++ devel/py-rauth/files/patch-rauth__oauth.py (working copy) >@@ -0,0 +1,29 @@ >+commit 7fb3b7bf1a1869a52cf59ee3eb607d318e97265c >+Author: John W. O'Brien <john@saltant.com> >+Date: Mon Jul 27 14:56:02 2020 -0400 >+ >+ Support PyCryptodome as alternative to PyCrypto >+ >+--- rauth/oauth.py.orig 2015-11-05 16:01:31 UTC >++++ rauth/oauth.py >+@@ -171,7 +171,8 @@ class RsaSha1Signature(SignatureMethod): >+ from Crypto.Signature import PKCS1_v1_5 as p >+ self.RSA, self.SHA, self.PKCS1_v1_5 = r, s, p >+ except ImportError: # pragma: no cover >+- raise NotImplementedError('PyCrypto is required for ' + self.NAME) >++ raise NotImplementedError('PyCrypto(dome) is required for ' >++ + self.NAME) >+ >+ def sign(self, >+ consumer_secret, >+@@ -208,7 +209,9 @@ class RsaSha1Signature(SignatureMethod): >+ # resolve the key >+ if is_basestring(consumer_secret): >+ consumer_secret = self.RSA.importKey(consumer_secret) >+- if not isinstance(consumer_secret, self.RSA._RSAobj): >++ valid_cls = (getattr(self.RSA, '_RSAobj', False) >++ or getattr(self.RSA, 'RsaKey', False)) >++ if not (valid_cls and isinstance(consumer_secret, valid_cls)): >+ raise ValueError('invalid consumer_secret') >+ >+ # hash the string with RSA-SHA1 > >Property changes on: devel/py-rauth/files/patch-rauth__oauth.py >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: devel/py-rauth/files/patch-setup.py >=================================================================== >--- devel/py-rauth/files/patch-setup.py (revision 543525) >+++ devel/py-rauth/files/patch-setup.py (working copy) >@@ -14,7 +14,7 @@ > +tests_require = [ > + 'nose', > + 'mock', >-+ 'pycrypto', >++ 'pycryptodome', > +] > + > if sys.version_info[0] == 2 and sys.version_info[1] < 7:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
john
:
maintainer-approval?
Actions:
View
|
Diff
Attachments on
bug 248307
: 216817