Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
3b1a8b3b
Kaydet (Commit)
3b1a8b3b
authored
Ock 08, 2016
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
enable SSL_MODE_RELEASE_BUFFERS
Patch by Cory Benfield.
üst
03abf6dd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
NEWS
Misc/NEWS
+3
-0
_ssl.c
Modules/_ssl.c
+17
-0
No files found.
Misc/NEWS
Dosyayı görüntüle @
3b1a8b3b
...
...
@@ -41,6 +41,9 @@ Core and Builtins
Library
-------
- Issue #25672: In the ssl module, enable the SSL_MODE_RELEASE_BUFFERS mode
option if it is safe to do so.
- Issue #22570: Add '
path
' attribute to pathlib.Path objects,
returning the same as str(), to make it more similar to DirEntry.
Library code can now write getattr(p, '
path
', p) to get the path as
...
...
Modules/_ssl.c
Dosyayı görüntüle @
3b1a8b3b
...
...
@@ -2219,6 +2219,7 @@ _ssl__SSLContext_impl(PyTypeObject *type, int proto_version)
PySSLContext
*
self
;
long
options
;
SSL_CTX
*
ctx
=
NULL
;
unsigned
long
libver
;
PySSL_BEGIN_ALLOW_THREADS
if
(
proto_version
==
PY_SSL_VERSION_TLS1
)
...
...
@@ -2281,6 +2282,22 @@ _ssl__SSLContext_impl(PyTypeObject *type, int proto_version)
options
|=
SSL_OP_NO_SSLv3
;
SSL_CTX_set_options
(
self
->
ctx
,
options
);
#if defined(SSL_MODE_RELEASE_BUFFERS)
/* Set SSL_MODE_RELEASE_BUFFERS. This potentially greatly reduces memory
usage for no cost at all. However, don't do this for OpenSSL versions
between 1.0.1 and 1.0.1h or 1.0.0 and 1.0.0m, which are affected by CVE
2014-0198. I can't find exactly which beta fixed this CVE, so be
conservative and assume it wasn't fixed until release. We do this check
at runtime to avoid problems from the dynamic linker.
See #25672 for more on this. */
libver
=
SSLeay
();
if
(
!
(
libver
>=
0x10001000UL
&&
libver
<
0x1000108fUL
)
&&
!
(
libver
>=
0x10000000UL
&&
libver
<
0x100000dfUL
))
{
SSL_CTX_set_mode
(
self
->
ctx
,
SSL_MODE_RELEASE_BUFFERS
);
}
#endif
#ifndef OPENSSL_NO_ECDH
/* Allow automatic ECDH curve selection (on OpenSSL 1.0.2+), or use
prime256v1 by default. This is Apache mod_ssl's initialization
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment