summaryrefslogtreecommitdiff
path: root/comms
diff options
context:
space:
mode:
authorjnemeth <jnemeth>2016-09-23 17:50:19 +0000
committerjnemeth <jnemeth>2016-09-23 17:50:19 +0000
commitef32b2d15a5edb5cdebc7818efcede5ceaec82ca (patch)
tree734cfe283a3324387af116868f08eaf427d9a006 /comms
parent091ef44cd950828a5153d4b41922d128dd9c6f49 (diff)
downloadpkgsrc-ef32b2d15a5edb5cdebc7818efcede5ceaec82ca.tar.gz
Update to Asterisk 13.11.2: this is mainly a bug fix release
including two security issues: AST-2016-006 and AST-2016-007. Note that AST-2016-006 only affected setups using PJSIP, which pkgsrc Asterisk does not. pkgsrc changes: - don't use gethostbyname_r on NetBSD - eliminte conflict with new hmac(1) function on NetBSD ----- AST-2016-006 Asterisk can be crashed remotely by sending an ACK to it from an endpoint username that Asterisk does not recognize. Most SIP request types result in an "artificial" endpoint being looked up, but ACKs bypass this lookup. The resulting NULL pointer results in a crash when attempting to determine if ACLs should be applied. This issue was introduced in the Asterisk 13.10 release and only affects that release. This issue only affects users using the PJSIP stack with Asterisk. Those users that use chan_sip are unaffected. ----- AST-2016-007 The overlap dialing feature in chan_sip allows chan_sip to report to a device that the number that has been dialed is incomplete and more digits are required. If this functionality is used with a device that has performed username/password authentication RTP resources are leaked. This occurs because the code fails to release the old RTP resources before allocating new ones in this scenario. If all resources are used then RTP port exhaustion will occur and no RTP sessions are able to be set up. ----- 13.11.2 The Asterisk Development Team has announced the release of Asterisk 13.11.2. The release of Asterisk 13.11.2 resolves an issue reported by the community and would have not been possible without your participation. Thank you! The following is the issue resolved in this release: Bugs fixed in this release: ----------------------------------- * ASTERISK-26349 - 13.11.1 res_pjsip/pjsip_distributor.c: Request 'REGISTER' failed (Reported by Dmitry Melekhov) For a full list of changes in this release, please see the ChangeLog: http://downloads.asterisk.org/pub/telephony/asterisk/ChangeLog-13.11.2 Thank you for your continued support of Asterisk! ----- 13.11.0 The Asterisk Development Team has announced the release of Asterisk 13.11.0. The release of Asterisk 13.11.0 resolves several issues reported by the community and would have not been possible without your participation. Thank you! The following are the issues resolved in this release: New Features made in this release: ----------------------------------- * ASTERISK-25904 - PJSIP: add contact.updated event (Reported by Alexei Gradinari) Bugs fixed in this release: ----------------------------------- * ASTERISK-26269 - res_pjsip: Wrong state for aors without registered contacts after startup (Reported by nappsoft) * ASTERISK-26299 - app_queue: Queue application sometimes stops calling members with Local interface (Reported by Etienne Lessard) * ASTERISK-26148 - pjsip: Cannot compile 13.10.0-rc1: "libasteriskpj.so: undefined reference to..." (Reported by Hans van Eijsden) * ASTERISK-26237 - Fax is detected on regular calls. (Reported by Richard Mudgett) * ASTERISK-26227 - sqlalchemy error due to long identifier name (Reported by Mark Michelson) * ASTERISK-19968 - TCP Session-Timers not dropping call (Reported by Aaron Hamstra) * ASTERISK-26214 - Allow arbitrary time for fax detection to end on a channel (Reported by Richard Mudgett) * ASTERISK-23013 - [patch] Deadlock between 'sip show channels' command and attended transfer handling (Reported by Ben Smithurst) * ASTERISK-26216 - res_fax: Deadlock when detect fax while channel executing Playback (Reported by Richard Mudgett) * ASTERISK-26212 - [patch] Makefile: Retain XML Declaration and DTD in docs. (Reported by Alexander Traud) * ASTERISK-26211 - Unit tests: AST_TEST_DEFINE should be used in conditional code. (Reported by Corey Farrell) * ASTERISK-26207 - [patch] sRTP: Count a roll-over of the sequence number even on lost packets. (Reported by Alexander Traud) * ASTERISK-26038 - 'make install' doesn't seem to install OS/X init files (Reported by Tzafrir Cohen) * ASTERISK-26200 - [patch] res_pjsip_mwi: improve realtime performance - remove unneeded check on endpoint's contacts. (Reported by Alexei Gradinari) * ASTERISK-26133 - app_queue: Queue members receive multiple calls (Reported by Richard Miller) * ASTERISK-26196 - pbx: Time based includes can leak timezone string (Reported by Corey Farrell) * ASTERISK-26193 - chan_sip: reference leak in mwi_event_cb (Reported by Corey Farrell) * ASTERISK-25659 - res_rtp_asterisk: ECDH not negotiated causing DTLS failure occurred on RTP instance (Reported by Edwin Vandamme) * ASTERISK-26191 - threadpool: Leak on duplicate taskprocessor for ast_threadpool_serializer_group (Reported by Corey Farrell) * ASTERISK-26046 - [patch] Avoid obsolete warnings on autoconf. (Reported by Alexander Traud) * ASTERISK-26160 - pjsip: Updated->Reachable during qualify (Reported by Matt Jordan) * ASTERISK-25289 - Build System does not respect CFLAGS and CXXFLAGS when building menuselect (Reported by Jeffrey Walton) * ASTERISK-26119 - [patch] fix: memory leaks, resource leaks, out of bounds and bugs (Reported by Alexei Gradinari) * ASTERISK-26177 - func_odbc: Database handle is kept when it should be released (Reported by Leandro Dardini) * ASTERISK-26184 - chan_sip: Reference leaks in error paths. (Reported by Corey Farrell) * ASTERISK-26181 - REF_DEBUG: Node object incorrectly logged during duplicate replacement (Reported by Corey Farrell) * ASTERISK-26180 - PJSIP: provide valid tcp nodelay option for reuse (Reported by Scott Griepentrog) * ASTERISK-26179 - chan_sip: Second T.38 request fails (Reported by Joshua Colp) * ASTERISK-26172 - res_sorcery_realtime: fix bug when successful sql UPDATE is treated as failed if there is no affected rows. (Reported by Alexei Gradinari) * ASTERISK-25772 - res_pjsip: Unexpected two BYE when answered (Reported by Dmitriy Serov) * ASTERISK-26099 - res_pjsip_pubsub: Crash when sending request due to server timeout (Reported by Ross Beer) * ASTERISK-26144 - Crash on loading codecs g729/g723 (Reported by Alexei Gradinari) * ASTERISK-26157 - Build: Fix errors highlighted by GCC 6.x (Reported by George Joseph) * ASTERISK-26021 - Build codecs siren7 and siren14 for Asterisk 13 (Reported by Daniel Denson) * ASTERISK-26326 - Crash when dialing MulticastRTP channel (Reported by George Joseph) Improvements made in this release: ----------------------------------- * ASTERISK-26220 - Add support for noreturn function attributes. (Reported by Corey Farrell) * ASTERISK-22131 - Update the make dependencies script to pull, build, and install the correct pjproject (Reported by Matt Jordan) * ASTERISK-25471 - [patch]Add subscribe_context to res_pjsip (Reported by JoshE) * ASTERISK-26159 - res_hep: enabled by default and information sent to default address (Reported by Ross Beer) For a full list of changes in this release, please see the ChangeLog: http://downloads.asterisk.org/pub/telephony/asterisk/ChangeLog-13.11.0 Thank you for your continued support of Asterisk!
Diffstat (limited to 'comms')
-rw-r--r--comms/asterisk13/Makefile12
-rw-r--r--comms/asterisk13/PLIST6
-rw-r--r--comms/asterisk13/distinfo23
-rw-r--r--comms/asterisk13/patches/patch-configure22
-rw-r--r--comms/asterisk13/patches/patch-configure.ac11
-rw-r--r--comms/asterisk13/patches/patch-include_asterisk_sha1.h131
6 files changed, 158 insertions, 47 deletions
diff --git a/comms/asterisk13/Makefile b/comms/asterisk13/Makefile
index a6ce903e2ec..3e6c519a60f 100644
--- a/comms/asterisk13/Makefile
+++ b/comms/asterisk13/Makefile
@@ -1,11 +1,10 @@
-# $NetBSD: Makefile,v 1.11 2016/08/03 10:22:35 adam Exp $
+# $NetBSD: Makefile,v 1.12 2016/09/23 17:50:19 jnemeth Exp $
#
# NOTE: when updating this package, there are two places that sound
# tarballs need to be checked; look in ${WRKSRC}/sounds/Makefile
# to find out the current sound file versions
-DISTNAME= asterisk-13.10.0
-PKGREVISION= 1
+DISTNAME= asterisk-13.11.2
CATEGORIES= comms net audio
MASTER_SITES= http://downloads.asterisk.org/pub/telephony/asterisk/ \
http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/ \
@@ -161,6 +160,13 @@ SUBST_STAGE.pktinfo= post-configure
SUBST_FILES.pktinfo= include/asterisk/autoconfig.h
SUBST_SED.pktinfo= -e "s|^\#define HAVE_PKTINFO 1|\#undef HAVE_PKTINFO|"
+# XXX gross hack, gethostbyname_r on NETBSD is for internal use only
+SUBST_CLASSES.NetBSD+= gethostbyname_r
+SUBST_STAGE.gethostbyname_r= post-configure
+SUBST_FILES.gethostbyname_r= include/asterisk/autoconfig.h
+SUBST_SED.gethostbyname_r= -e "s|^\#define HAVE_GETHOSTBYNAME_R_5 1|\#undef HAVE_GETHOSTBYNAME_R_5|"
+SUBST_SED.gethostbyname_r+= -e "s|^\#define HAVE_GETHOSTBYNAME_R_6 1|\#undef HAVE_GETHOSTBYNAME_R_6|"
+
RCD_SCRIPTS= asterisk
OWN_DIRS_PERMS+= ${ASTDBDIR} ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
OWN_DIRS_PERMS+= ${ASTSPOOLDIR} ${ASTERISK_USER} ${ASTERISK_GROUP} 0755
diff --git a/comms/asterisk13/PLIST b/comms/asterisk13/PLIST
index 6f48feb3d8a..2f217405764 100644
--- a/comms/asterisk13/PLIST
+++ b/comms/asterisk13/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.6 2016/07/24 06:35:50 jnemeth Exp $
+@comment $NetBSD: PLIST,v 1.7 2016/09/23 17:50:19 jnemeth Exp $
include/asterisk.h
include/asterisk/_private.h
include/asterisk/abstract_jb.h
@@ -298,8 +298,8 @@ lib/asterisk/modules/chan_bridge_media.so
lib/asterisk/modules/chan_iax2.so
${PLIST.mgcp}lib/asterisk/modules/chan_mgcp.so
${PLIST.jabber}lib/asterisk/modules/chan_motif.so
-lib/asterisk/modules/chan_rtp.so
lib/asterisk/modules/chan_oss.so
+lib/asterisk/modules/chan_rtp.so
lib/asterisk/modules/chan_sip.so
lib/asterisk/modules/chan_skinny.so
lib/asterisk/modules/chan_unistim.so
@@ -419,6 +419,8 @@ lib/asterisk/modules/res_format_attr_h263.so
lib/asterisk/modules/res_format_attr_h264.so
lib/asterisk/modules/res_format_attr_opus.so
lib/asterisk/modules/res_format_attr_silk.so
+lib/asterisk/modules/res_format_attr_siren14.so
+lib/asterisk/modules/res_format_attr_siren7.so
lib/asterisk/modules/res_format_attr_vp8.so
lib/asterisk/modules/res_hep.so
lib/asterisk/modules/res_hep_rtcp.so
diff --git a/comms/asterisk13/distinfo b/comms/asterisk13/distinfo
index 9b4bbc3967f..528654a698b 100644
--- a/comms/asterisk13/distinfo
+++ b/comms/asterisk13/distinfo
@@ -1,13 +1,13 @@
-$NetBSD: distinfo,v 1.6 2016/07/24 06:35:50 jnemeth Exp $
+$NetBSD: distinfo,v 1.7 2016/09/23 17:50:19 jnemeth Exp $
-SHA1 (asterisk-13.10.0/asterisk-13.10.0.tar.gz) = fc1d21248b875d7fe142d247525cf9c8d4a594f7
-RMD160 (asterisk-13.10.0/asterisk-13.10.0.tar.gz) = d5e992c0abb4e7baaf3f999337f380f2f3076c35
-SHA512 (asterisk-13.10.0/asterisk-13.10.0.tar.gz) = 14758144010ee7a4a2bad03a3ac14ac74b66a48953902d68d768efd8cf0e34d47f6d9c1ee38df13d44f20f457f30539c1765dfd8edeabea05a9d017fa1711090
-Size (asterisk-13.10.0/asterisk-13.10.0.tar.gz) = 32628566 bytes
-SHA1 (asterisk-13.10.0/asterisk-extra-sounds-en-gsm-1.5.tar.gz) = 831ae6442e23cbef1e7d1c84798778ad0b0524d1
-RMD160 (asterisk-13.10.0/asterisk-extra-sounds-en-gsm-1.5.tar.gz) = d52df795201c53fc4cd7d99ed41516e312f6f0f3
-SHA512 (asterisk-13.10.0/asterisk-extra-sounds-en-gsm-1.5.tar.gz) = c7d3c3fd2c854e6776801312d34bf69bbed78a443c16121637f508c5275f18b1d415cbb6e4f6f8c5aa3769cbbfa1a11485b9972053777f3ac39256c2c81729f1
-Size (asterisk-13.10.0/asterisk-extra-sounds-en-gsm-1.5.tar.gz) = 4256538 bytes
+SHA1 (asterisk-13.11.2/asterisk-13.11.2.tar.gz) = 92fafbb66ea471f5b2d3119d8e8a3f8eda7ed965
+RMD160 (asterisk-13.11.2/asterisk-13.11.2.tar.gz) = beda826c24f93713716aafeca4bce64c2e13c20d
+SHA512 (asterisk-13.11.2/asterisk-13.11.2.tar.gz) = c0275d353ab19de37ddd7b026ca5c920cf2a9fa578396e6af9a170e8dd8abf51875beacb103aaa1f9829d12efadd7ab7fd608e311f7f8b855a451073fe7197e9
+Size (asterisk-13.11.2/asterisk-13.11.2.tar.gz) = 32630702 bytes
+SHA1 (asterisk-13.11.2/asterisk-extra-sounds-en-gsm-1.5.tar.gz) = 831ae6442e23cbef1e7d1c84798778ad0b0524d1
+RMD160 (asterisk-13.11.2/asterisk-extra-sounds-en-gsm-1.5.tar.gz) = d52df795201c53fc4cd7d99ed41516e312f6f0f3
+SHA512 (asterisk-13.11.2/asterisk-extra-sounds-en-gsm-1.5.tar.gz) = c7d3c3fd2c854e6776801312d34bf69bbed78a443c16121637f508c5275f18b1d415cbb6e4f6f8c5aa3769cbbfa1a11485b9972053777f3ac39256c2c81729f1
+Size (asterisk-13.11.2/asterisk-extra-sounds-en-gsm-1.5.tar.gz) = 4256538 bytes
SHA1 (patch-Makefile) = 1373ea4cfab46f701cef0f5c61a6a1604e710bf5
SHA1 (patch-addons_chan__ooh323.c) = 9cba619ced6a4449604faebeac33d91a23519c48
SHA1 (patch-apps_app__dumpchan.c) = 127ac02bdc180ad2334cd095aa6e646feb6fba10
@@ -21,13 +21,14 @@ SHA1 (patch-cel_cel__pgsql.c) = b280efab2b035ce60be268bac9bc8824910b2b8f
SHA1 (patch-channels_chan__oss.c) = 8a1c32462097f4a58f48a1a994aff5a8ab4c9fb2
SHA1 (patch-channels_chan__sip.c) = a4abe1dcdec3db719a7fd0e5dbefb9c12f6a37db
SHA1 (patch-codecs_codec__dahdi.c) = 77d43907df17b0c1eeb0a1e9e95811c7ef7ae624
-SHA1 (patch-configure) = 4ec1e504cefadd009ecf3cb8305eae2630f8fefb
-SHA1 (patch-configure.ac) = b635426354a7d72b7a0b19c35e700a53f1d96486
+SHA1 (patch-configure) = 53e5ea06ba9796eb6621193364b1131e895944a1
+SHA1 (patch-configure.ac) = fa68fb905ceb8d1ee399d01f60ae70c4b11e77e0
SHA1 (patch-contrib_scripts_vmail.cgi) = 672827eedf315a82a289c82d1ae8b935166e9319
SHA1 (patch-funcs_func__env.c) = 0faf9eafe2a5f1701924973a54d0ab49ba62a3b3
SHA1 (patch-include_asterisk_autoconfig.h.in) = 94de39b7eed7d51ae676415ccaadfdee0cdc4d23
SHA1 (patch-include_asterisk_endian.h) = 1fc20d750da7d0a0407c1e1694b8bb21753acdcd
SHA1 (patch-include_asterisk_lock.h) = ce636ef6102a2a95600cfc8215305507e08fe8f9
+SHA1 (patch-include_asterisk_sha1.h) = 9b233ef82b50b8d94177616e1382991656ce1ebf
SHA1 (patch-include_asterisk_strings.h) = d204488d681e39af6fadf9f054c9e402f4cb8657
SHA1 (patch-main_Makefile) = 7a4449ca3d8a33adc640436fade268285c7e2191
SHA1 (patch-main_acl.c) = 06a9d247b19d648e9ff54ac2a234dc8ac8c023bb
diff --git a/comms/asterisk13/patches/patch-configure b/comms/asterisk13/patches/patch-configure
index 1424746087a..ae3385e7971 100644
--- a/comms/asterisk13/patches/patch-configure
+++ b/comms/asterisk13/patches/patch-configure
@@ -1,4 +1,4 @@
-$NetBSD: patch-configure,v 1.1.1.1 2015/12/05 23:29:10 jnemeth Exp $
+$NetBSD: patch-configure,v 1.2 2016/09/23 17:50:19 jnemeth Exp $
--- configure.orig 2015-10-09 21:48:48.000000000 +0000
+++ configure
@@ -38,26 +38,6 @@ $NetBSD: patch-configure,v 1.1.1.1 2015/12/05 23:29:10 jnemeth Exp $
if test "x$ac_cv_header_sys_poll_h" = xyes; then :
HAS_POLL=1
-@@ -17520,16 +17520,16 @@ if $(${CC} -march=native -S -o /dev/null
- if test "${CONFIG_CFLAGS}" = ""; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
- $as_echo "yes" >&6; }
-- AST_NATIVE_ARCH=1
-+ AST_NATIVE_ARCH=0
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: user CFLAGS present" >&5
- $as_echo "user CFLAGS present" >&6; }
-- AST_NATIVE_ARCH=
-+ AST_NATIVE_ARCH=0
- fi
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
- $as_echo "no" >&6; }
-- AST_NATIVE_ARCH=
-+ AST_NATIVE_ARCH=0
- fi
-
-
@@ -18063,6 +18063,148 @@ fi
diff --git a/comms/asterisk13/patches/patch-configure.ac b/comms/asterisk13/patches/patch-configure.ac
index ebddc53204d..8e397658645 100644
--- a/comms/asterisk13/patches/patch-configure.ac
+++ b/comms/asterisk13/patches/patch-configure.ac
@@ -1,4 +1,4 @@
-$NetBSD: patch-configure.ac,v 1.1.1.1 2015/12/05 23:29:09 jnemeth Exp $
+$NetBSD: patch-configure.ac,v 1.2 2016/09/23 17:50:19 jnemeth Exp $
--- configure.ac.orig 2015-10-09 21:48:48.000000000 +0000
+++ configure.ac
@@ -41,15 +41,6 @@ $NetBSD: patch-configure.ac,v 1.1.1.1 2015/12/05 23:29:09 jnemeth Exp $
)
AC_ARG_ENABLE([internal-poll],
-@@ -1132,7 +1132,7 @@ if $(${CC} -march=native -S -o /dev/null
- fi
- else
- AC_MSG_RESULT(no)
-- AST_NATIVE_ARCH=
-+ AST_NATIVE_ARCH=0
- fi
- AC_SUBST(AST_NATIVE_ARCH)
-
@@ -1236,6 +1236,9 @@ AST_C_DEFINE_CHECK([IP_MTU_DISCOVER], [I
AC_CHECK_HEADER([libkern/OSAtomic.h],
[AC_DEFINE_UNQUOTED([HAVE_OSX_ATOMICS], 1, [Define to 1 if OSX atomic operations are supported.])])
diff --git a/comms/asterisk13/patches/patch-include_asterisk_sha1.h b/comms/asterisk13/patches/patch-include_asterisk_sha1.h
new file mode 100644
index 00000000000..beaf84f84e0
--- /dev/null
+++ b/comms/asterisk13/patches/patch-include_asterisk_sha1.h
@@ -0,0 +1,131 @@
+$NetBSD: patch-include_asterisk_sha1.h,v 1.1 2016/09/23 17:50:19 jnemeth Exp $
+
+--- include/asterisk/sha1.h.orig 2016-09-09 16:14:37.000000000 +0000
++++ include/asterisk/sha1.h
+@@ -191,49 +191,6 @@ typedef struct SHA256Context SHA224Conte
+ typedef struct SHA512Context SHA384Context;
+
+ /*
+- * This structure holds context information for all SHA
+- * hashing operations.
+- */
+-typedef struct USHAContext {
+- int whichSha; /* which SHA is being used */
+- union {
+- SHA1Context sha1Context;
+- SHA224Context sha224Context; SHA256Context sha256Context;
+- SHA384Context sha384Context; SHA512Context sha512Context;
+- } ctx;
+-} USHAContext;
+-
+-/*
+- * This structure will hold context information for the HMAC
+- * keyed-hashing operation.
+- */
+-typedef struct HMACContext {
+- int whichSha; /* which SHA is being used */
+- int hashSize; /* hash size of SHA being used */
+- int blockSize; /* block size of SHA being used */
+- USHAContext shaContext; /* SHA context */
+- unsigned char k_opad[USHA_Max_Message_Block_Size];
+- /* outer padding - key XORd with opad */
+- int Computed; /* Is the MAC computed? */
+- int Corrupted; /* Cumulative corruption code */
+-
+-} HMACContext;
+-
+-/*
+- * This structure will hold context information for the HKDF
+- * extract-and-expand Key Derivation Functions.
+- */
+-typedef struct HKDFContext {
+- int whichSha; /* which SHA is being used */
+- HMACContext hmacContext;
+- int hashSize; /* hash size of SHA being used */
+- unsigned char prk[USHAMaxHashSize];
+- /* pseudo-random key - output of hkdfInput */
+- int Computed; /* Is the key material computed? */
+- int Corrupted; /* Cumulative corruption code */
+-} HKDFContext;
+-
+-/*
+ * Function Prototypes
+ */
+
+@@ -281,76 +238,6 @@ extern int SHA512FinalBits(SHA512Context
+ extern int SHA512Result(SHA512Context *,
+ uint8_t Message_Digest[SHA512HashSize]);
+
+-/* Unified SHA functions, chosen by whichSha */
+-extern int USHAReset(USHAContext *context, SHAversion whichSha);
+-extern int USHAInput(USHAContext *context,
+- const uint8_t *bytes, unsigned int bytecount);
+-extern int USHAFinalBits(USHAContext *context,
+- uint8_t bits, unsigned int bit_count);
+-extern int USHAResult(USHAContext *context,
+- uint8_t Message_Digest[USHAMaxHashSize]);
+-extern int USHABlockSize(enum SHAversion whichSha);
+-extern int USHAHashSize(enum SHAversion whichSha);
+-extern int USHAHashSizeBits(enum SHAversion whichSha);
+-extern const char *USHAHashName(enum SHAversion whichSha);
+-
+-/*
+- * HMAC Keyed-Hashing for Message Authentication, RFC 2104,
+- * for all SHAs.
+- * This interface allows a fixed-length text input to be used.
+- */
+-extern int hmac(SHAversion whichSha, /* which SHA algorithm to use */
+- const unsigned char *text, /* pointer to data stream */
+- int text_len, /* length of data stream */
+- const unsigned char *key, /* pointer to authentication key */
+- int key_len, /* length of authentication key */
+- uint8_t digest[USHAMaxHashSize]); /* caller digest to fill in */
+-
+-/*
+- * HMAC Keyed-Hashing for Message Authentication, RFC 2104,
+- * for all SHAs.
+- * This interface allows any length of text input to be used.
+- */
+-extern int hmacReset(HMACContext *context, enum SHAversion whichSha,
+- const unsigned char *key, int key_len);
+-extern int hmacInput(HMACContext *context, const unsigned char *text,
+- int text_len);
+-extern int hmacFinalBits(HMACContext *context, uint8_t bits,
+- unsigned int bit_count);
+-extern int hmacResult(HMACContext *context,
+- uint8_t digest[USHAMaxHashSize]);
+-
+-/*
+- * HKDF HMAC-based Extract-and-Expand Key Derivation Function,
+- * RFC 5869, for all SHAs.
+- */
+-extern int hkdf(SHAversion whichSha, const unsigned char *salt,
+- int salt_len, const unsigned char *ikm, int ikm_len,
+- const unsigned char *info, int info_len,
+- uint8_t okm[ ], int okm_len);
+-extern int hkdfExtract(SHAversion whichSha, const unsigned char *salt,
+- int salt_len, const unsigned char *ikm,
+- int ikm_len, uint8_t prk[USHAMaxHashSize]);
+-extern int hkdfExpand(SHAversion whichSha, const uint8_t prk[ ],
+- int prk_len, const unsigned char *info,
+- int info_len, uint8_t okm[ ], int okm_len);
+-
+-/*
+- * HKDF HMAC-based Extract-and-Expand Key Derivation Function,
+- * RFC 5869, for all SHAs.
+- * This interface allows any length of text input to be used.
+- */
+-extern int hkdfReset(HKDFContext *context, enum SHAversion whichSha,
+- const unsigned char *salt, int salt_len);
+-extern int hkdfInput(HKDFContext *context, const unsigned char *ikm,
+- int ikm_len);
+-extern int hkdfFinalBits(HKDFContext *context, uint8_t ikm_bits,
+- unsigned int ikm_bit_count);
+-extern int hkdfResult(HKDFContext *context,
+- uint8_t prk[USHAMaxHashSize],
+- const unsigned char *info, int info_len,
+- uint8_t okm[USHAMaxHashSize], int okm_len);
+-
+ /************************ sha-private.h ************************/
+ /***************** See RFC 6234 for details. *******************/
+ /*