Hi Johan,

osrng.cpp has the OS specific code. Do you have a /dev/urandom?
AutoSeededRandomPool uses them.

Jeff

>From osrng.cpp:

NonblockingRng::NonblockingRng()
{
#ifndef CRYPTOPP_WIN32_AVAILABLE
        m_fd = open("/dev/urandom",O_RDONLY);
        if (m_fd == -1)
                throw OS_RNG_Err("open /dev/urandom");
#endif
}

BlockingRng::BlockingRng()
{
        m_fd = open("/dev/random",O_RDONLY);
        if (m_fd == -1)
                throw OS_RNG_Err("open /dev/random");
}
 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Johan Warman
> Sent: Wednesday, June 02, 2004 1:51 PM
> To: [EMAIL PROTECTED]
> Subject: Solaris Sparc and AutoSeededRandomPool
> 
> 
> Hi
>  
> I've changed the CryptoPP 4.2 according to the diff and made 
> it compile with Sun Studio 8. When I'm trying to use RNG on 
> the Solaris Sparc box I get zero back. This is what I'm doing:
>  
> CryptoPP::AutoSeededRandomPool rng;
>  
> byte* block = new byte[64];
> memset(block, 0, 64);
>  
> rng.GetBlock(block, 64);
>  
> block should now contain anything but just zeros, but it 
> doesn't. This works when I'm using GCC.
>  
> Any suggestions?
>  
> .johan
> 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to