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

Handle NULL bytes in get_components() values #804

Merged
merged 2 commits into from
Jan 21, 2019

Conversation

romuald
Copy link
Contributor

@romuald romuald commented Jan 8, 2019

Some old software may generate "bogus" CN with each character preceded
by a NULL.

This is already handled in commonName, but wasn't in get_components()

Some old software may generate "bogus" CN with each character preceded
by a NULL.

This is already handled in commonName, but wasn't in get_components()
@romuald
Copy link
Contributor Author

romuald commented Jan 8, 2019

(2 failed tests here, but they are the same as the tests failing on the master branch)

@reaperhulk
Copy link
Member

You'll need to use b'CN' so that the test can work on both python 2 and 3. Additionally, this can be simplified to: value = _ffi.buffer(_lib.ASN1_STRING_data(fval), _lib.ASN1_STRING_length(fval))[:] rather than unpack call.

@romuald
Copy link
Contributor Author

romuald commented Jan 9, 2019

@reaperhulk done. I'm not familiar with FFI yet thanks :)

@reaperhulk
Copy link
Member

Thanks for the quick update. Now the maintainers (that includes me, sigh) need to fix the other tests so we can get this merged!

@reaperhulk reaperhulk added this to the 19.0.0 milestone Jan 21, 2019
@alex alex merged commit 4183beb into pyca:master Jan 21, 2019
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 &lt;https://github.com/pyca/pyopenssl/pull/787&gt;`_


Deprecations:
^^^^^^^^^^^^^

*none*


Changes:
^^^^^^^^

- pyOpenSSL now works with OpenSSL 1.1.1.
  `805 &lt;https://github.com/pyca/pyopenssl/pull/805&gt;`_
- pyOpenSSL now handles NUL bytes in ``X509Name.get_components()``
  `804 &lt;https://github.com/pyca/pyopenssl/pull/804&gt;`_



----
   ```
   
  
</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 &lt;https://github.com/pyca/pyopenssl/pull/787&gt;`_


Deprecations:
^^^^^^^^^^^^^

*none*


Changes:
^^^^^^^^

- pyOpenSSL now works with OpenSSL 1.1.1.
  `805 &lt;https://github.com/pyca/pyopenssl/pull/805&gt;`_
- pyOpenSSL now handles NUL bytes in ``X509Name.get_components()``
  `804 &lt;https://github.com/pyca/pyopenssl/pull/804&gt;`_



----
   ```
   
  
</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>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants