Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
docker-py
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
docker-py
Commits
bab7ca3c
Kaydet (Commit)
bab7ca3c
authored
Ock 24, 2018
tarafından
Joffrey F
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Don't use PROTOCOL_TLSv1_2 directly to avoid ImportErrors
Signed-off-by:
Joffrey F
<
joffrey@docker.com
>
üst
500286d5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
15 deletions
+8
-15
tls.py
docker/tls.py
+8
-15
No files found.
docker/tls.py
Dosyayı görüntüle @
bab7ca3c
...
@@ -51,22 +51,15 @@ class TLSConfig(object):
...
@@ -51,22 +51,15 @@ class TLSConfig(object):
# majority of users with reasonably up-to-date software. However,
# majority of users with reasonably up-to-date software. However,
# before doing so, detect openssl version to ensure we can support
# before doing so, detect openssl version to ensure we can support
# it.
# it.
if
ssl
.
OPENSSL_VERSION_INFO
[:
3
]
>=
(
1
,
0
,
1
)
and
hasattr
(
# ssl.OPENSSL_VERSION_INFO returns a tuple of 5 integers
ssl
,
'PROTOCOL_TLSv1_2'
):
# representing version info. We want any OpenSSL version greater
# If the OpenSSL version is high enough to support TLSv1_2,
# than 1.0.1. Python compares tuples lexigraphically, which means
# then we should use it.
# this comparison will work.
self
.
ssl_version
=
getattr
(
ssl
,
'PROTOCOL_TLSv1_2'
)
if
ssl
.
OPENSSL_VERSION_INFO
>
(
1
,
0
,
1
,
0
,
0
):
# If this version is high enough to support TLSv1_2, then we
# should use it.
self
.
ssl_version
=
ssl
.
PROTOCOL_TLSv1_2
else
:
else
:
# If we can't, use a differnent default. Before the commit
# Otherwise, TLS v1.0 seems to be the safest default;
# introducing this version detection, the comment read:
# SSLv23 fails in mysterious ways:
# >>> TLS v1.0 seems to be the safest default; SSLv23 fails in
# https://github.com/docker/docker-py/issues/963
# >>> mysterious ways:
# >>> https://github.com/docker/docker-py/issues/963
# Which is why we choose PROTOCOL_TLSv1
self
.
ssl_version
=
ssl
.
PROTOCOL_TLSv1
self
.
ssl_version
=
ssl
.
PROTOCOL_TLSv1
# "tls" and "tls_verify" must have both or neither cert/key files In
# "tls" and "tls_verify" must have both or neither cert/key files In
...
...
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