diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-11-23 19:24:57 +0100 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-11-23 19:24:57 +0100 |
| commit | 624066f0cce8acaf2feb973f24942883b0600a0b (patch) | |
| tree | 80edd1cef99947909380f2ba8c46103467ab3c5f | |
| parent | 26602b85a3f679017b4366d3c1b2f6c5aa950aa5 (diff) | |
| download | busybox-w32-624066f0cce8acaf2feb973f24942883b0600a0b.tar.gz busybox-w32-624066f0cce8acaf2feb973f24942883b0600a0b.tar.bz2 busybox-w32-624066f0cce8acaf2feb973f24942883b0600a0b.zip | |
tls: make tls_get_random() FAST_FUNC
function old new delta
tls_handshake 1977 1985 +8
tls_get_random 32 28 -4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 8/-4) Total: 4 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| -rw-r--r-- | networking/tls.c | 2 | ||||
| -rw-r--r-- | networking/tls.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/networking/tls.c b/networking/tls.c index 2a0098674..1e0e0991c 100644 --- a/networking/tls.c +++ b/networking/tls.c | |||
| @@ -337,7 +337,7 @@ static void dump_tls_record(const void *vp, int len) | |||
| 337 | # define dump_tls_record(...) ((void)0) | 337 | # define dump_tls_record(...) ((void)0) |
| 338 | #endif | 338 | #endif |
| 339 | 339 | ||
| 340 | void tls_get_random(void *buf, unsigned len) | 340 | void FAST_FUNC tls_get_random(void *buf, unsigned len) |
| 341 | { | 341 | { |
| 342 | if (len != open_read_close("/dev/urandom", buf, len)) | 342 | if (len != open_read_close("/dev/urandom", buf, len)) |
| 343 | xfunc_die(); | 343 | xfunc_die(); |
diff --git a/networking/tls.h b/networking/tls.h index 1d379c193..f2ef67aac 100644 --- a/networking/tls.h +++ b/networking/tls.h | |||
| @@ -80,7 +80,7 @@ typedef int16_t int16; | |||
| 80 | 80 | ||
| 81 | #define AES_BLOCK_SIZE 16 | 81 | #define AES_BLOCK_SIZE 16 |
| 82 | 82 | ||
| 83 | void tls_get_random(void *buf, unsigned len); | 83 | void tls_get_random(void *buf, unsigned len) FAST_FUNC; |
| 84 | 84 | ||
| 85 | #define matrixCryptoGetPrngData(buf, len, userPtr) (tls_get_random(buf, len), PS_SUCCESS) | 85 | #define matrixCryptoGetPrngData(buf, len, userPtr) (tls_get_random(buf, len), PS_SUCCESS) |
| 86 | 86 | ||
