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
4e54730e
Kaydet (Commit)
4e54730e
authored
Tem 02, 2002
tarafından
Jeremy Hylton
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Repair badly formatted code.
üst
6fc13d95
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
19 deletions
+17
-19
_ssl.c
Modules/_ssl.c
+17
-19
No files found.
Modules/_ssl.c
Dosyayı görüntüle @
4e54730e
...
@@ -87,40 +87,40 @@ PySSL_SetError(PySSLObject *obj, int ret)
...
@@ -87,40 +87,40 @@ PySSL_SetError(PySSLObject *obj, int ret)
switch
(
err
)
{
switch
(
err
)
{
case
SSL_ERROR_ZERO_RETURN
:
case
SSL_ERROR_ZERO_RETURN
:
errstr
=
"TLS/SSL connection has been closed"
;
errstr
=
"TLS/SSL connection has been closed"
;
p
=
PY_SSL_ERROR_ZERO_RETURN
;
p
=
PY_SSL_ERROR_ZERO_RETURN
;
break
;
break
;
case
SSL_ERROR_WANT_READ
:
case
SSL_ERROR_WANT_READ
:
errstr
=
"The operation did not complete (read)"
;
errstr
=
"The operation did not complete (read)"
;
p
=
PY_SSL_ERROR_WANT_READ
;
p
=
PY_SSL_ERROR_WANT_READ
;
break
;
break
;
case
SSL_ERROR_WANT_WRITE
:
case
SSL_ERROR_WANT_WRITE
:
p
=
PY_SSL_ERROR_WANT_WRITE
;
p
=
PY_SSL_ERROR_WANT_WRITE
;
errstr
=
"The operation did not complete (write)"
;
errstr
=
"The operation did not complete (write)"
;
break
;
break
;
case
SSL_ERROR_WANT_X509_LOOKUP
:
case
SSL_ERROR_WANT_X509_LOOKUP
:
p
=
PY_SSL_ERROR_WANT_X509_LOOKUP
;
p
=
PY_SSL_ERROR_WANT_X509_LOOKUP
;
errstr
=
"The operation did not complete (X509 lookup)"
;
errstr
=
"The operation did not complete (X509 lookup)"
;
break
;
break
;
case
SSL_ERROR_WANT_CONNECT
:
case
SSL_ERROR_WANT_CONNECT
:
p
=
PY_SSL_ERROR_WANT_CONNECT
;
p
=
PY_SSL_ERROR_WANT_CONNECT
;
errstr
=
"The operation did not complete (connect)"
;
errstr
=
"The operation did not complete (connect)"
;
break
;
break
;
case
SSL_ERROR_SYSCALL
:
case
SSL_ERROR_SYSCALL
:
{
{
unsigned
long
e
=
ERR_get_error
();
unsigned
long
e
=
ERR_get_error
();
if
(
e
==
0
)
{
if
(
e
==
0
)
{
if
(
ret
==
0
)
{
if
(
ret
==
0
)
{
p
=
PY_SSL_ERROR_EOF
;
p
=
PY_SSL_ERROR_EOF
;
errstr
=
"EOF occurred in violation of protocol"
;
errstr
=
"EOF occurred in violation of protocol"
;
}
else
if
(
ret
==-
1
)
{
}
else
if
(
ret
==
-
1
)
{
/* the underlying BIO reported an I/O error */
/* the underlying BIO reported an I/O error */
return
obj
->
Socket
->
errorhandler
();
return
obj
->
Socket
->
errorhandler
();
}
else
{
/* possible? */
}
else
{
/* possible? */
p
=
PY_SSL_ERROR_SYSCALL
;
p
=
PY_SSL_ERROR_SYSCALL
;
errstr
=
"Some I/O error occurred"
;
errstr
=
"Some I/O error occurred"
;
}
}
}
else
{
}
else
{
p
=
PY_SSL_ERROR_SYSCALL
;
p
=
PY_SSL_ERROR_SYSCALL
;
/* XXX Protected by global interpreter lock */
/* XXX Protected by global interpreter lock */
errstr
=
ERR_error_string
(
e
,
NULL
);
errstr
=
ERR_error_string
(
e
,
NULL
);
}
}
...
@@ -129,17 +129,17 @@ PySSL_SetError(PySSLObject *obj, int ret)
...
@@ -129,17 +129,17 @@ PySSL_SetError(PySSLObject *obj, int ret)
case
SSL_ERROR_SSL
:
case
SSL_ERROR_SSL
:
{
{
unsigned
long
e
=
ERR_get_error
();
unsigned
long
e
=
ERR_get_error
();
p
=
PY_SSL_ERROR_SSL
;
p
=
PY_SSL_ERROR_SSL
;
if
(
e
!=
0
)
{
if
(
e
!=
0
)
/* XXX Protected by global interpreter lock */
/* XXX Protected by global interpreter lock */
errstr
=
ERR_error_string
(
e
,
NULL
);
errstr
=
ERR_error_string
(
e
,
NULL
);
}
else
{
/* possible? */
else
{
/* possible? */
errstr
=
"A failure in the SSL library occurred"
;
errstr
=
"A failure in the SSL library occurred"
;
}
}
break
;
break
;
}
}
default:
default:
p
=
PY_SSL_ERROR_INVALID_ERROR_CODE
;
p
=
PY_SSL_ERROR_INVALID_ERROR_CODE
;
errstr
=
"Invalid error code"
;
errstr
=
"Invalid error code"
;
}
}
n
=
PyInt_FromLong
((
long
)
p
);
n
=
PyInt_FromLong
((
long
)
p
);
...
@@ -162,7 +162,6 @@ PySSL_SetError(PySSLObject *obj, int ret)
...
@@ -162,7 +162,6 @@ PySSL_SetError(PySSLObject *obj, int ret)
return
NULL
;
return
NULL
;
}
}
/* This is a C function to be called for new object initialization */
static
PySSLObject
*
static
PySSLObject
*
newPySSLObject
(
PySocketSockObject
*
Sock
,
char
*
key_file
,
char
*
cert_file
)
newPySSLObject
(
PySocketSockObject
*
Sock
,
char
*
key_file
,
char
*
cert_file
)
{
{
...
@@ -238,7 +237,6 @@ newPySSLObject(PySocketSockObject *Sock, char *key_file, char *cert_file)
...
@@ -238,7 +237,6 @@ newPySSLObject(PySocketSockObject *Sock, char *key_file, char *cert_file)
return
NULL
;
return
NULL
;
}
}
/* This is the Python function called for new object initialization */
static
PyObject
*
static
PyObject
*
PySocket_ssl
(
PyObject
*
self
,
PyObject
*
args
)
PySocket_ssl
(
PyObject
*
self
,
PyObject
*
args
)
{
{
...
...
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