X509Store.add_cert no longer raises an error on duplicate cert#787
Merged
Conversation
alex
reviewed
Aug 23, 2018
| code = _lib.ERR_get_error() | ||
| err_reason = _lib.ERR_GET_REASON(code) | ||
| _openssl_assert( | ||
| err_reason == _lib.X509_R_CERT_ALREADY_IN_HASH_TABLE |
Member
There was a problem hiding this comment.
Are there any other errors that can happen?
alex
reviewed
Aug 23, 2018
| ^^^^^^^^ | ||
|
|
||
| *none* | ||
| - ``X509Store.add_cert`` no longer raises an error if you add a duplicate cert. |
Member
There was a problem hiding this comment.
This should be in the backwards incompat section
alex
approved these changes
Aug 23, 2018
peterbe
referenced
this pull request
in peterbe/django-peterbecom
Jan 22, 2019
This PR updates [pyOpenSSL](https://pypi.org/project/pyOpenSSL) from **18.0.0** to **19.0.0**. <details> <summary>Changelog</summary> ### 19.0.0 ``` ------------------- Backward-incompatible changes: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - ``X509Store.add_cert`` no longer raises an error if you add a duplicate cert. `787 <https://github.com/pyca/pyopenssl/pull/787>`_ Deprecations: ^^^^^^^^^^^^^ *none* Changes: ^^^^^^^^ - pyOpenSSL now works with OpenSSL 1.1.1. `805 <https://github.com/pyca/pyopenssl/pull/805>`_ - pyOpenSSL now handles NUL bytes in ``X509Name.get_components()`` `804 <https://github.com/pyca/pyopenssl/pull/804>`_ ---- ``` </details> <details> <summary>Links</summary> - PyPI: https://pypi.org/project/pyopenssl - Changelog: https://pyup.io/changelogs/pyopenssl/ - Homepage: https://pyopenssl.org/ - Docs: https://pythonhosted.org/pyOpenSSL/ </details>
peterbe
referenced
this pull request
in mozilla-services/tecken
Jan 22, 2019
This PR updates [pyOpenSSL](https://pypi.org/project/pyOpenSSL) from **18.0.0** to **19.0.0**. <details> <summary>Changelog</summary> ### 19.0.0 ``` ------------------- Backward-incompatible changes: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - ``X509Store.add_cert`` no longer raises an error if you add a duplicate cert. `787 <https://github.com/pyca/pyopenssl/pull/787>`_ Deprecations: ^^^^^^^^^^^^^ *none* Changes: ^^^^^^^^ - pyOpenSSL now works with OpenSSL 1.1.1. `805 <https://github.com/pyca/pyopenssl/pull/805>`_ - pyOpenSSL now handles NUL bytes in ``X509Name.get_components()`` `804 <https://github.com/pyca/pyopenssl/pull/804>`_ ---- ``` </details> <details> <summary>Links</summary> - PyPI: https://pypi.org/project/pyopenssl - Changelog: https://pyup.io/changelogs/pyopenssl/ - Homepage: https://pyopenssl.org/ - Docs: https://pythonhosted.org/pyOpenSSL/ </details>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OpenSSL 1.1.0i changed X509_STORE_add_cert such that it no longer raises an error if a duplicate cert is added. This patch makes it so we behave consistently (and do not error) on all versions.