diff --git a/.kokoro/test-samples-impl.sh b/.kokoro/test-samples-impl.sh index 311a8d54b..8a324c9c7 100755 --- a/.kokoro/test-samples-impl.sh +++ b/.kokoro/test-samples-impl.sh @@ -80,7 +80,7 @@ for file in samples/**/requirements.txt; do EXIT=$? # If this is a periodic build, send the test log to the FlakyBot. - # See https://github.com/googleapis/repo-automation-bots/tree/master/packages/flakybot. + # See https://github.com/googleapis/repo-automation-bots/tree/main/packages/flakybot. if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"periodic"* ]]; then chmod +x $KOKORO_GFILE_DIR/linux_amd64/flakybot $KOKORO_GFILE_DIR/linux_amd64/flakybot diff --git a/CHANGELOG.md b/CHANGELOG.md index 82da8c6aa..68b388db9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ [1]: https://pypi.org/project/google-auth/#history +### [2.0.2](https://www.github.com/googleapis/google-auth-library-python/compare/v2.0.1...v2.0.2) (2021-08-25) + + +### Bug Fixes + +* use 'int.to_bytes' rather than deprecated crypto wrapper ([#848](https://www.github.com/googleapis/google-auth-library-python/issues/848)) ([b79b554](https://www.github.com/googleapis/google-auth-library-python/commit/b79b55407b31933c9a8fe6de01478fa00a33fa2b)) +* use int.from_bytes ([#846](https://www.github.com/googleapis/google-auth-library-python/issues/846)) ([466aed9](https://www.github.com/googleapis/google-auth-library-python/commit/466aed99f5c2ba15d2036fa21cc83b3f0fc22639)) + ### [2.0.1](https://www.github.com/googleapis/google-auth-library-python/compare/v2.0.0...v2.0.1) (2021-08-17) diff --git a/README.rst b/README.rst index 35ebe8bf0..6e6716173 100644 --- a/README.rst +++ b/README.rst @@ -57,11 +57,11 @@ Contributions to this library are always welcome and highly encouraged. See `CONTRIBUTING.rst`_ for more information on how to get started. -.. _CONTRIBUTING.rst: https://github.com/googleapis/google-auth-library-python/blob/master/CONTRIBUTING.rst +.. _CONTRIBUTING.rst: https://github.com/googleapis/google-auth-library-python/blob/main/CONTRIBUTING.rst License ------- Apache 2.0 - See `the LICENSE`_ for more information. -.. _the LICENSE: https://github.com/googleapis/google-auth-library-python/blob/master/LICENSE +.. _the LICENSE: https://github.com/googleapis/google-auth-library-python/blob/main/LICENSE diff --git a/docs/conf.py b/docs/conf.py index b68467fab..58e5b9a99 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -53,8 +53,8 @@ # # source_encoding = 'utf-8-sig' -# The master toctree document. -master_doc = "index" +# The root toctree document. +root_doc = "index" # General information about the project. project = "google-auth" @@ -277,13 +277,7 @@ # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - ( - master_doc, - "google-auth.tex", - "google-auth Documentation", - "Google, Inc.", - "manual", - ) + (root_doc, "google-auth.tex", "google-auth Documentation", "Google, Inc.", "manual") ] # The name of an image file (relative to this directory) to place at the top of @@ -323,7 +317,7 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). -man_pages = [(master_doc, "google-auth", "google-auth Documentation", [author], 1)] +man_pages = [(root_doc, "google-auth", "google-auth Documentation", [author], 1)] # If true, show URL addresses after external links. # @@ -337,7 +331,7 @@ # dir menu entry, description, category) texinfo_documents = [ ( - master_doc, + root_doc, "google-auth", "google-auth Documentation", author, diff --git a/docs/index.rst b/docs/index.rst index 954425981..8a5f13a6d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -62,7 +62,7 @@ google-auth is made available under the Apache License, Version 2.0. For more details, see `LICENSE`_ .. _LICENSE: - https://github.com/GoogleCloudPlatform/google-auth-library-python/blob/master/LICENSE + https://github.com/GoogleCloudPlatform/google-auth-library-python/blob/main/LICENSE Contributing ------------ @@ -71,4 +71,4 @@ We happily welcome contributions, please see our `contributing`_ documentation for details. .. _contributing: - https://github.com/GoogleCloudPlatform/google-auth-library-python/blob/master/CONTRIBUTING.rst + https://github.com/GoogleCloudPlatform/google-auth-library-python/blob/main/CONTRIBUTING.rst diff --git a/google/auth/crypt/es256.py b/google/auth/crypt/es256.py index c6d617606..71dcbfcac 100644 --- a/google/auth/crypt/es256.py +++ b/google/auth/crypt/es256.py @@ -15,7 +15,6 @@ """ECDSA (ES256) verifier and signer that use the ``cryptography`` library. """ -from cryptography import utils import cryptography.exceptions from cryptography.hazmat import backends from cryptography.hazmat.primitives import hashes @@ -53,8 +52,8 @@ def verify(self, message, signature): sig_bytes = _helpers.to_bytes(signature) if len(sig_bytes) != 64: return False - r = utils.int_from_bytes(sig_bytes[:32], byteorder="big") - s = utils.int_from_bytes(sig_bytes[32:], byteorder="big") + r = int.from_bytes(sig_bytes[:32], byteorder="big") + s = int.from_bytes(sig_bytes[32:], byteorder="big") asn1_sig = encode_dss_signature(r, s) message = _helpers.to_bytes(message) @@ -121,7 +120,7 @@ def sign(self, message): # Convert ASN1 encoded signature to (r||s) raw signature. (r, s) = decode_dss_signature(asn1_signature) - return utils.int_to_bytes(r, 32) + utils.int_to_bytes(s, 32) + return r.to_bytes(32, byteorder="big") + s.to_bytes(32, byteorder="big") @classmethod def from_string(cls, key, key_id=None): diff --git a/google/auth/version.py b/google/auth/version.py index 1a390124f..46b4030bd 100644 --- a/google/auth/version.py +++ b/google/auth/version.py @@ -12,4 +12,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "2.0.1" +__version__ = "2.0.2" diff --git a/owlbot.py b/owlbot.py index 58aa53a70..61cf1281a 100644 --- a/owlbot.py +++ b/owlbot.py @@ -25,4 +25,9 @@ 'value: "docs"', ) +# Remove the replacement below once https://github.com/googleapis/synthtool/pull/1188 is merged + +# Update googleapis/repo-automation-bots repo to main in .kokoro/*.sh files +assert 1 == s.replace(".kokoro/*.sh", "repo-automation-bots/tree/master", "repo-automation-bots/tree/main") + s.shell.run(["nox", "-s", "blacken"], hide_output=False) diff --git a/system_tests/secrets.tar.enc b/system_tests/secrets.tar.enc index 62ef5a717..8f0d88ac6 100644 Binary files a/system_tests/secrets.tar.enc and b/system_tests/secrets.tar.enc differ