Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1ccfa90

Browse files
committed
Return a boolean for status
1 parent e118862 commit 1ccfa90

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Modules/_ssl.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -616,15 +616,15 @@ bound on the entropy contained in string.");
616616
static PyObject *
617617
PySSL_RAND_status(PyObject *self)
618618
{
619-
return PyInt_FromLong(RAND_status());
619+
return PyBool_FromLong(RAND_status());
620620
}
621621

622622
PyDoc_STRVAR(PySSL_RAND_status_doc,
623623
"RAND_status() -> 0 or 1\n\
624624
\n\
625-
Returns 1 if the OpenSSL PRNG has been seeded with enough data and 0 if not.\n\
626-
It is necessary to seed the PRNG with RAND_add() on some platforms before\n\
627-
using the ssl() function.");
625+
Returns True if the OpenSSL PRNG has been seeded with enough data and\n\
626+
False if not. It is necessary to seed the PRNG with RAND_add()\n\
627+
on some platforms before using the ssl() function.");
628628

629629
static PyObject *
630630
PySSL_RAND_egd(PyObject *self, PyObject *arg)

0 commit comments

Comments
 (0)