diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-09-19 10:37:23 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-09-24 11:11:29 -0400 |
commit | 6c739c3fb2911338d68a77ea0a90cacbd868e4d7 (patch) | |
tree | b5fe3cbad5a39550767da975430c37374a10c8af /src/lib | |
parent | 112e5fa7ec6c8416d506e7572974e206f09cb9b0 (diff) | |
download | tor-6c739c3fb2911338d68a77ea0a90cacbd868e4d7.tar.gz tor-6c739c3fb2911338d68a77ea0a90cacbd868e4d7.zip |
Fix arm compilation with openssl <1.1
Bug 27781; bugfix on 0.3.5.1-alpha.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/crypt_ops/aes_openssl.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/crypt_ops/aes_openssl.c b/src/lib/crypt_ops/aes_openssl.c index 387f5d3df0..f2990fc06d 100644 --- a/src/lib/crypt_ops/aes_openssl.c +++ b/src/lib/crypt_ops/aes_openssl.c @@ -11,7 +11,9 @@ #include "orconfig.h" #include "lib/crypt_ops/aes.h" +#include "lib/crypt_ops/crypto_util.h" #include "lib/log/util_bug.h" +#include "lib/arch/bytes.h" #ifdef _WIN32 /*wrkard for dtls1.h >= 0.9.8m of "#include <winsock.h>"*/ #include <winsock2.h> @@ -396,10 +398,10 @@ static void aes_set_iv(aes_cnt_cipher_t *cipher, const uint8_t *iv) { #ifdef USING_COUNTER_VARS - cipher->counter3 = ntohl(get_uint32(iv)); - cipher->counter2 = ntohl(get_uint32(iv+4)); - cipher->counter1 = ntohl(get_uint32(iv+8)); - cipher->counter0 = ntohl(get_uint32(iv+12)); + cipher->counter3 = tor_ntohl(get_uint32(iv)); + cipher->counter2 = tor_ntohl(get_uint32(iv+4)); + cipher->counter1 = tor_ntohl(get_uint32(iv+8)); + cipher->counter0 = tor_ntohl(get_uint32(iv+12)); #endif /* defined(USING_COUNTER_VARS) */ cipher->pos = 0; memcpy(cipher->ctr_buf.buf, iv, 16); |