Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I've got frustrated when I tried to install Crypto::SSLeay module on my HP-UX. I have installed OpenSSL 0.9.5a and Crypto::SSLeay 0.16. When I run net_ssl_test or other scripts to test, they failed to connect to HTTPS servers. The found those test scripts have established TCP connection to the HTTPS server, but failed to continue SSL conversations with servers. Further investigation shows that error occurs when PRNG seeding. I guess that OpenSSL API may not be well configured for PRNG seeding. Or Crypt::SSLeay haven't be configured OK to use OpenSSL API properly. I use EGD as a source of random number on my machine. I have made openssl command line work with it. How do I make OpenSSL API and Crypt::SSLeay work? Thanks for anybody getting me out here. Yewen White PJ, INC.

Replies are listed 'Best First'.
Re: Configure Crypto::SSLeay
by mdillon (Priest) on Jul 12, 2000 at 10:43 UTC
    i suggest you take a look at the Net::SSLeay module. to quote the perldocs:
    This module offers some high level convinience functions for accessing web pages on SSL servers, a sslcat() function for writing your own clients, and finally access to the SSL api of SSLeay package so you can write servers or clients for more complicated applications.
    Crypt::SSLeay is a support module for LWP. to quote its perldocs:
    Work on Crypt::SSLeay has been continued only to provide https support for the LWP - libwww perl libraries. If you want access to the OpenSSL API via perl, check out Sampo's Net::SSLeay.
    i've never used any of this on HP-UX, so i can't say for certain that your problem doesn't lie elsewhere, but i would at least give it a shot if i were you.

    note: Net::SSLeay is not an LWP module, so you don't get all the nice stuff like HTTP::Request, HTTP::Cookies, or LWP::UserAgent. you have to build and parse HTTP headers yourself. there may be some way around this, but the module is written not to use an LWP interface and so requires you to learn Yet Another set of functions.

    but hey, if it does the job, i'm less apt to fault it for an idiosyncratic interface.

      I've tried to install Net::SSLeay. When I was making test, it always said, error: random number generator:SSLEAY_RAND_BYTES:PRNG not seeded. I think it's the reason that both Net::SSLeay and Crypto::SSLeay don't work.