summaryrefslogtreecommitdiffstats
path: root/sys/netinet/sctp_auth.h
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2013-09-02 22:48:41 +0000
committertuexen <tuexen@FreeBSD.org>2013-09-02 22:48:41 +0000
commit7d2fcf19325313868b67d9952d27f94df3f54a5e (patch)
tree54148587f470a4d630cfbd1b7480e771bc34c3c6 /sys/netinet/sctp_auth.h
parent770a4ce79bdc3984cbfaf823903b7a4bcbe2b5f6 (diff)
downloadFreeBSD-src-7d2fcf19325313868b67d9952d27f94df3f54a5e.zip
FreeBSD-src-7d2fcf19325313868b67d9952d27f94df3f54a5e.tar.gz
All changes affect only SCTP-AUTH:
* Remove non working code related to SHA224. * Remove support for non-standardised HMAC-IDs using SHA384 and SHA512. * Prefer SHA256 over SHA1. * Minor cleanup. MFC after: 2 weeks
Diffstat (limited to 'sys/netinet/sctp_auth.h')
-rw-r--r--sys/netinet/sctp_auth.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/sys/netinet/sctp_auth.h b/sys/netinet/sctp_auth.h
index eac89f6..154bc13 100644
--- a/sys/netinet/sctp_auth.h
+++ b/sys/netinet/sctp_auth.h
@@ -36,14 +36,12 @@ __FBSDID("$FreeBSD$");
#ifndef _NETINET_SCTP_AUTH_H_
#define _NETINET_SCTP_AUTH_H_
+#include <netinet/sctp_os.h>
/* digest lengths */
#define SCTP_AUTH_DIGEST_LEN_SHA1 20
-#define SCTP_AUTH_DIGEST_LEN_SHA224 28
#define SCTP_AUTH_DIGEST_LEN_SHA256 32
-#define SCTP_AUTH_DIGEST_LEN_SHA384 48
-#define SCTP_AUTH_DIGEST_LEN_SHA512 64
-#define SCTP_AUTH_DIGEST_LEN_MAX 64
+#define SCTP_AUTH_DIGEST_LEN_MAX SCTP_AUTH_DIGEST_LEN_SHA256
/* random sizes */
#define SCTP_AUTH_RANDOM_SIZE_DEFAULT 32
@@ -52,12 +50,8 @@ __FBSDID("$FreeBSD$");
/* union of all supported HMAC algorithm contexts */
typedef union sctp_hash_context {
- SHA1_CTX sha1;
-#ifdef HAVE_SHA2
- SHA256_CTX sha256;
- SHA384_CTX sha384;
- SHA512_CTX sha512;
-#endif
+ SCTP_SHA1_CTX sha1;
+ SCTP_SHA256_CTX sha256;
} sctp_hash_context_t;
typedef struct sctp_key {
OpenPOWER on IntegriCloud