pyopenssl
pyopenssl copied to clipboard
Change X509_NAME_oneline for X509_NAME_print_ex [Fixes #745]
Additionally, makes stringified part conformant to RFC2253
I don't expect CI to succeed until https://github.com/pyca/cryptography/pull/4174 is merged into cryptography.
Codecov Report
Merging #746 into master will not change coverage. The diff coverage is
100%.
@@ Coverage Diff @@
## master #746 +/- ##
=======================================
Coverage 97.05% 97.05%
=======================================
Files 18 18
Lines 5703 5703
Branches 395 395
=======================================
Hits 5535 5535
Misses 112 112
Partials 56 56
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/OpenSSL/crypto.py | 96.86% <100%> (ø) |
:arrow_up: |
| tests/test_crypto.py | 98.92% <100%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 57c2f03...057c1c4. Read the comment docs.
I have a bit of a selfish reason for this PR: I need to get formatted names out of certificates as provided by XN_FLAG_RFC2253. Now that https://github.com/pyca/cryptography/pull/4174 was merged, I have access to X509_NAME_print_ex and I can do-it-myself, so no real issues. I don't know if you guys have a need for XN_FLAG_ONELINE for some backwards compatibility in these reprs. Also, if it turns out that backwards compatibility does require XN_FLAG_ONELINE, would you guys accept a PR that X509Name._to_rfc2253() (or something along those lines)?
Looks like this is failing CI because it's not finding the bindings from pyca/cryptography.
@reaperhulk helped me realize this wasn't the case. I was asserting the wrong thing which was causing the failure. I've updated this in the most recent commit.
Okay, as of 057c1c4 I believe the only tests which are failing in CI are the ones which don't have the bindings from pyca/cryptography#4174. Sorry for the messy commit schedule, looking forward to discussion of this PR.
pyca/cryptography now addresses this with rfc4514_string on x509.Name.