summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/modes/xts128.c
diff options
context:
space:
mode:
authormiod <>2014-07-09 16:06:14 +0000
committermiod <>2014-07-09 16:06:14 +0000
commiteb3e7d7ffe444652fe6f90808f95e08bc99cf5ae (patch)
tree49de6ec1ff73debc360d8605d09d765a8e604a22 /src/lib/libcrypto/modes/xts128.c
parent241b6a38fd4cff90e8e18e7c8dd2e6371f86a8e9 (diff)
downloadopenbsd-eb3e7d7ffe444652fe6f90808f95e08bc99cf5ae.tar.gz
openbsd-eb3e7d7ffe444652fe6f90808f95e08bc99cf5ae.tar.bz2
openbsd-eb3e7d7ffe444652fe6f90808f95e08bc99cf5ae.zip
Remove leading underscore from _BYTE_ORDER and _{LITTLE,BIG}_ENDIAN, to be
more friendly to systems where the underscore flavours may be defined as empty. Found the hard way be bcook@; joint brainstrom with bcook beck and guenther
Diffstat (limited to 'src/lib/libcrypto/modes/xts128.c')
-rw-r--r--src/lib/libcrypto/modes/xts128.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/modes/xts128.c b/src/lib/libcrypto/modes/xts128.c
index 177bde03fa..e6a0fbb0fa 100644
--- a/src/lib/libcrypto/modes/xts128.c
+++ b/src/lib/libcrypto/modes/xts128.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: xts128.c,v 1.4 2014/06/12 15:49:30 deraadt Exp $ */ 1/* $OpenBSD: xts128.c,v 1.5 2014/07/09 16:06:13 miod Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 2011 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 2011 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -99,7 +99,7 @@ int CRYPTO_xts128_encrypt(const XTS128_CONTEXT *ctx, const unsigned char iv[16],
99 99
100 if (len==0) return 0; 100 if (len==0) return 0;
101 101
102 if (_BYTE_ORDER == _LITTLE_ENDIAN) { 102 if (BYTE_ORDER == LITTLE_ENDIAN) {
103 unsigned int carry,res; 103 unsigned int carry,res;
104 104
105 res = 0x87&(((int)tweak.d[3])>>31); 105 res = 0x87&(((int)tweak.d[3])>>31);
@@ -135,7 +135,7 @@ int CRYPTO_xts128_encrypt(const XTS128_CONTEXT *ctx, const unsigned char iv[16],
135 else { 135 else {
136 union { u64 u[2]; u8 c[16]; } tweak1; 136 union { u64 u[2]; u8 c[16]; } tweak1;
137 137
138 if (_BYTE_ORDER == _LITTLE_ENDIAN) { 138 if (BYTE_ORDER == LITTLE_ENDIAN) {
139 unsigned int carry,res; 139 unsigned int carry,res;
140 140
141 res = 0x87&(((int)tweak.d[3])>>31); 141 res = 0x87&(((int)tweak.d[3])>>31);