From: "Noah Silverman" <[EMAIL PROTECTED]>
> Hi,
>
> I am new to this and need some help.
>
> I just installed openssl, and mod_ssl onto my machine.  Everything works
> fine with the "test certificate" that comes with the installation.
>
> I need to generate a request for verisign, but when I do, I get the error
> "PRNG not seeded".  I read the FAQ, but was still not sure about how to
set
> this up in Solaris 8.
>
> Has anybody else discovered an easy fix for this problem?

Some of the modules need to use a Pseudo Random Number Generator
(PRNG) when building keys. SOlaris 8 does not have (as default) a device
than generates random numbers so you have to seed it manually.

To do this you need to generate a seed and then initialise the PRNG with
it. Here's a rough program to generate a seed.

#include "openssl/rsa.h"
#include "rsaref.h"

#define BUFFER_SIZE 512

int main(int argc, char *argv[])
{
    char buffer[BUFFER_SIZE + 1];
    char temp[256];
    int len = 0;

    if ( 2 != argc )
    {
        printf("usage: seedgen <output file>\n");
        return -1;
    }

    while ( len < BUFFER_SIZE - 1)
    {
        fgets(temp, 256, stdin);
        memcpy(buffer + len, temp, strlen(temp));
        len = len + strlen(temp);
    }
    RAND_seed(buffer, len);
    RAND_write_file(argv[1]);

    return 0;
}

If you're going to use this I'd recommend rewriting it.
Then, to seed the PRNG you use the command:

RAND_load_file(char *filename);

where filename points to the file you saved the seed in.

Hope this helps.

Cheers, Jim.
IT Manager, Blitz The Net Ltd.


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to