mirror of https://github.com/python/cpython
gh-101732: Modules/_ssl.c: use Y2038 compatible openssl function when available (GH-118425)
This commit is contained in:
parent
ca269e58c2
commit
37ccf16786
|
@ -0,0 +1 @@
|
|||
Use a Y2038 compatible openssl time function when available.
|
|
@ -5329,7 +5329,11 @@ PySSLSession_clear(PySSLSession *self)
|
|||
|
||||
static PyObject *
|
||||
PySSLSession_get_time(PySSLSession *self, void *closure) {
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x30300000L
|
||||
return _PyLong_FromTime_t(SSL_SESSION_get_time_ex(self->session));
|
||||
#else
|
||||
return PyLong_FromLong(SSL_SESSION_get_time(self->session));
|
||||
#endif
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(PySSLSession_get_time_doc,
|
||||
|
|
Loading…
Reference in New Issue