summaryrefslogtreecommitdiff
path: root/tests/test_ssl.py
Commit message (Collapse)AuthorAgeFilesLines
* Switch off Twisted.Matěj Cepl2023-02-041-0/+1
| | | | Nobody really seems to care, they provide their own SSL bindings.
* Changed required to pass tests on OpenSSL 3.0Petr Mensik2023-02-041-0/+1
| | | | | | | Just changes to make the package pass tests. Some are just cosmetic changes. Some would require proper investigation. Fixes #310
* On Windows skip over a test requiring os.mkfifoMatěj Cepl2023-02-021-0/+1
|
* Skip over problematic tests on WindowsMatěj Cepl2023-02-021-0/+1
|
* Replace 'from . import' with absolute imports.Matěj Cepl2021-01-141-1/+1
|
* Allow verify_cb_* to be called with ok=TrueCasey Deccio2021-01-081-2/+12
| | | | | With https://github.com/openssl/openssl/commit/2e06150e3928daa06d5ff70c32bffad8088ebe58 OpenSSL allowed verificaton to continue on UNABLE_TO_VERIFY_LEAF_SIGNATURE
* Mass removal of deprecated constructs.Matěj Cepl2020-12-021-13/+13
| | | | | * Replace unittest.makeSuite with unittest.TestLoader().loadTestsFromTestCase * import unittest from relative import
* Remove support for CentOS 6 and Python 2.6Matěj Cepl2020-11-201-6/+3
| | | | | | Support of CentOS 6 ends on 2020-11-30. Fixes #283
* tests/test_ssl: use -ciphercuites for TLS1.3 cipher in openssl1.1Sebastian Andrzej Siewior2019-03-071-1/+2
| | | | | | | | | | | | The -cipher can not be used in OpenSSL 1.1.b+ for TLS1.3 cipher since openssl upstream commit 1c31fe7eb093a ("Ignore cipher suites when setting cipher list"). Use -ciphersuites for TLS1.3 cipher as documented. Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc> Fixes #251
* Fix openssl 1.1 devel installation.Matěj Cepl2018-11-081-20/+35
|
* Fix test_26_compat on OSXDaniel Wozniak2018-10-031-1/+1
|
* Taken a longer millisecond timeout to avoid handling rounding.Konstantin Shemyak2018-07-241-11/+13
| | | | | | | | | Linux rounds microseconds in the timeouts up to the HZ kernel parameter. To avoid checking for rounded values, pick the timeout long enough so that it is whole number of HZ for any reasonable HZ value. By doing this, we also do not need to handle separately Windows rounding microseconds down to milliseconds.
* Enabled timeout case with microsecs and fixed for WindowsAndreas Maier2018-06-081-2/+19
|
* PEP8isationMatěj Cepl2018-03-201-4/+1
| | | | | | | Specially replace complicated construct with unittest2 to one import to M2Crypto top module. Also, Rand.load_file should have first parameter as bytes(), not str().
* Replace util.py3{bytes,str} with six.ensure_{binary,text}Matěj Cepl2018-03-191-8/+8
|
* Do not by-pass a potential transfer decoding in m2urllib2Marcus Huewe2018-03-131-0/+22
| | | | | | | | | | | For instance, without this patch no chunk decoding is performed, even if the HTTP response includes a "Transfer-Encoding: chunked" header (only affects the python3 code path). To fix this, "recv_into" has to call http.client.HTTPResponse.readinto, which does the corresponding transfer decoding. Thanks to Marco Strigl <mstrigl@suse.com> for reporting and helping to debug this issue.
* Replace all old-style classes with the new onesMatěj Cepl2018-03-131-2/+2
|
* Remove all checks of Linux distros.Matěj Cepl2018-03-051-26/+2
| | | | | | | | | platform.linux_distribution() has been deprecated for many versions, and it will be removed in 3.7 (https://bugs.python.org/issue1322). Also, we actually don’t need it (if we remove one unused SSLv2 test). Fixes #205
* Fix SSL.Connection.__del__Marcus Huewe2018-03-041-0/+47
| | | | | | | | | | Without this change self.m2_ssl_free(self.ssl) is never called, because m2.bio_noclose is defined as "0". Hence, the if-condition is always false. This got broken in commit e2f707b172 ("SSL package: Port to python3"). Note that these testcases rely on the "fact" (or CPython implementation detail?) that "del s" calls s' __del__ method.
* SSL package: Port to python3Matěj Cepl2018-02-081-30/+35
|
* Clean tests.test_ssl.BaseSSLClientTestCase class.Matěj Cepl2018-02-081-43/+37
| | | | | Make openssl_in_path into private property Remove superfluous logging.
* For testing we need to use some deprecated functions.Matěj Cepl2018-02-051-3/+9
| | | | And it makes output of testsuite run unreadable.
* Switch off use of urllib.URLOpener for py3k.Matěj Cepl2018-02-051-4/+3
| | | | It has been deprecated in py3k.
* test_ssl: show all proto msgs when starting s_serverAllan Que2018-01-201-1/+1
| | | | | * tries to fix HttpslibSSLSNIClientTestCase.test_IP_call() output buffer not getting flushed. This caused an AssertionError.
* Adding unit test for IP-based SNI connection.Matěj Cepl2017-12-181-22/+61
| | | | | | We don’t want to deal with IPv6 right here (e.g., Debian doesn’t point 'localhost' to :::1), and besides it is not supported on some minor platforms (some claim OpenBSD).
* Refactor SNI-related tests to separate class.Matěj Cepl2017-12-181-11/+17
|
* Mitigate a race in test_HTTPSConnection_SNI_supportMiloslav Trmač2017-10-071-0/+6
| | | | | | | | On ppc64/ppc64le, test_HTTPSConnection_SNI_support has been failing with > AssertionError: 'Hostname in TLS extension: "localhost"' not found in 'Setting secondary ctx parameters\nUsing default temp DH parameters\nACCEPT\n' i.e. the connection-specific data has not been logged by s_server. Wait before terminating it to allow it to flush its buffers.
* SSL.TwistedProtocolWrapper: some effort to PEP484-ize and port to py3k.Matěj Cepl2017-10-051-3/+6
|
* Attempt to create SNI testing.Matěj Cepl2017-09-271-0/+16
|
* Don’t do fork/exec manually, but use subprocess.Popen for tests.Matěj Cepl2017-09-271-15/+11
|
* X509_STORE_CTX_get_ex_data() doesn’t seem to work. Don’t use it!Matěj Cepl2017-09-201-1/+3
|
* Be more liberal about the error message in test_ssl.*.test_tls1_nokMatěj Cepl2017-09-201-1/+1
|
* Elimination of all open() statements w/o context managers.Matěj Cepl2016-12-151-14/+10
|
* Clean up imports and PEP8izationMatěj Cepl2016-12-151-22/+7
| | | | | Using PyCharm "Inspect Code..." functionality I found plenty of problems.
* Be a bit more easy on loggingMatěj Cepl2016-10-301-2/+0
|
* Actually do check, whether we have SSLv2 compiled in.Matěj Cepl2016-07-251-2/+3
| | | | | | | | | We have checked the version of OpenSSL only half way in the middle of the test, but we started OpenSSL s_server always with -ssl2 paramter no matter what version of OpenSSL we had. This time we are not running the test at all, if the OpenSSL doesn't support SSLv2. Fixes #145
* Twisted doesn't work well with python 2.6Matěj Cepl2016-07-221-3/+5
|
* SSL and SMIME modules: Add PEP-484 type hints in comments.Matěj Cepl2016-06-301-138/+86
|
* Replace util.py3k with six.PY3Matěj Cepl2016-05-121-1/+15
| | | | | | | | | | | | | | | | (this was the original comment on removing util.py3{bytes,str} describing my plans for future) It seems to that this abstraction goes exactly wrong way. The primary goal of py3k/py2k string abstraction should be IMHO the elimination of the ambiguous py2k str() object. Everything should be (using py2 terminology) either unicode() or bytes(), and when we start working on rebasing the ``python3`` branch on top of ``six``, we should spend all our effort on clarification between these two types and elimination of str(). Which seems to me is exactly what six.u() and six.b() methods do, so I would use them. Also eliminate util.h2b and util.py3ord
* Fix broken callbackMatěj Cepl2016-03-201-1/+1
|
* Fix broken imports (and PEP8ization).Matěj Cepl2016-03-201-12/+9
|
* Use the new absolute import syntax to fix Python 3. [PEP 328]Craig Rodrigues2016-03-201-3/+2
| | | | | | | | | | | I used the output of "2to3 -f import M2Crypto" to figure out which imports needed to be fixed. In addition, I added "from __future__ import absolute_import" to all files that I touched. This brings in the new import behavior, and works as far back as Python 2.5.0a1. See: https://docs.python.org/3/library/__future__.html https://www.python.org/dev/peps/pep-0328/
* PEP8ize.Matěj Cepl2016-03-201-4/+4
|
* Disable tests with weak ciphers on DebainMatěj Cepl2016-03-171-35/+2
| | | | | | Some platforms don’t support them and others will follow. Fixes #105
* Fix whitespace using suggestions from autopep8Craig Rodrigues2015-12-011-6/+6
|
* Most likely Fedora-only ... don't test export ciphers.Miloslav Trmač2015-11-181-0/+2
| | | | | | | | | | | | mitr: Doesn’t OpenSSL disable them by default nowadays? Not sure. mcepl: Well, the question is for how old OpenSSL we want to develop this. Some patches are originally from RHEL-5 … mitr: It’s the other way around: the more versions we want to support, the more tests we need to disable (or, better, autodetect the precise support level, without relying on M2Crypto code, if possible). Blocked by #48
* Remove more plain assertsMatěj Cepl2015-11-181-22/+26
|
* Python < 2.6 is not supported anymore, so we don’t need to work around it.Matěj Cepl2015-11-181-76/+75
|
* Use print as a function for Python 3. [PEP 3105]Craig Rodrigues2015-11-161-1/+3
| | | | | | For Python 2 compatibility, import print_function from the __future__ module. This works as far back as Python 2.6.0a2: https://docs.python.org/2/library/__future__.html
* Fix exception handling syntax for Python 3. [PEP-3110]Craig Rodrigues2015-11-131-16/+16
| | | | | This syntax was backported to Python 2.6: https://docs.python.org/2/whatsnew/2.6.html#pep-3110-exception-handling-changes