Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 566068 | Differences between
and this patch

Collapse All | Expand All

(-)a/src/network/ssl/ssl.c (-10 / +2 lines)
Lines 80-94 init_openssl(struct module *module) Link Here
80
{
80
{
81
	unsigned char f_randfile[PATH_MAX];
81
	unsigned char f_randfile[PATH_MAX];
82
82
83
	/* In a nutshell, on OS's without a /dev/urandom, the OpenSSL library
83
	if (RAND_load_file(f_randfile, -1))
84
	 * cannot initialize the PRNG and so every attempt to use SSL fails.
84
		RAND_write_file(f_randfile);
85
	 * It's actually an OpenSSL FAQ, and according to them, it's up to the
86
	 * application coders to seed the RNG. -- William Yodlowsky */
87
	if (RAND_egd(RAND_file_name(f_randfile, sizeof(f_randfile))) < 0) {
88
		/* Not an EGD, so read and write to it */
89
		if (RAND_load_file(f_randfile, -1))
90
			RAND_write_file(f_randfile);
91
	}
92
85
93
	SSLeay_add_ssl_algorithms();
86
	SSLeay_add_ssl_algorithms();
94
	context = SSL_CTX_new(SSLv23_client_method());
87
	context = SSL_CTX_new(SSLv23_client_method());
95
- 

Return to bug 566068