* update python-google-auth to 2.36.1-3
This commit is contained in:
parent
718587f1b8
commit
343fc7b2f2
@ -1,7 +1,7 @@
|
||||
pkgbase = python-google-auth
|
||||
pkgdesc = Google Authentication Library
|
||||
pkgver = 2.36.1
|
||||
pkgrel = 2
|
||||
pkgrel = 3
|
||||
url = https://github.com/GoogleCloudPlatform/google-auth-library-python
|
||||
arch = any
|
||||
license = Apache-2.0
|
||||
@ -34,6 +34,8 @@ pkgbase = python-google-auth
|
||||
optdepends = python-pyu2f: for reauthentication support
|
||||
optdepends = python-requests: for async HTTP support
|
||||
source = https://github.com/GoogleCloudPlatform/google-auth-library-python/archive/v2.36.1/python-google-auth-2.36.1.tar.gz
|
||||
source = python-pyopenssl-compatibility.patch
|
||||
sha512sums = 3e7d62d798440ba810a631d1bcc4e592f2cca1a42614efa0a2260992132dbcd1ee1d80418eb9c9c8ce8c433c2724b8680e8eecbe249eeeb27868665a0ca1b189
|
||||
sha512sums = 4e23dfaeec6933b1fb6736b6402f1f3cce0fedc0967e527879bc1b3e6215d94c986c28ab9d6b9b4ba975f39316eb0159bb74144aca1f27345b0a9174857fcfff
|
||||
|
||||
pkgname = python-google-auth
|
||||
|
@ -5,7 +5,7 @@
|
||||
_name=google-auth-library-python
|
||||
pkgname=python-google-auth
|
||||
pkgver=2.36.1
|
||||
pkgrel=2
|
||||
pkgrel=3
|
||||
pkgdesc="Google Authentication Library"
|
||||
url="https://github.com/GoogleCloudPlatform/google-auth-library-python"
|
||||
license=('Apache-2.0')
|
||||
@ -46,12 +46,18 @@ optdepends=(
|
||||
'python-pyu2f: for reauthentication support'
|
||||
'python-requests: for async HTTP support'
|
||||
)
|
||||
source=("$url/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
|
||||
sha512sums=('3e7d62d798440ba810a631d1bcc4e592f2cca1a42614efa0a2260992132dbcd1ee1d80418eb9c9c8ce8c433c2724b8680e8eecbe249eeeb27868665a0ca1b189')
|
||||
source=(
|
||||
"$url/archive/v$pkgver/$pkgname-$pkgver.tar.gz"
|
||||
"python-pyopenssl-compatibility.patch"
|
||||
)
|
||||
sha512sums=('3e7d62d798440ba810a631d1bcc4e592f2cca1a42614efa0a2260992132dbcd1ee1d80418eb9c9c8ce8c433c2724b8680e8eecbe249eeeb27868665a0ca1b189'
|
||||
'4e23dfaeec6933b1fb6736b6402f1f3cce0fedc0967e527879bc1b3e6215d94c986c28ab9d6b9b4ba975f39316eb0159bb74144aca1f27345b0a9174857fcfff')
|
||||
|
||||
prepare() {
|
||||
cd $_name-$pkgver
|
||||
|
||||
patch -Np1 -i ../python-pyopenssl-compatibility.patch
|
||||
|
||||
# Remove python-mock, upstream PR: https://github.com/googleapis/google-auth-library-python/pull/1361
|
||||
sed -i '/^mock$/d' testing/requirements.txt
|
||||
sed -i -e 's/^import mock$/from unittest import mock/' \
|
||||
|
@ -0,0 +1,33 @@
|
||||
diff --git a/tests/transport/test__mtls_helper.py b/tests/transport/test__mtls_helper.py
|
||||
index f6e20b7..f899d0d 100644
|
||||
--- a/tests/transport/test__mtls_helper.py
|
||||
+++ b/tests/transport/test__mtls_helper.py
|
||||
@@ -18,6 +18,8 @@ import re
|
||||
import mock
|
||||
from OpenSSL import crypto
|
||||
import pytest # type: ignore
|
||||
+from cryptography.hazmat.primitives.asymmetric import ec
|
||||
+from cryptography.hazmat.primitives import hashes
|
||||
|
||||
from google.auth import exceptions
|
||||
from google.auth.transport import _mtls_helper
|
||||
@@ -630,8 +632,17 @@ class TestDecryptPrivateKey(object):
|
||||
x509.set_pubkey(public_key)
|
||||
|
||||
# Test the decrypted key works by signing and verification.
|
||||
- signature = crypto.sign(private_key, b"data", "sha256")
|
||||
- crypto.verify(x509, signature, b"data", "sha256")
|
||||
+ cryptography_key = private_key.to_cryptography_key()
|
||||
+ signature = cryptography_key.sign(
|
||||
+ data=b"data",
|
||||
+ signature_algorithm=ec.ECDSA(hashes.SHA256()),
|
||||
+ )
|
||||
+ cryptography_public_key = public_key.to_cryptography_key()
|
||||
+ cryptography_public_key.verify(
|
||||
+ signature=signature,
|
||||
+ data=b"data",
|
||||
+ signature_algorithm=ec.ECDSA(hashes.SHA256())
|
||||
+ )
|
||||
|
||||
def test_crypto_error(self):
|
||||
with pytest.raises(crypto.Error):
|
Loading…
x
Reference in New Issue
Block a user