• Jeremy Hylton's avatar
    Expose three OpenSSL API calls for dealing with the PRNG. · de80f2ef
    Jeremy Hylton authored
    Quoth the OpenSSL RAND_add man page:
    
        OpenSSL makes sure that the PRNG state is unique for each
        thread. On systems that provide /dev/urandom, the
        randomness device is used to seed the PRNG transparently.
        However, on all other systems, the application is
        responsible for seeding the PRNG by calling RAND_add(),
        RAND_egd(3) or RAND_load_file(3).
    
    I decided to expose RAND_add() because it's general and RAND_egd()
    because it's a useful special case.  RAND_load_file() didn't seem to
    offer much over RAND_add(), so I skipped it.  Also supplied
    RAND_status() which returns true if the PRNG is seeded and false if
    not.
    de80f2ef
socketmodule.c 88.5 KB