summaryrefslogtreecommitdiff
path: root/include/net/sctp
diff options
context:
space:
mode:
authorVlad Yasevich <vladislav.yasevich@hp.com>2007-11-29 09:53:52 -0500
committerVlad Yasevich <vladislav.yasevich@hp.com>2007-11-29 10:17:42 -0500
commitb7e0fe9f81e19c4f2a1369b324c3c062c1738be4 (patch)
treefe9d856c35e3d0ee5bd5acd9bd6b8dad93a3dd50 /include/net/sctp
parent555d3d5d2be13675490a80df0d7961551822ef1f (diff)
downloadlinux-3.10-b7e0fe9f81e19c4f2a1369b324c3c062c1738be4.tar.gz
linux-3.10-b7e0fe9f81e19c4f2a1369b324c3c062c1738be4.tar.bz2
linux-3.10-b7e0fe9f81e19c4f2a1369b324c3c062c1738be4.zip
SCTP: Fix build issues with SCTP AUTH.
SCTP-AUTH requires selection of CRYPTO, HMAC and SHA1 since SHA1 is a MUST requirement for AUTH. We also support SHA256, but that's optional, so fix the code to treat it as such. Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Diffstat (limited to 'include/net/sctp')
-rw-r--r--include/net/sctp/constants.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/net/sctp/constants.h b/include/net/sctp/constants.h
index f30b537d695..05f22a6afbc 100644
--- a/include/net/sctp/constants.h
+++ b/include/net/sctp/constants.h
@@ -441,11 +441,14 @@ enum {
SCTP_AUTH_HMAC_ID_RESERVED_0,
SCTP_AUTH_HMAC_ID_SHA1,
SCTP_AUTH_HMAC_ID_RESERVED_2,
- SCTP_AUTH_HMAC_ID_SHA256
+#if defined (CONFIG_CRYPTO_SHA256) || defined (CONFIG_CRYPTO_SHA256_MODULE)
+ SCTP_AUTH_HMAC_ID_SHA256,
+#endif
+ __SCTP_AUTH_HMAC_MAX
};
-#define SCTP_AUTH_HMAC_ID_MAX SCTP_AUTH_HMAC_ID_SHA256
-#define SCTP_AUTH_NUM_HMACS (SCTP_AUTH_HMAC_ID_SHA256 + 1)
+#define SCTP_AUTH_HMAC_ID_MAX __SCTP_AUTH_HMAC_MAX - 1
+#define SCTP_AUTH_NUM_HMACS __SCTP_AUTH_HMAC_MAX
#define SCTP_SHA1_SIG_SIZE 20
#define SCTP_SHA256_SIG_SIZE 32