fixed RAND_bytes return code checking

https://www.openssl.org/docs/crypto/RAND_bytes.html#RETURN_VALUES

"RAND_bytes() returns 1 on success, 0 otherwise. ... return -1 if they are not supported by the current RAND method"