diff options
author | bcook <> | 2021-11-09 18:40:21 +0000 |
---|---|---|
committer | bcook <> | 2021-11-09 18:40:21 +0000 |
commit | 32252b67905445c5f332781497a1509d803f7aee (patch) | |
tree | 3d08be06ef36588938f48b03e786f7f3d32b03f2 /src/lib | |
parent | 07305e812277e705090ef12fc544cfaca761f7b0 (diff) | |
download | openbsd-32252b67905445c5f332781497a1509d803f7aee.tar.gz openbsd-32252b67905445c5f332781497a1509d803f7aee.tar.bz2 openbsd-32252b67905445c5f332781497a1509d803f7aee.zip |
Switch to <endian.h> from <machine/endian.h> for better portability.
ok tb@
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/bn/bn_nist.c | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/des/cfb_enc.c | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/gost/gost2814789.c | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/gost/streebog.c | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/modes/modes_lcl.h | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/modes/xts128.c | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/rc4/rc4_enc.c | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/sha/sha256.c | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/sha/sha512.c | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/sha/sha_locl.h | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/whrlpool/wp_block.c | 4 | ||||
-rw-r--r-- | src/lib/libssl/d1_pkt.c | 5 |
12 files changed, 26 insertions, 30 deletions
diff --git a/src/lib/libcrypto/bn/bn_nist.c b/src/lib/libcrypto/bn/bn_nist.c index b16584d6b9..3a04c471c4 100644 --- a/src/lib/libcrypto/bn/bn_nist.c +++ b/src/lib/libcrypto/bn/bn_nist.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bn_nist.c,v 1.18 2016/07/18 01:04:52 bcook Exp $ */ | 1 | /* $OpenBSD: bn_nist.c,v 1.19 2021/11/09 18:40:20 bcook Exp $ */ |
2 | /* | 2 | /* |
3 | * Written by Nils Larsch for the OpenSSL project | 3 | * Written by Nils Larsch for the OpenSSL project |
4 | */ | 4 | */ |
@@ -56,8 +56,7 @@ | |||
56 | * | 56 | * |
57 | */ | 57 | */ |
58 | 58 | ||
59 | #include <machine/endian.h> | 59 | #include <endian.h> |
60 | |||
61 | #include <stdint.h> | 60 | #include <stdint.h> |
62 | #include <string.h> | 61 | #include <string.h> |
63 | 62 | ||
diff --git a/src/lib/libcrypto/des/cfb_enc.c b/src/lib/libcrypto/des/cfb_enc.c index 59a3e71862..4231f469ee 100644 --- a/src/lib/libcrypto/des/cfb_enc.c +++ b/src/lib/libcrypto/des/cfb_enc.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: cfb_enc.c,v 1.13 2015/02/10 09:46:30 miod Exp $ */ | 1 | /* $OpenBSD: cfb_enc.c,v 1.14 2021/11/09 18:40:21 bcook Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -57,7 +57,7 @@ | |||
57 | */ | 57 | */ |
58 | 58 | ||
59 | #include "des_locl.h" | 59 | #include "des_locl.h" |
60 | #include <machine/endian.h> | 60 | #include <endian.h> |
61 | 61 | ||
62 | /* The input and output are loaded in multiples of 8 bits. | 62 | /* The input and output are loaded in multiples of 8 bits. |
63 | * What this means is that if you hame numbits=12 and length=2 | 63 | * What this means is that if you hame numbits=12 and length=2 |
diff --git a/src/lib/libcrypto/gost/gost2814789.c b/src/lib/libcrypto/gost/gost2814789.c index f1066f2467..0841a03b1e 100644 --- a/src/lib/libcrypto/gost/gost2814789.c +++ b/src/lib/libcrypto/gost/gost2814789.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: gost2814789.c,v 1.6 2020/09/12 02:45:05 inoguchi Exp $ */ | 1 | /* $OpenBSD: gost2814789.c,v 1.7 2021/11/09 18:40:21 bcook Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> |
4 | * Copyright (c) 2005-2006 Cryptocom LTD | 4 | * Copyright (c) 2005-2006 Cryptocom LTD |
@@ -49,8 +49,7 @@ | |||
49 | * ==================================================================== | 49 | * ==================================================================== |
50 | */ | 50 | */ |
51 | 51 | ||
52 | #include <machine/endian.h> | 52 | #include <endian.h> |
53 | |||
54 | #include <string.h> | 53 | #include <string.h> |
55 | 54 | ||
56 | #include <openssl/opensslconf.h> | 55 | #include <openssl/opensslconf.h> |
diff --git a/src/lib/libcrypto/gost/streebog.c b/src/lib/libcrypto/gost/streebog.c index 61bce0e32c..b237a2c500 100644 --- a/src/lib/libcrypto/gost/streebog.c +++ b/src/lib/libcrypto/gost/streebog.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: streebog.c,v 1.6 2019/05/09 22:54:28 tb Exp $ */ | 1 | /* $OpenBSD: streebog.c,v 1.7 2021/11/09 18:40:21 bcook Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 3 | * Copyright (c) 2014 Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> |
4 | * Copyright (c) 2005-2006 Cryptocom LTD | 4 | * Copyright (c) 2005-2006 Cryptocom LTD |
@@ -49,8 +49,7 @@ | |||
49 | * ==================================================================== | 49 | * ==================================================================== |
50 | */ | 50 | */ |
51 | 51 | ||
52 | #include <machine/endian.h> | 52 | #include <endian.h> |
53 | |||
54 | #include <stdlib.h> | 53 | #include <stdlib.h> |
55 | #include <string.h> | 54 | #include <string.h> |
56 | 55 | ||
diff --git a/src/lib/libcrypto/modes/modes_lcl.h b/src/lib/libcrypto/modes/modes_lcl.h index f8830e4deb..91820897f7 100644 --- a/src/lib/libcrypto/modes/modes_lcl.h +++ b/src/lib/libcrypto/modes/modes_lcl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: modes_lcl.h,v 1.10 2016/12/21 15:49:29 jsing Exp $ */ | 1 | /* $OpenBSD: modes_lcl.h,v 1.11 2021/11/09 18:40:21 bcook Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 2010 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 2010 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -6,7 +6,7 @@ | |||
6 | * ==================================================================== | 6 | * ==================================================================== |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <machine/endian.h> | 9 | #include <endian.h> |
10 | 10 | ||
11 | #include <openssl/opensslconf.h> | 11 | #include <openssl/opensslconf.h> |
12 | 12 | ||
diff --git a/src/lib/libcrypto/modes/xts128.c b/src/lib/libcrypto/modes/xts128.c index 0be23d4ea9..2084892ee6 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.7 2017/08/13 17:46:24 bcook Exp $ */ | 1 | /* $OpenBSD: xts128.c,v 1.8 2021/11/09 18:40:21 bcook 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 | * |
@@ -48,9 +48,10 @@ | |||
48 | * ==================================================================== | 48 | * ==================================================================== |
49 | */ | 49 | */ |
50 | 50 | ||
51 | #include <machine/endian.h> | ||
52 | #include <openssl/crypto.h> | 51 | #include <openssl/crypto.h> |
53 | #include "modes_lcl.h" | 52 | #include "modes_lcl.h" |
53 | |||
54 | #include <endian.h> | ||
54 | #include <string.h> | 55 | #include <string.h> |
55 | 56 | ||
56 | #ifndef MODES_DEBUG | 57 | #ifndef MODES_DEBUG |
diff --git a/src/lib/libcrypto/rc4/rc4_enc.c b/src/lib/libcrypto/rc4/rc4_enc.c index bd928b58c9..aa2766a133 100644 --- a/src/lib/libcrypto/rc4/rc4_enc.c +++ b/src/lib/libcrypto/rc4/rc4_enc.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rc4_enc.c,v 1.16 2017/08/13 17:46:24 bcook Exp $ */ | 1 | /* $OpenBSD: rc4_enc.c,v 1.17 2021/11/09 18:40:21 bcook Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -56,7 +56,8 @@ | |||
56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
57 | */ | 57 | */ |
58 | 58 | ||
59 | #include <machine/endian.h> | 59 | #include <endian.h> |
60 | |||
60 | #include <openssl/rc4.h> | 61 | #include <openssl/rc4.h> |
61 | #include "rc4_locl.h" | 62 | #include "rc4_locl.h" |
62 | 63 | ||
diff --git a/src/lib/libcrypto/sha/sha256.c b/src/lib/libcrypto/sha/sha256.c index 9c05d3b0f8..e826ca9e19 100644 --- a/src/lib/libcrypto/sha/sha256.c +++ b/src/lib/libcrypto/sha/sha256.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sha256.c,v 1.10 2019/01/21 23:20:31 jsg Exp $ */ | 1 | /* $OpenBSD: sha256.c,v 1.11 2021/11/09 18:40:21 bcook Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 2004 The OpenSSL Project. All rights reserved | 3 | * Copyright (c) 2004 The OpenSSL Project. All rights reserved |
4 | * according to the OpenSSL license [found in ../../LICENSE]. | 4 | * according to the OpenSSL license [found in ../../LICENSE]. |
@@ -9,8 +9,7 @@ | |||
9 | 9 | ||
10 | #if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA256) | 10 | #if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA256) |
11 | 11 | ||
12 | #include <machine/endian.h> | 12 | #include <endian.h> |
13 | |||
14 | #include <stdlib.h> | 13 | #include <stdlib.h> |
15 | #include <string.h> | 14 | #include <string.h> |
16 | 15 | ||
diff --git a/src/lib/libcrypto/sha/sha512.c b/src/lib/libcrypto/sha/sha512.c index 6b95cfa72e..56a207f7d0 100644 --- a/src/lib/libcrypto/sha/sha512.c +++ b/src/lib/libcrypto/sha/sha512.c | |||
@@ -1,12 +1,11 @@ | |||
1 | /* $OpenBSD: sha512.c,v 1.15 2016/11/04 13:56:05 miod Exp $ */ | 1 | /* $OpenBSD: sha512.c,v 1.16 2021/11/09 18:40:21 bcook Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 2004 The OpenSSL Project. All rights reserved | 3 | * Copyright (c) 2004 The OpenSSL Project. All rights reserved |
4 | * according to the OpenSSL license [found in ../../LICENSE]. | 4 | * according to the OpenSSL license [found in ../../LICENSE]. |
5 | * ==================================================================== | 5 | * ==================================================================== |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <machine/endian.h> | 8 | #include <endian.h> |
9 | |||
10 | #include <stdlib.h> | 9 | #include <stdlib.h> |
11 | #include <string.h> | 10 | #include <string.h> |
12 | 11 | ||
diff --git a/src/lib/libcrypto/sha/sha_locl.h b/src/lib/libcrypto/sha/sha_locl.h index 46c9a39be2..5daab29fd7 100644 --- a/src/lib/libcrypto/sha/sha_locl.h +++ b/src/lib/libcrypto/sha/sha_locl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: sha_locl.h,v 1.23 2016/12/23 23:22:25 patrick Exp $ */ | 1 | /* $OpenBSD: sha_locl.h,v 1.24 2021/11/09 18:40:21 bcook Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -186,7 +186,7 @@ int SHA1_Init(SHA_CTX *c) | |||
186 | #endif | 186 | #endif |
187 | 187 | ||
188 | #if !defined(SHA1_ASM) | 188 | #if !defined(SHA1_ASM) |
189 | #include <machine/endian.h> | 189 | #include <endian.h> |
190 | static void HASH_BLOCK_DATA_ORDER (SHA_CTX *c, const void *p, size_t num) | 190 | static void HASH_BLOCK_DATA_ORDER (SHA_CTX *c, const void *p, size_t num) |
191 | { | 191 | { |
192 | const unsigned char *data=p; | 192 | const unsigned char *data=p; |
diff --git a/src/lib/libcrypto/whrlpool/wp_block.c b/src/lib/libcrypto/whrlpool/wp_block.c index 1e00a01330..b2137d643d 100644 --- a/src/lib/libcrypto/whrlpool/wp_block.c +++ b/src/lib/libcrypto/whrlpool/wp_block.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: wp_block.c,v 1.13 2016/11/04 17:30:30 miod Exp $ */ | 1 | /* $OpenBSD: wp_block.c,v 1.14 2021/11/09 18:40:21 bcook Exp $ */ |
2 | /** | 2 | /** |
3 | * The Whirlpool hashing function. | 3 | * The Whirlpool hashing function. |
4 | * | 4 | * |
@@ -36,9 +36,9 @@ | |||
36 | * | 36 | * |
37 | */ | 37 | */ |
38 | 38 | ||
39 | #include <endian.h> | ||
39 | #include <string.h> | 40 | #include <string.h> |
40 | #include <openssl/crypto.h> | 41 | #include <openssl/crypto.h> |
41 | #include <machine/endian.h> | ||
42 | 42 | ||
43 | #include "wp_locl.h" | 43 | #include "wp_locl.h" |
44 | 44 | ||
diff --git a/src/lib/libssl/d1_pkt.c b/src/lib/libssl/d1_pkt.c index f0f393b0fd..12a711324a 100644 --- a/src/lib/libssl/d1_pkt.c +++ b/src/lib/libssl/d1_pkt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: d1_pkt.c,v 1.115 2021/10/25 10:14:48 jsing Exp $ */ | 1 | /* $OpenBSD: d1_pkt.c,v 1.116 2021/11/09 18:40:21 bcook Exp $ */ |
2 | /* | 2 | /* |
3 | * DTLS implementation written by Nagendra Modadugu | 3 | * DTLS implementation written by Nagendra Modadugu |
4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. | 4 | * (nagendra@cs.stanford.edu) for the OpenSSL project 2005. |
@@ -113,8 +113,7 @@ | |||
113 | * [including the GNU Public Licence.] | 113 | * [including the GNU Public Licence.] |
114 | */ | 114 | */ |
115 | 115 | ||
116 | #include <machine/endian.h> | 116 | #include <endian.h> |
117 | |||
118 | #include <errno.h> | 117 | #include <errno.h> |
119 | #include <stdio.h> | 118 | #include <stdio.h> |
120 | 119 | ||