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
eb257ac9
Kaydet (Commit)
eb257ac9
authored
Eyl 29, 2008
tarafından
Bill Janssen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fix for release blocker 3910, 2.6 regression in socket.ssl method
üst
93502346
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
3 deletions
+28
-3
ssl.py
Lib/ssl.py
+13
-2
test_ssl.py
Lib/test/test_ssl.py
+15
-1
No files found.
Lib/ssl.py
Dosyayı görüntüle @
eb257ac9
...
@@ -434,7 +434,18 @@ def sslwrap_simple (sock, keyfile=None, certfile=None):
...
@@ -434,7 +434,18 @@ def sslwrap_simple (sock, keyfile=None, certfile=None):
for compability with Python 2.5 and earlier. Will disappear in
for compability with Python 2.5 and earlier. Will disappear in
Python 3.0."""
Python 3.0."""
ssl_sock
=
_ssl
.
sslwrap
(
sock
.
_sock
,
0
,
keyfile
,
certfile
,
CERT_NONE
,
if
hasattr
(
sock
,
"_sock"
):
sock
=
sock
.
_sock
ssl_sock
=
_ssl
.
sslwrap
(
sock
,
0
,
keyfile
,
certfile
,
CERT_NONE
,
PROTOCOL_SSLv23
,
None
)
PROTOCOL_SSLv23
,
None
)
ssl_sock
.
do_handshake
()
try
:
sock
.
getpeername
()
except
:
# no, no connection yet
pass
else
:
# yes, do the handshake
ssl_sock
.
do_handshake
()
return
ssl_sock
return
ssl_sock
Lib/test/test_ssl.py
Dosyayı görüntüle @
eb257ac9
...
@@ -34,6 +34,21 @@ def handle_error(prefix):
...
@@ -34,6 +34,21 @@ def handle_error(prefix):
if
test_support
.
verbose
:
if
test_support
.
verbose
:
sys
.
stdout
.
write
(
prefix
+
exc_format
)
sys
.
stdout
.
write
(
prefix
+
exc_format
)
def
testSimpleSSLwrap
(
self
):
try
:
ssl
.
sslwrap_simple
(
socket
.
socket
(
socket
.
AF_INET
))
except
IOError
,
e
:
if
e
.
errno
==
32
:
# broken pipe when ssl_sock.do_handshake(), this test doesn't care about that
pass
else
:
raise
try
:
ssl
.
sslwrap_simple
(
socket
.
socket
(
socket
.
AF_INET
)
.
_sock
)
except
IOError
,
e
:
if
e
.
errno
==
32
:
# broken pipe when ssl_sock.do_handshake(), this test doesn't care about that
pass
else
:
raise
class
BasicTests
(
unittest
.
TestCase
):
class
BasicTests
(
unittest
.
TestCase
):
...
@@ -58,7 +73,6 @@ class BasicTests(unittest.TestCase):
...
@@ -58,7 +73,6 @@ class BasicTests(unittest.TestCase):
finally
:
finally
:
s
.
close
()
s
.
close
()
def
testCrucialConstants
(
self
):
def
testCrucialConstants
(
self
):
ssl
.
PROTOCOL_SSLv2
ssl
.
PROTOCOL_SSLv2
ssl
.
PROTOCOL_SSLv23
ssl
.
PROTOCOL_SSLv23
...
...
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