aboutsummaryrefslogtreecommitdiff
path: root/src/common/crypto.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-11-25 22:33:49 -0500
committerNick Mathewson <nickm@torproject.org>2015-11-25 22:33:49 -0500
commite5754c42d124549b3fd8e8d7c11d4dde3b5acec1 (patch)
treeb0ff2b0c1f4cfb44f087df8d062e3a56fd766046 /src/common/crypto.h
parentc875265bbbddc50674f65169ee49d5612bef72a7 (diff)
parent943369f927967268cacd2067ccae0bc5f1c5835e (diff)
downloadtor-e5754c42d124549b3fd8e8d7c11d4dde3b5acec1.tar.gz
tor-e5754c42d124549b3fd8e8d7c11d4dde3b5acec1.zip
Merge branch 'bug17686_v2_027'
Diffstat (limited to 'src/common/crypto.h')
-rw-r--r--src/common/crypto.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/common/crypto.h b/src/common/crypto.h
index 4d231d81b3..9b922ff818 100644
--- a/src/common/crypto.h
+++ b/src/common/crypto.h
@@ -16,6 +16,7 @@
#include <stdio.h>
#include "torint.h"
#include "testsupport.h"
+#include "compat.h"
/*
Macro to create an arbitrary OpenSSL version number as used by
@@ -119,10 +120,10 @@ typedef struct crypto_dh_t crypto_dh_t;
/* global state */
const char * crypto_openssl_get_version_str(void);
const char * crypto_openssl_get_header_version_str(void);
-int crypto_early_init(void);
+int crypto_early_init(void) ATTR_WUR;
int crypto_global_init(int hardwareAccel,
const char *accelName,
- const char *accelPath);
+ const char *accelPath) ATTR_WUR;
void crypto_thread_cleanup(void);
int crypto_global_cleanup(void);
@@ -269,9 +270,9 @@ int crypto_expand_key_material_rfc5869_sha256(
uint8_t *key_out, size_t key_out_len);
/* random numbers */
-int crypto_seed_rng(void);
-MOCK_DECL(int,crypto_rand,(char *to, size_t n));
-int crypto_rand_unmocked(char *to, size_t n);
+int crypto_seed_rng(void) ATTR_WUR;
+MOCK_DECL(void,crypto_rand,(char *to, size_t n));
+void crypto_rand_unmocked(char *to, size_t n);
int crypto_strongest_rand(uint8_t *out, size_t out_len);
int crypto_rand_int(unsigned int max);
int crypto_rand_int_range(unsigned int min, unsigned int max);