Bug#285371: Still a problem.
Andreas Metzler
Andreas Metzler <ametzler@downhill.at.eu.org>, 285371@bugs.debian.org
Tue, 14 Dec 2004 11:36:27 +0100
--qMm9M+Fa2AknHoGS
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On 2004-12-14 "Yazz D. Atlas" <yazz@230volts.net> wrote:
> Well I did the exim4 -bd -d and here is the out put where I see it
> failing ...
> # exim4 -bd -d
[...]
> 20230 SMTP<< STARTTLS
> 20230 initializing GnuTLS as a server
> 20230 generating 512 bit RSA key...
> That is it. Just hangs there with no output.
[...]
> [pid 20347] write(2, "20347 generating 512 bit RSA key"..., 36) = 36
> [pid 20347] getpid() = 20347
> [pid 20347] access("/dev/random", R_OK) = 0
> [pid 20347] access("/dev/urandom", R_OK) = 0
> [pid 20347] open("/dev/random", O_RDONLY) = 3
> [pid 20347] select(4, [3], NULL, NULL, {3, 0}) = 0 (Timeout)
> [pid 20347] select(4, [3], NULL, NULL, {3, 0}) = 0 (Timeout)
> [pid 20347] select(4, [3], NULL, NULL, {3, 0}) = 0 (Timeout)
> [pid 20347] select(4, [3], NULL, NULL, {3, 0}) = 0 (Timeout)
> [pid 20347] select(4, [3], NULL, NULL, {3, 0}) = 0 (Timeout)
> And that just keeps on going like that... Exim never does generate the
> correct /var/spool/exim4/gnutls-params file for me.
[...]
Thanks, that confirms my suspicion, gnutls_rsa_params_init cannot get
enough data from /dev/random, attached demo-program will behave the
same.
cu andreas
--
"See, I told you they'd listen to Reason," [SPOILER] Svfurlr fnlf,
fuhggvat qbja gur juveyvat tha.
Neal Stephenson in "Snow Crash"
--qMm9M+Fa2AknHoGS
Content-Type: text/x-csrc; charset=us-ascii
Content-Disposition: attachment; filename="demo.c"
/* demo for gnutls_rsa_params_generate2 */
/* int gnutls_rsa_params_generate2(gnutls_rsa_params params, int bits); */
#define RSA_BITS 512
#include <gnutls/gnutls.h>
#include <stdio.h>
int main()
{
gnutls_rsa_params rsa_params = NULL;
int ret;
ret=gnutls_global_init();
if (ret < 0) {
printf("gnutls_global_init failed [%s]\n",
gnutls_strerror(ret));
return 1;
}
ret = gnutls_rsa_params_init(&rsa_params);
if (ret < 0) {
printf("gnutls_rsa_params_init failed [%s]\n",
gnutls_strerror(ret));
return 1;
}
ret = gnutls_rsa_params_generate2(rsa_params, RSA_BITS);
if (ret < 0) {
printf("gnutls_rsa_params_generate2 failed [%s]\n",
gnutls_strerror(ret));
return 1;
}
printf("Success\n");
gnutls_rsa_params_deinit(rsa_params);
gnutls_global_deinit();
return 0;
}
--qMm9M+Fa2AknHoGS--