Commit Graph

143 Commits

Author SHA1 Message Date
Christian Heimes 6663eb6b72 Issue #27691: Fix ssl module's parsing of GEN_RID subject alternative name fields in X.509 certs. 2016-09-06 23:25:35 +02:00
Christian Heimes 9940633e89 Issue #26470: Use short name rather than name for compression name to fix #27958. 2016-09-06 01:10:39 +02:00
Christian Heimes c2fc7c4f53 Issue #26470: Port ssl and hashlib module to OpenSSL 1.1.0. 2016-09-05 23:37:13 +02:00
Martin Panter 8c6849bfe6 Issue #23804: Fix SSL zero-length recv() calls to not block and raise EOF 2016-07-11 00:17:13 +00:00
Benjamin Peterson 42e1029564 assume egd unless OPENSSL_NO_EGD is defined—remove configure check (closes #24557) 2016-07-07 00:02:31 -07:00
Benjamin Peterson b3e073cbb3 fix leak of keyfile_bytes 2016-06-08 23:18:51 -07:00
Benjamin Peterson 3b91de5a76 stop leaking certfile_bytes (closes #27267) 2016-06-08 23:16:36 -07:00
Serhiy Storchaka 763a61ca95 Issue #26200: Added Py_SETREF and replaced Py_XSETREF with Py_SETREF
in places where Py_DECREF was used.
2016-04-10 18:05:12 +03:00
Serhiy Storchaka bc62af1bbe Issue #22570: Renamed Py_SETREF to Py_XSETREF. 2016-04-06 09:51:18 +03:00
Martin Panter b8089b4dde Issue #26644: Raise ValueError for negative SSLSocket.recv() and read() 2016-03-27 05:35:19 +00:00
Benjamin Peterson b2e3946d76 open the cert store readonly
Patch from Chi Hsuan Yen.
2016-02-17 22:13:19 -08:00
Serhiy Storchaka 5951f2300f Issue #20440: Massive replacing unsafe attribute setting code with special
macro Py_SETREF.
2015-12-24 10:35:35 +02:00
Benjamin Peterson 93ed946dd9 rm trailing ws 2015-11-14 15:12:38 -08:00
Benjamin Peterson c591936789 fix possible memory lea k in _get_aia_uri (closes #25578) 2015-11-14 15:12:18 -08:00
Benjamin Peterson b1c1e673cb fix build with older openssl (#25569) 2015-11-14 00:09:22 -08:00
Benjamin Peterson 10aaca9941 always set OP_NO_SSLv3 by default (closes #25530) 2015-11-11 22:38:41 -08:00
Benjamin Peterson 59d451d68f fix memory leak in _get_crl_dp (closes #25569)
Patch started by Stéphane Wirtel.
2015-11-11 22:07:38 -08:00
Serhiy Storchaka c72e66a048 Issue #25523: Backported a-to-an corrections. 2015-11-02 15:06:09 +02:00
Benjamin Peterson 65192c1756 improve style of the convert macro (#24655)
Patch by Brian Cain.
2015-07-18 10:59:13 -07:00
Benjamin Peterson 9c5a8d4e23 remove extra arguments in arg parsing format codes (closes #23875) 2015-04-06 13:05:22 -04:00
Benjamin Peterson 72ef961059 expose X509_V_FLAG_TRUSTED_FIRST 2015-03-04 22:49:41 -05:00
Benjamin Peterson b1ebba5bd5 enable X509_V_FLAG_TRUSTED_FIRST when possible (closes #23476) 2015-03-04 22:11:12 -05:00
Antoine Pitrou 34c8d98306 Issue #23576: Avoid stalling in SSL reads when EOF has been reached in the SSL layer but the underlying connection hasn't been closed. 2015-03-04 20:51:55 +01:00
Serhiy Storchaka a2269d074b Issue #23446: Use PyMem_New instead of PyMem_Malloc to avoid possible integer
overflows.  Added few missed PyErr_NoMemory().
2015-02-16 13:16:07 +02:00
Benjamin Peterson a99e48c2b2 ifdef our way to compatibility with old openssl (closes #23335) 2015-01-28 12:06:39 -05:00
Benjamin Peterson f4bb2311b1 disable ALPN on LibreSSL, which has a large version number, but not ALPN support (closes #23329) 2015-01-27 11:10:18 -05:00
Benjamin Peterson aa7075845c prefer server alpn ordering over the client's 2015-01-23 17:30:26 -05:00
Benjamin Peterson b10bfbe036 pep 466 backport of alpn (#20188) 2015-01-23 16:35:37 -05:00
Victor Stinner 7c90667f74 Issue #21356: Make ssl.RAND_egd() optional to support LibreSSL. The
availability of the function is checked during the compilation. Patch written
by Bernard Spil.
2015-01-06 13:53:37 +01:00
Benjamin Peterson 60766c47e7 allow ssl module to compile if openssl doesn't support SSL 3 (closes #22935)
Patch by Kurt Roeckx.
2014-12-05 21:59:35 -05:00
Benjamin Peterson 31aa69ead5 allow hostname to be passed to SSLContext even if OpenSSL doesn't support SNI (closes #22921)
Patch from Donald Stufft.
2014-11-23 20:13:31 -06:00
Benjamin Peterson 93c41335ab allow keyfile argument to be None (closes #22787) 2014-11-03 21:12:05 -05:00
Benjamin Peterson 2f33456e41 fix sslwrap_simple (closes #22523)
Thanks Alex Gaynor.
2014-10-01 23:53:01 -04:00
Alex Gaynor e98205d798 Issue #20421: Add a .version() method to SSL sockets exposing the actual protocol version in use.
Backport from default.
2014-09-04 13:33:22 -07:00
Benjamin Peterson 876473eba3 fix load_verify_locations on unicode paths (closes #22244) 2014-08-28 09:33:21 -04:00
Benjamin Peterson 7ed3e29723 fix error message for invalid curve name 2014-08-20 21:37:01 -05:00
Benjamin Peterson cbb144afc0 PyUnicode -> PyString and PyLong -> PyInt 2014-08-20 14:25:32 -05:00
Benjamin Peterson daeb925cc8 backport many ssl features from Python 3 (closes #21308)
A contribution of Alex Gaynor and David Reid with the generous support of
Rackspace. May God have mercy on their souls.
2014-08-20 14:14:50 -05:00
Antoine Pitrou 3b2afbbf88 Issue #20207: Always disable SSLv2 except when PROTOCOL_SSLv2 is explicitly asked for. 2014-01-09 19:52:12 +01:00
Christian Heimes 41a7d5ee17 Issue #19227 / Issue #18747: Remove pthread_atfork() handler to remove OpenSSL re-seeding
It is causing trouble like e.g. hanging processes.
2013-10-29 20:50:01 +01:00
Antoine Pitrou 87c99a0d37 Properly initialize all fields of a SSL object after allocation. 2013-09-29 19:52:45 +02:00
Christian Heimes 5eb6e3b40d Issue #18709: GCC 4.6 complains that 'v' may be used uninitialized in GEN_EMAIL/GEN_URI/GEN_DNS case 2013-09-05 16:05:50 +02:00
Christian Heimes ed9884b2d0 Issue #18709: GCC 4.6 complains that 'v' may be used uninitialized in GEN_EMAIL/GEN_URI/GEN_DNS case 2013-09-05 16:04:35 +02:00
Christian Heimes 8ee5ffddf5 Issue #18747: Fix spelling errors in my commit message and comments,
thanks to Vajrasky Kok for proof-reading.
2013-08-25 14:19:16 +02:00
Barry Warsaw 82f8828317 - Issue #18709: Fix CVE-2013-4238. The SSL module now handles NULL bytes
inside subjectAltName correctly. Formerly the module has used OpenSSL's
  GENERAL_NAME_print() function to get the string represention of ASN.1
  strings for `rfc822Name` (email), `dNSName` (DNS) and
  `uniformResourceIdentifier` (URI).
2013-08-23 13:26:49 -04:00
Christian Heimes 1d0f73d20f Issue #18747: Use a parent atfork handler instead of a child atfork handler.
fork() is suppose to be async-signal safe but the handler calls unsafe functions. A parent handler mitigates the issue.
2013-08-22 13:19:48 +02:00
Christian Heimes 0d604cf65e Issue #18747: Re-seed OpenSSL's pseudo-random number generator after fork.
A pthread_atfork() child handler is used to seeded the PRNG with pid, time
and some stack data.
2013-08-21 13:26:05 +02:00
Christian Heimes 10107813ac Issue #18777: The ssl module now uses the new CRYPTO_THREADID API of
OpenSSL 1.0.0+ instead of the deprecated CRYPTO id callback function.
2013-08-19 17:36:29 +02:00
Christian Heimes b4ec842f39 Issue 18768: Correct doc string of RAND_edg(). Patch by Vajrasky Kok. 2013-08-17 17:25:18 +02:00
Christian Heimes f1bd47ae14 Issue #18768: coding style nitpick. Thanks to Vajrasky Kok 2013-08-17 17:18:56 +02:00