39 lines
1.5 KiB
Diff
39 lines
1.5 KiB
Diff
|
diff -Naur orig/Lib/socket.py new/Lib/socket.py
|
||
|
--- orig/Lib/socket.py 2020-06-05 12:15:04.319230006 +0300
|
||
|
+++ new/Lib/socket.py 2020-06-05 12:18:12.119281243 +0300
|
||
|
@@ -75,7 +75,6 @@
|
||
|
SSL_ERROR_SYSCALL, \
|
||
|
SSL_ERROR_SSL, \
|
||
|
SSL_ERROR_WANT_CONNECT, \
|
||
|
- SSL_ERROR_EOF, \
|
||
|
SSL_ERROR_INVALID_ERROR_CODE
|
||
|
try:
|
||
|
from _ssl import RAND_egd
|
||
|
diff -Naur orig/Modules/_ssl.c new/Modules/_ssl.c
|
||
|
--- orig/Modules/_ssl.c 2020-06-05 11:47:27.787530350 +0300
|
||
|
+++ new/Modules/_ssl.c 2020-06-05 11:48:58.249479726 +0300
|
||
|
@@ -513,7 +513,7 @@
|
||
|
if (e == 0) {
|
||
|
PySocketSockObject *s = obj->Socket;
|
||
|
if (ret == 0) {
|
||
|
- p = PY_SSL_ERROR_EOF;
|
||
|
+ p = PY_SSL_ERROR_SSL;
|
||
|
type = PySSLEOFErrorObject;
|
||
|
errstr = "EOF occurred in violation of protocol";
|
||
|
} else if (ret == -1) {
|
||
|
@@ -541,12 +541,12 @@
|
||
|
errstr = "A failure in the SSL library occurred";
|
||
|
}
|
||
|
if (ERR_GET_LIB(e) == ERR_LIB_SSL &&
|
||
|
- ERR_GET_REASON(e) == SSL_R_UNEXPECTED_EOF_WHILE_READING) {
|
||
|
+ ERR_GET_REASON(e) == SSL_R_UNEXPECTED_END_OF_EARLY_DATA) {
|
||
|
type = PySSLEOFErrorObject;
|
||
|
}
|
||
|
if (ERR_GET_LIB(e) == ERR_LIB_SSL &&
|
||
|
ERR_GET_REASON(e) == SSL_R_CERTIFICATE_VERIFY_FAILED) {
|
||
|
- type = PySSLCertVerificationErrorObject;
|
||
|
+ type = PySSLZeroReturnErrorObject;
|
||
|
}
|
||
|
break;
|
||
|
}
|