[openssl.org #1110] DEVRAMDOM define in rand_unix.c

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[openssl.org #1110] DEVRAMDOM define in rand_unix.c

Rich Salz via RT

The real issue was the backslahes in the configuration definition for
DJGPP and how those interacted with the handling of a build environment
in the Makefiles.

I resolved the issue by moving the definition of DEVRANDOM for DJGPP
from Configure to e_os.h.

[guest - Mon Jun 13 11:45:04 2005]:

> Since 0.9.8beta3 method RAND_pool, when DEVRANDOM is defined, don't
>    read
> data from specified devices.
>
> before:
> $ strace -f openssl genrsa 2>&1 | grep -i random
> open("/dev/urandom", ...) = 3
>
> after:
> $ strace -f openssl genrsa 2>&1 | grep -i random
> open("DEVRANDOM", ...) = -1 ENOENT ...
>
>
> solution - remove quotes around DEVRANDOM in file
>    "crypto/rand/rand_unix.c"


--
Richard Levitte
[hidden email]
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [openssl.org #1110] DEVRAMDOM define in rand_unix.c

Doug Kaufman
On Sat, 18 Jun 2005, Richard Levitte via RT wrote:

> The real issue was the backslahes in the configuration definition for
> DJGPP and how those interacted with the handling of a build environment
> in the Makefiles.
>
> I resolved the issue by moving the definition of DEVRANDOM for DJGPP
> from Configure to e_os.h.

I tried compiling with DJGPP using your patch applied to beta5. It
compiles OK, but there are a lot of warnings, since there is a default
definition of DEVRANDOM earlier in the e_os.h file. I applied this
patch.

--- e_os.h.ori 2005-06-18 23:50:38.000000000 -0800
+++ e_os.h 2005-06-19 04:07:10.000000000 -0800
@@ -227,6 +227,7 @@
 #    define _setmode setmode
 #    define _O_TEXT O_TEXT
 #    define _O_BINARY O_BINARY
+#    undef DEVRANDOM
 #    define DEVRANDOM "/dev/urandom\x24"
 #  endif /* __DJGPP__ */
 
                     Doug
 
--
Doug Kaufman
Internet: [hidden email]

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [openssl.org #1110] DEVRAMDOM define in rand_unix.c

Rich Salz via RT
In reply to this post by Rich Salz via RT

On Sat, 18 Jun 2005, Richard Levitte via RT wrote:

> The real issue was the backslahes in the configuration definition for
> DJGPP and how those interacted with the handling of a build environment
> in the Makefiles.
>
> I resolved the issue by moving the definition of DEVRANDOM for DJGPP
> from Configure to e_os.h.

I tried compiling with DJGPP using your patch applied to beta5. It
compiles OK, but there are a lot of warnings, since there is a default
definition of DEVRANDOM earlier in the e_os.h file. I applied this
patch.

--- e_os.h.ori 2005-06-18 23:50:38.000000000 -0800
+++ e_os.h 2005-06-19 04:07:10.000000000 -0800
@@ -227,6 +227,7 @@
 #    define _setmode setmode
 #    define _O_TEXT O_TEXT
 #    define _O_BINARY O_BINARY
+#    undef DEVRANDOM
 #    define DEVRANDOM "/dev/urandom\x24"
 #  endif /* __DJGPP__ */
 
                     Doug
 
--
Doug Kaufman
Internet: [hidden email]

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]