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
05649f39
Kaydet (Commit)
05649f39
authored
Nis 17, 2014
tarafından
Antoine Pitrou
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Use ssl.create_default_context in Lib/test/ssl_servers.py
üst
8bdeb167
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
ssl_servers.py
Lib/test/ssl_servers.py
+2
-2
No files found.
Lib/test/ssl_servers.py
Dosyayı görüntüle @
05649f39
...
...
@@ -150,7 +150,7 @@ class HTTPSServerThread(threading.Thread):
def
make_https_server
(
case
,
*
,
context
=
None
,
certfile
=
CERTFILE
,
host
=
HOST
,
handler_class
=
None
):
if
context
is
None
:
context
=
ssl
.
SSLContext
(
ssl
.
PROTOCOL_SSLv23
)
context
=
ssl
.
create_default_context
(
ssl
.
Purpose
.
CLIENT_AUTH
)
# We assume the certfile contains both private key and certificate
context
.
load_cert_chain
(
certfile
)
server
=
HTTPSServerThread
(
context
,
host
,
handler_class
)
...
...
@@ -192,7 +192,7 @@ if __name__ == "__main__":
else
:
handler_class
=
RootedHTTPRequestHandler
handler_class
.
root
=
os
.
getcwd
()
context
=
ssl
.
SSLContext
(
ssl
.
PROTOCOL_TLSv1
)
context
=
ssl
.
create_default_context
(
ssl
.
Purpose
.
CLIENT_AUTH
)
context
.
load_cert_chain
(
CERTFILE
)
if
args
.
curve_name
:
context
.
set_ecdh_curve
(
args
.
curve_name
)
...
...
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