| Summary: | m2crypto loading x509 cert causes Segmentation fault | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Mo Morsi <mmorsi> |
| Component: | m2crypto | Assignee: | Miloslav Trmač <mitr> |
| Status: | CLOSED DEFERRED | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | urgent | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 16 | CC: | dmalcolm, extras-orphan, gholms, mitr, owen.synge |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 707676 | Environment: | |
| Last Closed: | 2011-09-30 13:24:46 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Bug Depends On: | 707676, 707778 | ||
| Bug Blocks: | 743402 | ||
|
Description
Mo Morsi
2011-09-28 11:04:33 UTC
Thanks for your report. What exactly is the "same issue"? #707676 is a crash caused by incorrect C bindings, not something that can be fixed in Python. The patch appears to add new functionality, so it will have to be accepted upstream first. Did you submit it there, or shall I do so? Is there a test suite, or at least an example user? The x509_name_hash change breaks compatibility, which might be a problem. Also, is this really targeted at F16 or at EL*, as the git history seems to indicate? Thanks for the response. Am actually going to be closing this out as I'm not 100% sure what the issue is and is unrelated to what I'm working on (was previously under the impression that it was). My way of fixing the issue is to install a slightly newer version from fedora.
Here is a summary:
The "get0_signers" method does not work with python 2.4 m2crypto in SL5. Hence the following code does not work.
buf = BIO.MemoryBuffer(text_to_verify)
sk = X509.X509_Stack()
p7, data = SMIME.smime_load_pkcs7_bio(buf)
supplied_stack = p7.get0_signers(sk)
For this reason I tried the version from python 2.6, but this segfaults, hence this bug.
My current workaround for my customers and my build system is to document the following process for RHEL, Centos and Scientific Linux 5
yum update -y
yum upgrade -y
yum install subversion \
python \
rpm-build \
make \
org-desy-grid-virt-sort-release \
openssl-devel \
python-devel \
pkgconfig \
swig \
gcc \
pexpect \
lcg-CA \
ca_BitFace \
fetch-crl \
-y
rpm -i http://ftp.informatik.uni-frankfurt.de/fedora-archive/fedora/linux/releases/8/Everything/source/SRPMS/m2crypto-0.18-2.src.rpm
rpmbuild -ba /usr/src/redhat/SPECS/m2crypto.spec
fred=`rpm -qa | grep m2crypto`
if [ "x${fred}" != "x" ] ; then
rpm -e --nodeps m2crypto
fi
rpm -i /usr/src/redhat/RPMS/x86_64/m2crypto*.rpm
Once this is done all is working fine. This is in my opinion a more appropriate solution to the issue of verifying SMIME signatures with X509 on RHEL, Centos and Scientific Linux 5, provided you can use python 2.4 code base.
Maybe you could look into this solution?
|