Description of problem: Please apply the below patch to M2Crypto 0.21.1 to allow a certificate to be verified against a chain of CAs and a stack of CRLs. Patch submitted to upstream: https://bugzilla.osafoundation.org/attachment.cgi?id=5746 Upstream Bug: https://bugzilla.osafoundation.org/show_bug.cgi?id=12954#c2 This patch adds a "verify_cert()" method on X509_Store_Context to allow openssl to do the full certificate verification. Additionally more functionality is added for working with CRLs. We have a built RPM with the patch applied below: http://repos.fedorapeople.org/repos/pulp/pulp/testing/fedora-16/x86_64/ This patched version of M2Crypto is being used by Pulp (https://fedorahosted.org/pulp/). It allows us to do full X509 certificate verification through M2Crypto/OpenSSL. Version-Release number of selected component (if applicable): M2Crypto 0.21.1 Patch has been tested on Fedora 15, 16, and el6. (el5 needs more work) Actual results: Without this patch M2Crypto is not able to verify a certificate against a chain of CAs or against a CRL. Expected results: Certificate verification against a chain of CAs and/or against multiple CRLs will be possible. For those interested, this wiki page has some more info on how Pulp is using this patch for CA Chain verification: - https://fedorahosted.org/pulp/wiki/CertChainVerification Here is a sample of what the code looks like for chain verification: http://git.fedorahosted.org/git/?p=pulp.git;a=blob;f=playpen/certs/chain_example/test_chain_verify.py;hb=HEAD
This message is a reminder that Fedora 16 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 16. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '16'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 16's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 16 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged to click on "Clone This Bug" and open it against that version of Fedora. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
This message is a reminder that Fedora 18 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 18. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '18'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 18's end of life. Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 18 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior to Fedora 18's end of life. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Unfortunately, the upstream bugzilla is dead and so the patch got lost. If you you want to have this patch reviewed it is always a better idea to attach it directly to this bug as well (Red Hat Bugzilla tend to be one of the most stable issue trackers around). As the bug stands now, it is probably ready to be closed as CANTFIX.
Matěj, my best guess is that the patch is https://github.com/pulp/pulp/blob/d97fe613b450eec3e53ad833bfa8dda4953176c4/deps/m2crypto/m2crypto-0.21.1-x509_crl.patch (from https://github.com/pulp/pulp/commit/f435a14af33b369fd3daa4ffe18f6404a7c5274c ); or possibly https://github.com/pulp/pulp/blob/91a1e28c9e7d3dee418d5c7680dbf25c3e7adc63/playpen/certs/m2/m2crypto_changes_jwm.patch . But, as the commit, and https://github.com/pulp/pulp/blob/91a1e28c9e7d3dee418d5c7680dbf25c3e7adc63/docs/user-guide/release-notes/2.4.x.rst says, pulp has given up on the feature. John, does it make sense to revive this effort? (Matěj is the upstream maintainer now.)
Created attachment 1329506 [details] one version of the patch Version from https://raw.githubusercontent.com/pulp/pulp/d97fe613b450eec3e53ad833bfa8dda4953176c4/deps/m2crypto/m2crypto-0.21.1-x509_crl.patch dated 2012-01-19 12:52:16.062243001 -0500
Created attachment 1329507 [details] another version of the patch Version from https://raw.githubusercontent.com/pulp/pulp/91a1e28c9e7d3dee418d5c7680dbf25c3e7adc63/playpen/certs/m2/m2crypto_changes_jwm.patch Dated 2012-01-19 09:42:48.708732504 -0500 This is confusing: this version seems to be more sophisticated (more tests against unforeseen circumstances), but there seem to be more tests. On the one hand, it has exactly the same number of lines (1105), on the other hand interdiff has 2239 lines, so it seems like these are quite different.
Matěj, I can’t see any “more tests against unforeseen circumstances”; the two patches are exactly identical apart from the top-level names. > interdiff -p1 m2crypto-0.21.1-x509_crl.patch m2crypto_changes_jwm.patch is empty.
(In reply to Miloslav Trmač from comment #10) > Matěj, I can’t see any “more tests against unforeseen circumstances”; the > two patches are exactly identical apart from the top-level names. > > > interdiff -p1 m2crypto-0.21.1-x509_crl.patch m2crypto_changes_jwm.patch > is empty. You are right ... missing -p1 for interdiff.
Miloslav/Matej, FYI, I'm no longer on the Pulp development team, unsure if they still require this patch. I would guess not since they've been through ~2 rewrites now and I think they dropped CRL support. For background, the issue I found was that CRL verification was not supported in m2crypto, at the time the certificate verification was weak, it didn't defer to openssl and do a full certificate chain check. The patch I added was a combination of exposing certification verification from openssl as well as expanding on the CRL support offered.
Patched upstream.