@@ -3301,6 +3301,11 @@ Returns 1 if the OpenSSL PRNG has been seeded with enough data and 0 if not.\n\
33013301It is necessary to seed the PRNG with RAND_add() on some platforms before\n\
33023302using the ssl() function." );
33033303
3304+ #endif /* HAVE_OPENSSL_RAND */
3305+
3306+
3307+ #ifdef HAVE_RAND_EGD
3308+
33043309static PyObject *
33053310PySSL_RAND_egd (PyObject * self , PyObject * arg )
33063311{
@@ -3327,7 +3332,7 @@ Queries the entropy gather daemon (EGD) on the socket named by 'path'.\n\
33273332Returns number of bytes read. Raises SSLError if connection to EGD\n\
33283333fails or if it does not provide enough data to seed PRNG." );
33293334
3330- #endif /* HAVE_OPENSSL_RAND */
3335+ #endif /* HAVE_RAND_EGD */
33313336
33323337
33333338PyDoc_STRVAR (PySSL_get_default_verify_paths_doc ,
@@ -3720,10 +3725,12 @@ static PyMethodDef PySSL_methods[] = {
37203725#ifdef HAVE_OPENSSL_RAND
37213726 {"RAND_add" , PySSL_RAND_add , METH_VARARGS ,
37223727 PySSL_RAND_add_doc },
3723- {"RAND_egd" , PySSL_RAND_egd , METH_VARARGS ,
3724- PySSL_RAND_egd_doc },
37253728 {"RAND_status" , (PyCFunction )PySSL_RAND_status , METH_NOARGS ,
37263729 PySSL_RAND_status_doc },
3730+ #endif
3731+ #ifdef HAVE_RAND_EGD
3732+ {"RAND_egd" , PySSL_RAND_egd , METH_VARARGS ,
3733+ PySSL_RAND_egd_doc },
37273734#endif
37283735 {"get_default_verify_paths" , (PyCFunction )PySSL_get_default_verify_paths ,
37293736 METH_NOARGS , PySSL_get_default_verify_paths_doc },
0 commit comments