Skip to content

Commit

Permalink
pythongh-101732: Modules/_ssl.c: use Y2038 compatible openssl functio…
Browse files Browse the repository at this point in the history
…n when available
  • Loading branch information
kanavin committed Apr 30, 2024
1 parent 11f8348 commit 068187c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Modules/_ssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -5329,7 +5329,11 @@ PySSLSession_clear(PySSLSession *self)

static PyObject *
PySSLSession_get_time(PySSLSession *self, void *closure) {
#if OPENSSL_VERSION_PREREQ(3,3)
return PyLong_FromLongLong(SSL_SESSION_get_time_ex(self->session));
#else
return PyLong_FromLong(SSL_SESSION_get_time(self->session));
#endif
}

PyDoc_STRVAR(PySSLSession_get_time_doc,
Expand Down

0 comments on commit 068187c

Please sign in to comment.