diff options
| author | Steven Fackler <[email protected]> | 2014-10-13 23:19:14 -0700 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2014-10-13 23:19:14 -0700 |
| commit | 60dce4c2190ecb935044152c02f4362d76a381e2 (patch) | |
| tree | 9be063d21a6ca4c90f20be1dd54d0dc3144b959f /src/crypto/rand.rs | |
| parent | Merge pull request #83 from jmesmon/set-cipher-list (diff) | |
| parent | Correct init mutexes and locking function (diff) | |
| download | rust-openssl-60dce4c2190ecb935044152c02f4362d76a381e2.tar.xz rust-openssl-60dce4c2190ecb935044152c02f4362d76a381e2.zip | |
Merge pull request #81 from vhbit/lock-init
Correct init mutexes and locking function
Diffstat (limited to 'src/crypto/rand.rs')
| -rw-r--r-- | src/crypto/rand.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/crypto/rand.rs b/src/crypto/rand.rs index dffddee7..5f94c93c 100644 --- a/src/crypto/rand.rs +++ b/src/crypto/rand.rs @@ -5,6 +5,7 @@ pub fn rand_bytes(len: uint) -> Vec<u8> { unsafe { let mut out = Vec::with_capacity(len); + ffi::init(); let r = ffi::RAND_bytes(out.as_mut_ptr(), len as c_int); if r != 1 as c_int { fail!() } |