Browse Source

ensure positive random numbers

Change-Id: I993a2b90b8ae56ac263597c5a107be9c1f92d001
changes/55/12455/1
Richard Fuchs 9 years ago
parent
commit
5dcd533a7f
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      daemon/aux.h

+ 2
- 2
daemon/aux.h View File

@ -188,8 +188,8 @@ INLINE int strmemcmp(const void *mem, int len, const char *str) {
INLINE void random_string(unsigned char *buf, int len) {
assert(RAND_bytes(buf, len) == 1);
}
INLINE long int ssl_random() {
long int ret;
INLINE long unsigned int ssl_random() {
long unsigned int ret;
random_string((void *) &ret, sizeof(ret));
return ret;
}


Loading…
Cancel
Save