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
de8eca46
Kaydet (Commit)
de8eca46
authored
Mar 05, 2015
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
merge 3.4
üst
b64ae7bf
990fcaac
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
5 deletions
+18
-5
ssl.rst
Doc/library/ssl.rst
+11
-3
test_ssl.py
Lib/test/test_ssl.py
+3
-2
_ssl.c
Modules/_ssl.c
+4
-0
No files found.
Doc/library/ssl.rst
Dosyayı görüntüle @
de8eca46
...
@@ -520,9 +520,9 @@ Constants
...
@@ -520,9 +520,9 @@ Constants
.. data:: VERIFY_DEFAULT
.. data:: VERIFY_DEFAULT
Possible value for :attr:`SSLContext.verify_flags`. In this mode,
Possible value for :attr:`SSLContext.verify_flags`. In this mode,
certificate
certificate revocation lists (CRLs) are not checked. By default OpenSSL
revocation lists (CRLs) are not checked. By default OpenSSL does neither
does neither
require nor verify CRLs.
require nor verify CRLs.
.. versionadded:: 3.4
.. versionadded:: 3.4
...
@@ -550,6 +550,14 @@ Constants
...
@@ -550,6 +550,14 @@ Constants
.. versionadded:: 3.4
.. versionadded:: 3.4
.. data:: VERIFY_X509_TRUSTED_FIRST
Possible value for :attr:`SSLContext.verify_flags`. It instructs OpenSSL to
prefer trusted certificates when building the trust chain to validate a
certificate. This flag is enabled by default.
.. versionadded:: 3.4.5
.. data:: PROTOCOL_SSLv23
.. data:: PROTOCOL_SSLv23
Selects the highest protocol version that both the client and server support.
Selects the highest protocol version that both the client and server support.
...
...
Lib/test/test_ssl.py
Dosyayı görüntüle @
de8eca46
...
@@ -818,8 +818,9 @@ class ContextTests(unittest.TestCase):
...
@@ -818,8 +818,9 @@ class ContextTests(unittest.TestCase):
"verify_flags need OpenSSL > 0.9.8"
)
"verify_flags need OpenSSL > 0.9.8"
)
def
test_verify_flags
(
self
):
def
test_verify_flags
(
self
):
ctx
=
ssl
.
SSLContext
(
ssl
.
PROTOCOL_TLSv1
)
ctx
=
ssl
.
SSLContext
(
ssl
.
PROTOCOL_TLSv1
)
# default value by OpenSSL
# default value
self
.
assertEqual
(
ctx
.
verify_flags
,
ssl
.
VERIFY_DEFAULT
)
tf
=
getattr
(
ssl
,
"VERIFY_X509_TRUSTED_FIRST"
,
0
)
self
.
assertEqual
(
ctx
.
verify_flags
,
ssl
.
VERIFY_DEFAULT
|
tf
)
ctx
.
verify_flags
=
ssl
.
VERIFY_CRL_CHECK_LEAF
ctx
.
verify_flags
=
ssl
.
VERIFY_CRL_CHECK_LEAF
self
.
assertEqual
(
ctx
.
verify_flags
,
ssl
.
VERIFY_CRL_CHECK_LEAF
)
self
.
assertEqual
(
ctx
.
verify_flags
,
ssl
.
VERIFY_CRL_CHECK_LEAF
)
ctx
.
verify_flags
=
ssl
.
VERIFY_CRL_CHECK_CHAIN
ctx
.
verify_flags
=
ssl
.
VERIFY_CRL_CHECK_CHAIN
...
...
Modules/_ssl.c
Dosyayı görüntüle @
de8eca46
...
@@ -4458,6 +4458,10 @@ PyInit__ssl(void)
...
@@ -4458,6 +4458,10 @@ PyInit__ssl(void)
X509_V_FLAG_CRL_CHECK
|
X509_V_FLAG_CRL_CHECK_ALL
);
X509_V_FLAG_CRL_CHECK
|
X509_V_FLAG_CRL_CHECK_ALL
);
PyModule_AddIntConstant
(
m
,
"VERIFY_X509_STRICT"
,
PyModule_AddIntConstant
(
m
,
"VERIFY_X509_STRICT"
,
X509_V_FLAG_X509_STRICT
);
X509_V_FLAG_X509_STRICT
);
#ifdef X509_V_FLAG_TRUSTED_FIRST
PyModule_AddIntConstant
(
m
,
"VERIFY_X509_TRUSTED_FIRST"
,
X509_V_FLAG_TRUSTED_FIRST
);
#endif
/* Alert Descriptions from ssl.h */
/* Alert Descriptions from ssl.h */
/* note RESERVED constants no longer intended for use have been removed */
/* note RESERVED constants no longer intended for use have been removed */
...
...
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