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
86429bd1
Kaydet (Commit)
86429bd1
authored
Kas 12, 2015
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
merge 3.5 (#25569)
üst
a99ab63d
eda06c8f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
28 deletions
+26
-28
NEWS
Misc/NEWS
+2
-0
_ssl.c
Modules/_ssl.c
+24
-28
No files found.
Misc/NEWS
Dosyayı görüntüle @
86429bd1
...
@@ -229,6 +229,8 @@ Library
...
@@ -229,6 +229,8 @@ Library
- Issue #24881: Fixed setting binary mode in Python implementation of FileIO
- Issue #24881: Fixed setting binary mode in Python implementation of FileIO
on Windows and Cygwin. Patch from Akira Li.
on Windows and Cygwin. Patch from Akira Li.
- Issue #25569: Fix memory leak in SSLSocket.getpeercert().
- Issue #25471: Sockets returned from accept() shouldn'
t
appear
to
be
- Issue #25471: Sockets returned from accept() shouldn'
t
appear
to
be
nonblocking
.
nonblocking
.
...
...
Modules/_ssl.c
Dosyayı görüntüle @
86429bd1
...
@@ -1067,25 +1067,23 @@ _get_aia_uri(X509 *certificate, int nid) {
...
@@ -1067,25 +1067,23 @@ _get_aia_uri(X509 *certificate, int nid) {
static
PyObject
*
static
PyObject
*
_get_crl_dp
(
X509
*
certificate
)
{
_get_crl_dp
(
X509
*
certificate
)
{
STACK_OF
(
DIST_POINT
)
*
dps
;
STACK_OF
(
DIST_POINT
)
*
dps
;
int
i
,
j
,
result
;
int
i
,
j
;
PyObject
*
lst
;
PyObject
*
lst
,
*
res
=
NULL
;
#if OPENSSL_VERSION_NUMBER < 0x10001000L
#if OPENSSL_VERSION_NUMBER < 0x10001000L
dps
=
X509_get_ext_d2i
(
certificate
,
NID_crl_distribution_points
,
dps
=
X509_get_ext_d2i
(
certificate
,
NID_crl_distribution_points
,
NULL
,
NULL
);
NULL
,
NULL
);
#else
#else
/* Calls x509v3_cache_extensions and sets up crldp */
/* Calls x509v3_cache_extensions and sets up crldp */
X509_check_ca
(
certificate
);
X509_check_ca
(
certificate
);
dps
=
certificate
->
crldp
;
dps
=
certificate
->
crldp
;
#endif
#endif
if
(
dps
==
NULL
)
{
if
(
dps
==
NULL
)
return
Py_None
;
return
Py_None
;
}
if
((
lst
=
PyList_New
(
0
))
==
NULL
)
{
lst
=
PyList_New
(
0
);
return
NULL
;
if
(
lst
==
NULL
)
}
goto
done
;
for
(
i
=
0
;
i
<
sk_DIST_POINT_num
(
dps
);
i
++
)
{
for
(
i
=
0
;
i
<
sk_DIST_POINT_num
(
dps
);
i
++
)
{
DIST_POINT
*
dp
;
DIST_POINT
*
dp
;
...
@@ -1098,6 +1096,7 @@ _get_crl_dp(X509 *certificate) {
...
@@ -1098,6 +1096,7 @@ _get_crl_dp(X509 *certificate) {
GENERAL_NAME
*
gn
;
GENERAL_NAME
*
gn
;
ASN1_IA5STRING
*
uri
;
ASN1_IA5STRING
*
uri
;
PyObject
*
ouri
;
PyObject
*
ouri
;
int
err
;
gn
=
sk_GENERAL_NAME_value
(
gns
,
j
);
gn
=
sk_GENERAL_NAME_value
(
gns
,
j
);
if
(
gn
->
type
!=
GEN_URI
)
{
if
(
gn
->
type
!=
GEN_URI
)
{
...
@@ -1106,28 +1105,25 @@ _get_crl_dp(X509 *certificate) {
...
@@ -1106,28 +1105,25 @@ _get_crl_dp(X509 *certificate) {
uri
=
gn
->
d
.
uniformResourceIdentifier
;
uri
=
gn
->
d
.
uniformResourceIdentifier
;
ouri
=
PyUnicode_FromStringAndSize
((
char
*
)
uri
->
data
,
ouri
=
PyUnicode_FromStringAndSize
((
char
*
)
uri
->
data
,
uri
->
length
);
uri
->
length
);
if
(
ouri
==
NULL
)
{
if
(
ouri
==
NULL
)
Py_DECREF
(
lst
);
goto
done
;
return
NULL
;
}
err
=
PyList_Append
(
lst
,
ouri
);
result
=
PyList_Append
(
lst
,
ouri
);
Py_DECREF
(
ouri
);
Py_DECREF
(
ouri
);
if
(
result
<
0
)
{
if
(
err
<
0
)
Py_DECREF
(
lst
);
goto
done
;
return
NULL
;
}
}
}
}
}
/* convert to tuple or None */
if
(
PyList_Size
(
lst
)
==
0
)
{
/* Convert to tuple. */
Py_DECREF
(
lst
)
;
res
=
(
PyList_GET_SIZE
(
lst
)
>
0
)
?
PyList_AsTuple
(
lst
)
:
Py_None
;
return
Py_None
;
}
else
{
done:
PyObject
*
tup
;
Py_XDECREF
(
lst
)
;
tup
=
PyList_AsTuple
(
lst
);
#if OPENSSL_VERSION_NUMBER < 0x10001000L
Py_DECREF
(
lst
);
sk_DIST_POINT_free
(
dsp
);
return
tup
;
#endif
}
return
res
;
}
}
static
PyObject
*
static
PyObject
*
...
...
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