summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/sha/sha256.c
diff options
context:
space:
mode:
authorjsing <>2014-07-10 22:45:58 +0000
committerjsing <>2014-07-10 22:45:58 +0000
commitc8e58b52150f7c13e3281d122ed2c3ff38b6a1d5 (patch)
tree9101caa8789c6a2612e96fe7996efbe84f28f5a9 /src/lib/libcrypto/sha/sha256.c
parent81b6b7632b2207a2dbd7b6d803912ee3779176aa (diff)
downloadopenbsd-c8e58b52150f7c13e3281d122ed2c3ff38b6a1d5.tar.gz
openbsd-c8e58b52150f7c13e3281d122ed2c3ff38b6a1d5.tar.bz2
openbsd-c8e58b52150f7c13e3281d122ed2c3ff38b6a1d5.zip
Explicitly include <openssl/opensslconf.h> in every file that references
an OPENSSL_NO_* define. This avoids relying on something else pulling it in for us, plus it fixes several cases where the #ifndef OPENSSL_NO_XYZ is never going to do anything, since OPENSSL_NO_XYZ will never defined, due to the fact that opensslconf.h has not been included. This also includes some miscellaneous sorting/tidying of headers.
Diffstat (limited to 'src/lib/libcrypto/sha/sha256.c')
-rw-r--r--src/lib/libcrypto/sha/sha256.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/libcrypto/sha/sha256.c b/src/lib/libcrypto/sha/sha256.c
index 6d7af561fc..a4c259dab7 100644
--- a/src/lib/libcrypto/sha/sha256.c
+++ b/src/lib/libcrypto/sha/sha256.c
@@ -1,15 +1,18 @@
1/* $OpenBSD: sha256.c,v 1.6 2014/07/09 16:06:13 miod Exp $ */ 1/* $OpenBSD: sha256.c,v 1.7 2014/07/10 22:45:58 jsing 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#include <openssl/opensslconf.h> 8#include <openssl/opensslconf.h>
9
8#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA256) 10#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA256)
9 11
12#include <machine/endian.h>
13
10#include <stdlib.h> 14#include <stdlib.h>
11#include <string.h> 15#include <string.h>
12#include <machine/endian.h>
13 16
14#include <openssl/crypto.h> 17#include <openssl/crypto.h>
15#include <openssl/sha.h> 18#include <openssl/sha.h>