Bug 1029246 - Add support for SNI to m2crypto package.
Add support for SNI to m2crypto package.
Product: Fedora
Classification: Fedora
Component: m2crypto (Show other bugs)
Unspecified Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Miloslav Trmač
Fedora Extras Quality Assurance
Depends On:
Blocks: 1038795
  Show dependency treegraph
Reported: 2013-11-11 19:30 EST by Oleg Girko
Modified: 2014-01-03 03:42 EST (History)
3 users (show)

See Also:
Fixed In Version: m2crypto-0.21.1-13.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1038795 (view as bug list)
Last Closed: 2014-01-03 03:42:20 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
A patch adding SNI support to M2Crypto. (933 bytes, patch)
2013-11-11 19:30 EST, Oleg Girko
no flags Details | Diff

  None (edit)
Description Oleg Girko 2013-11-11 19:30:52 EST
Created attachment 822696 [details]
A patch adding SNI support to M2Crypto.

Description of problem:
M2Crypto doesn't support SNI (Server Name Indication).
This feature is necessary for selecting the right SSL-protected web site hosted using name-based virtual hosting on a shared IP address.
All modern browsers support this feature.
However, Python programs which use M2Crypto for programmatic access to SSL-protected web services can't use SNI because it's not implemented in M2Crypto.
The manifestation of lack of SNI support is error message about wrong site certificate.

Version-Release number of selected component (if applicable):

How reproducible:
Connect using Connection class from M2Crypto.SSL.Connection module to any SSL-protected site hosted using name-based virtual hosting, which requires SNI support to distinguish between virtual hosts.

One of the programs using M2Crypto is osc
which is packaged for Fedora.
You can use it to test lack of support for SNI in M2Crypto, but if solution proposed below is implemented, osc needs a separate patch to use SNI.

Steps to Reproduce:
osc ls https://jr.infoserver.lv/obsapi

Actual results:
Error about wrong SSL certificate.

Expected results:
No error about wrong SSL certificate.

Additional info:
This is a known issue described here:
This bug report has a patch attached which enables SNI support in M2Crypto.

Unfortunately, M2Crypto development has stopped in January 2011 (this is when the last commit to http://svn.osafoundation.org/m2crypto/trunk Subversion repository was made).
Hence, we're stuck with adding patches to packages.

I've attached the patch adding SNI support to M2Crypto.
You can find SRPM of m2crypto with SNI support here:
Comment 1 Miloslav Trmač 2013-11-12 10:29:39 EST
Sounds reasonable, thanks for the patch.

(I should investigate using %rename like many other wrappers do.)
Comment 2 Fedora Update System 2013-12-18 12:11:03 EST
m2crypto-0.21.1-13.fc20 has been submitted as an update for Fedora 20.
Comment 3 Fedora Update System 2013-12-19 20:53:37 EST
Package m2crypto-0.21.1-13.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing m2crypto-0.21.1-13.fc20'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 4 Fedora Update System 2014-01-03 03:42:20 EST
m2crypto-0.21.1-13.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.