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

Update cryptography to 42.0.4 and update certdir (SYN-3552, SYN-6860) #3568

Merged
merged 39 commits into from
Feb 28, 2024

Conversation

vEpiphyte
Copy link
Contributor

@vEpiphyte vEpiphyte commented Feb 15, 2024

  • Cryptography update addresses older version of cryptography package containing CVE-2023-50782 & CVE-2024-26130
  • certdir now uses cryptography X509 objects and RSA private key objects, instead of PyOpenSSL X509 and Pkey objects. This is largely due to the removal of APIs from PyOpenSSL which we were utilizing for PKCS12 support and the guidance from PyOpenSSL project to not utilize the Crypto module in new projects as it is considered deprecated in favor of Cryptography. Per prior discussion, there should be no API stability concerns related to this change since the CertDir class is not exposed via telepath or storm apis.
  • certdir is now fully typed. This identified issues where we were declaring bytes as inputs on certdir and Cortex was passing in PEM strings instead of bytes.
  • Remove PyOpenSSL use where it is possible to do so. We now only use it for doing X509 path building and certificate verification, eventually we'll be able to remove this in favor of APIs provided by Cryptography ( see PyOpenSSL X509Store / Context parity in Cryptography pyca/cryptography#10393 X.509 path building follow-ups pyca/cryptography#10034 )

@vEpiphyte vEpiphyte added enhancement reqChangelog requires changelog labels Feb 15, 2024
@vEpiphyte vEpiphyte changed the title Update cryptography to 42.0.2 and update certdir Update cryptography to 42.0.2 and update certdir (SYN-6860) Feb 15, 2024
@vEpiphyte vEpiphyte changed the title Update cryptography to 42.0.2 and update certdir (SYN-6860) Update cryptography to 42.0.2 and update certdir (SYN-3552, SYN-6860) Feb 15, 2024
synapse/lib/certdir.py Outdated Show resolved Hide resolved
synapse/lib/certdir.py Outdated Show resolved Hide resolved
synapse/lib/certdir.py Outdated Show resolved Hide resolved
synapse/lib/certdir.py Outdated Show resolved Hide resolved
synapse/lib/certdir.py Outdated Show resolved Hide resolved
synapse/lib/certdir.py Outdated Show resolved Hide resolved
Cisphyx
Cisphyx previously approved these changes Feb 20, 2024
@vEpiphyte vEpiphyte added this to the v2.16x.x milestone Feb 21, 2024
synapse/lib/certdir.py Show resolved Hide resolved
synapse/lib/certdir.py Outdated Show resolved Hide resolved
requirements.txt Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
@vEpiphyte vEpiphyte changed the title Update cryptography to 42.0.2 and update certdir (SYN-3552, SYN-6860) Update cryptography to 42.0.4 and update certdir (SYN-3552, SYN-6860) Feb 23, 2024
@vEpiphyte vEpiphyte merged commit 5a60657 into master Feb 28, 2024
5 checks passed
@vEpiphyte vEpiphyte deleted the feat_cryptography_update branch February 28, 2024 20:09
@vEpiphyte vEpiphyte removed the reqChangelog requires changelog label Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants