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
f4c7badc
Kaydet (Commit)
f4c7badc
authored
Agu 15, 2010
tarafından
Antoine Pitrou
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Put test_ciphers in NetworkedTests
üst
968dc03f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
16 deletions
+14
-16
test_ssl.py
Lib/test/test_ssl.py
+14
-16
No files found.
Lib/test/test_ssl.py
Dosyayı görüntüle @
f4c7badc
...
...
@@ -153,22 +153,6 @@ class BasicSocketTests(unittest.TestCase):
self
.
assertTrue
(
s
.
startswith
(
"OpenSSL {:d}.{:d}.{:d}"
.
format
(
major
,
minor
,
fix
)),
(
s
,
t
))
def
test_ciphers
(
self
):
if
not
support
.
is_resource_enabled
(
'network'
):
return
remote
=
(
"svn.python.org"
,
443
)
s
=
ssl
.
wrap_socket
(
socket
.
socket
(
socket
.
AF_INET
),
cert_reqs
=
ssl
.
CERT_NONE
,
ciphers
=
"ALL"
)
s
.
connect
(
remote
)
s
=
ssl
.
wrap_socket
(
socket
.
socket
(
socket
.
AF_INET
),
cert_reqs
=
ssl
.
CERT_NONE
,
ciphers
=
"DEFAULT"
)
s
.
connect
(
remote
)
# Error checking can happen at instantiation or when connecting
with
self
.
assertRaisesRegexp
(
ssl
.
SSLError
,
"No cipher can be selected"
):
s
=
ssl
.
wrap_socket
(
socket
.
socket
(
socket
.
AF_INET
),
cert_reqs
=
ssl
.
CERT_NONE
,
ciphers
=
"^$:,;?*'dorothyx"
)
s
.
connect
(
remote
)
@support.cpython_only
def
test_refcycle
(
self
):
# Issue #7943: an SSL object doesn't create reference cycles with
...
...
@@ -444,6 +428,20 @@ class NetworkedTests(unittest.TestCase):
if
support
.
verbose
:
sys
.
stdout
.
write
(
"
\n
Verified certificate for svn.python.org:443 is
\n
%
s
\n
"
%
pem
)
def
test_ciphers
(
self
):
remote
=
(
"svn.python.org"
,
443
)
s
=
ssl
.
wrap_socket
(
socket
.
socket
(
socket
.
AF_INET
),
cert_reqs
=
ssl
.
CERT_NONE
,
ciphers
=
"ALL"
)
s
.
connect
(
remote
)
s
=
ssl
.
wrap_socket
(
socket
.
socket
(
socket
.
AF_INET
),
cert_reqs
=
ssl
.
CERT_NONE
,
ciphers
=
"DEFAULT"
)
s
.
connect
(
remote
)
# Error checking can happen at instantiation or when connecting
with
self
.
assertRaisesRegexp
(
ssl
.
SSLError
,
"No cipher can be selected"
):
s
=
ssl
.
wrap_socket
(
socket
.
socket
(
socket
.
AF_INET
),
cert_reqs
=
ssl
.
CERT_NONE
,
ciphers
=
"^$:,;?*'dorothyx"
)
s
.
connect
(
remote
)
def
test_algorithms
(
self
):
# Issue #8484: all algorithms should be available when verifying a
# certificate.
...
...
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