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
fa2b9380
Kaydet (Commit)
fa2b9380
authored
Nis 26, 2010
tarafından
Antoine Pitrou
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Hopefully fix sporadic Windows issue by avoiding calling getpeername()
on a freshly dup'ed socket.
üst
de8cf32e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
12 deletions
+15
-12
ssl.py
Lib/ssl.py
+15
-12
No files found.
Lib/ssl.py
Dosyayı görüntüle @
fa2b9380
...
...
@@ -83,6 +83,7 @@ from socket import socket, AF_INET, SOCK_STREAM
import
base64
# for DER-to-PEM translation
import
traceback
import
errno
import
time
class
SSLSocket
(
socket
):
...
...
@@ -97,6 +98,7 @@ class SSLSocket(socket):
family
=
AF_INET
,
type
=
SOCK_STREAM
,
proto
=
0
,
fileno
=
None
,
suppress_ragged_eofs
=
True
,
ciphers
=
None
):
connected
=
False
if
sock
is
not
None
:
socket
.
__init__
(
self
,
family
=
sock
.
family
,
...
...
@@ -104,26 +106,27 @@ class SSLSocket(socket):
proto
=
sock
.
proto
,
fileno
=
_dup
(
sock
.
fileno
()))
self
.
settimeout
(
sock
.
gettimeout
())
# see if it's connected
try
:
sock
.
getpeername
()
except
socket_error
as
e
:
if
e
.
errno
!=
errno
.
ENOTCONN
:
raise
else
:
connected
=
True
sock
.
close
()
elif
fileno
is
not
None
:
socket
.
__init__
(
self
,
fileno
=
fileno
)
else
:
socket
.
__init__
(
self
,
family
=
family
,
type
=
type
,
proto
=
proto
)
self
.
_closed
=
False
if
certfile
and
not
keyfile
:
keyfile
=
certfile
# see if it's connected
try
:
socket
.
getpeername
(
self
)
except
socket_error
as
e
:
if
e
.
errno
!=
errno
.
ENOTCONN
:
raise
# no, no connection yet
self
.
_sslobj
=
None
else
:
# yes, create the SSL object
self
.
_closed
=
False
self
.
_sslobj
=
None
if
connected
:
# create the SSL object
try
:
self
.
_sslobj
=
_ssl
.
sslwrap
(
self
,
server_side
,
keyfile
,
certfile
,
...
...
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