try to detect if ssl will not work before accepting ssl connections

Этот коммит содержится в:
ps 2011-10-03 20:31:47 +00:00
родитель 07eaaab646
Коммит a34bd2ac7b
2 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -169,6 +169,9 @@ void Socket::prepareSSL(bool server)
if(1!=SSL_set_fd(ssl,fd))
throw Exception(_("Error setting FD"),__FILE__,__LINE__);
if(0==RAND_status())
throw Exception(_("PRNG has not enough data. Are you missing /dev/[u]random?"),__FILE__,__LINE__);
}
/**

Просмотреть файл

@ -40,6 +40,7 @@
#include <errno.h>
#ifdef HAVE_SSL
#include <openssl/ssl.h>
#include <openssl/rand.h>
#endif //HAVE_SSL
//this is a bit of a hack