Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump cryptography from 39.0.1 to 41.0.0 #3057

Merged
merged 3 commits into from
Jul 15, 2023

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jun 2, 2023

Bumps cryptography from 39.0.1 to 41.0.0.

Changelog

Sourced from cryptography's changelog.

41.0.0 - 2023-05-30


* **BACKWARDS INCOMPATIBLE:** Support for OpenSSL less than 1.1.1d has been
  removed.  Users on older version of OpenSSL will need to upgrade.
* **BACKWARDS INCOMPATIBLE:** Support for Python 3.6 has been removed.
* **BACKWARDS INCOMPATIBLE:** Dropped support for LibreSSL < 3.6.
* Updated the minimum supported Rust version (MSRV) to 1.56.0, from 1.48.0.
* Updated Windows, macOS, and Linux wheels to be compiled with OpenSSL 3.1.1.
* Added support for the :class:`~cryptography.x509.OCSPAcceptableResponses`
  OCSP extension.
* Added support for the :class:`~cryptography.x509.MSCertificateTemplate`
  proprietary Microsoft certificate extension.
* Implemented support for equality checks on all asymmetric public key types.
* Added support for ``[email protected]`` encrypted keys in
  :func:`~cryptography.hazmat.primitives.serialization.load_ssh_private_key`.
* Added support for obtaining X.509 certificate signature algorithm parameters
  (including PSS) via
  :meth:`~cryptography.x509.Certificate.signature_algorithm_parameters`.
* Support signing :class:`~cryptography.hazmat.primitives.asymmetric.padding.PSS`
  X.509 certificates via the new keyword-only argument ``rsa_padding`` on
  :meth:`~cryptography.x509.CertificateBuilder.sign`.
* Added support for
  :class:`~cryptography.hazmat.primitives.ciphers.aead.ChaCha20Poly1305`
  on BoringSSL.

.. _v40-0-2:

40.0.2 - 2023-04-14

  • Fixed compilation when using LibreSSL 3.7.2.
  • Added some functions to support an upcoming pyOpenSSL release.

.. _v40-0-1:

40.0.1 - 2023-03-24


* Fixed a bug where certain operations would fail if an object happened to be
  in the top-half of the memory-space. This only impacted 32-bit systems.

.. _v40-0-0:

40.0.0 - 2023-03-24

  • BACKWARDS INCOMPATIBLE: As announced in the 39.0.0 changelog, the way cryptography links OpenSSL has changed. This only impacts users who

... (truncated)

Commits

Dependabot compatibility score

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    You can disable automated security fix PRs for this repo from the Security Alerts page.
> **Note** > Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

pquentin
pquentin previously approved these changes Jun 5, 2023
Copy link
Member

@pquentin pquentin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't care about the vulnerability itself since it's a dev dependency but upgrading does not hurt I guess?

@pquentin pquentin added the Skip Changelog Pull requests that don't require a changelog entry label Jun 5, 2023
@sethmlarson
Copy link
Member

sethmlarson commented Jun 6, 2023

@pquentin Looks like pypy3.7 isn't happy with this version of cryptography? https://github.com/urllib3/urllib3/actions/runs/5159370400/jobs/9294210564?pr=3057

Comment on lines 342 to 345
try:
context.hostname_checks_common_name = False
except AttributeError:
pass
context.hostname_checks_common_name = False
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about removing this check only when support for all 3.7 implementations is dropped?

Since we still define support for PyPy and Python 3.7 in the package config, the current version of urllib3 can be installed by package managers justly, and affected users will get an unclear AttributeError and come with new issues about incompatibilities… 🙂

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree we should keep this except AttributeError even if its defensive.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late reply. I agree too, I was initially in "drop unsupported Pypy versions" mode but it's better to be tied to Python versions. Done in 24d59b9 (#3057)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pquentin thanks for the change!

There seems to be a PyPy 7.3.8 release for Python 3.7 where setting hostname_checks_common_name does not work, so _is_bpo_43522_fixed has to return False for it

➜  ~ podman run --rm -it pypy:3.7-7.3.8
[...]
Python 3.7.12 (c8af402943f0c6c9155c76a45e3b64103783aacf, Feb 18 2022, 12:25:20)
[PyPy 7.3.8 with GCC 10.2.1 20210130 (Red Hat 10.2.1-11)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>> import ssl
>>>> ssl.SSLContext().hostname_checks_common_name = False
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: can't set attribute

Maybe we should keep pypy-3.7 tests for a while installing older cryptography to catch such things?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this seems like a prickly matrix of feature support we would want to ensure keeps working. Can't wait to be able to remove all of these conditionals... 😅

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about removing this check only when support for all 3.7 implementations is dropped?

Yeah that sounds like the easiest way, I can wait a few weeks.

@illia-v
Copy link
Member

illia-v commented Jul 14, 2023

@dependabot recreate

Just to be able to merge the cryptography upgrade cleanly, I extracted everything else to #3087

Bumps [cryptography](https://github.com/pyca/cryptography) from 39.0.1 to 41.0.0.
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](pyca/cryptography@39.0.1...41.0.0)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot force-pushed the dependabot/pip/cryptography-41.0.0 branch from 5a57c68 to 2a4b4d7 Compare July 14, 2023 19:01
@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Jul 15, 2023

A newer version of cryptography exists, but since this PR has been edited by someone other than Dependabot I haven't updated it. You'll get a PR for the updated version as normal once this PR is merged.

@sethmlarson
Copy link
Member

https://github.com/dependabot rebase

@dependabot @github
Copy link
Contributor Author

dependabot bot commented on behalf of github Jul 15, 2023

Looks like this PR has been edited by someone other than Dependabot. That means Dependabot can't rebase it - sorry!

If you're happy for Dependabot to recreate it from scratch, overwriting any edits, you can request @dependabot recreate.

@illia-v illia-v enabled auto-merge (squash) July 15, 2023 11:26
@illia-v illia-v merged commit 9aa0d4f into main Jul 15, 2023
64 checks passed
@illia-v illia-v deleted the dependabot/pip/cryptography-41.0.0 branch July 15, 2023 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog Pull requests that don't require a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants