diff options
author | Pauli <paul.dale@oracle.com> | 2018-02-06 07:16:26 +1000 |
---|---|---|
committer | Pauli <paul.dale@oracle.com> | 2018-02-07 10:08:15 +1000 |
commit | 360fc9f412f1f60a4644228d9b6d386161aad406 (patch) | |
tree | afe5edd0f7ed08361411af5b7dfed591f4bb88a3 /crypto/cryptlib.c | |
parent | 2ad2281a8005dbc9046059693995c78a04ed9e37 (diff) | |
download | openssl-360fc9f412f1f60a4644228d9b6d386161aad406.zip openssl-360fc9f412f1f60a4644228d9b6d386161aad406.tar.gz openssl-360fc9f412f1f60a4644228d9b6d386161aad406.tar.bz2 |
Make OPENSSL_rdtsc universally available.
If such a timer/counter register is not available, the return value is always
zero. This matches the assembly implementations' behaviour.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com>
(Merged from https://github.com/openssl/openssl/pull/5231)
Diffstat (limited to 'crypto/cryptlib.c')
-rw-r--r-- | crypto/cryptlib.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crypto/cryptlib.c b/crypto/cryptlib.c index a4f2fb8..a4d96d8 100644 --- a/crypto/cryptlib.c +++ b/crypto/cryptlib.c @@ -355,4 +355,12 @@ int CRYPTO_memcmp(const void * in_a, const void * in_b, size_t len) return x; } + +/* + * For systems that don't provide an instruction counter register or equivalent. + */ +uint32_t OPENSSL_rdtsc(void) +{ + return 0; +} #endif |