aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-zbee-security.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2015-01-18 13:02:15 -0800
committerGuy Harris <guy@alum.mit.edu>2015-01-18 21:02:40 +0000
commit050bc7d100e9846663ac2c14eadde15e9cd9fdb9 (patch)
tree29b58df68f42d396d1507e89df1e9d8631713368 /epan/dissectors/packet-zbee-security.c
parent929d41c6856139168c441a14498210d31574de97 (diff)
Update some comments to reflect reality.
Get rid of references to ep_ and se_ allocation in code that now uses wmem allocation instead. Fix API documentation of conversation_table.h routines to reflect that as well - some APIs changed to pass wmem scopes. Also, zbee_sec_key_hash() now takes the output buffer as an argument and just returns it, and nobody actually uses the return value, so change it to return void. Change-Id: Ife1ec675a9322fd0f0be306a9d639ec17aad1c7a Reviewed-on: https://code.wireshark.org/review/6636 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-zbee-security.c')
-rw-r--r--epan/dissectors/packet-zbee-security.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/epan/dissectors/packet-zbee-security.c b/epan/dissectors/packet-zbee-security.c
index ea2fd1e3bc..c2312a1b1f 100644
--- a/epan/dissectors/packet-zbee-security.c
+++ b/epan/dissectors/packet-zbee-security.c
@@ -47,7 +47,7 @@
/* Helper Functions */
#ifdef HAVE_LIBGCRYPT
-static guint8 * zbee_sec_key_hash(guint8 *, guint8, guint8 *);
+static void zbee_sec_key_hash(guint8 *, guint8, guint8 *);
static void zbee_sec_make_nonce (zbee_security_packet *, guint8 *);
static gboolean zbee_sec_decrypt_payload(zbee_security_packet *, const gchar *, const gchar, guint8 *,
guint, guint, guint8 *);
@@ -1213,18 +1213,15 @@ zbee_sec_hash(guint8 *input, guint input_len, guint8 *output)
* ipad = 0x36 repeated.
* opad = 0x5c repeated.
* H() = ZigBee Cryptographic Hash (B.1.3 and B.6).
- *
- * The output of this function is an ep_alloced buffer containing
- * the key-hashed output, and is garaunteed never to return NULL.
* PARAMETERS
- * guint8 *key - ZigBee Security Key (must be ZBEE_SEC_CONST_KEYSIZE) in length.
- * guint8 input - ZigBee CCM* Nonce (must be ZBEE_SEC_CONST_NONCE_LEN) in length.
- * packet_info *pinfo - pointer to packet information fields
+ * guint8 *key - ZigBee Security Key (must be ZBEE_SEC_CONST_KEYSIZE) in length.
+ * guint8 input - ZigBee CCM* Nonce (must be ZBEE_SEC_CONST_NONCE_LEN) in length.
+ * guint8 *hash_out - buffer into which the key-hashed output is placed
* RETURNS
- * guint8*
+ * void
*---------------------------------------------------------------
*/
-static guint8 *
+static void
zbee_sec_key_hash(guint8 *key, guint8 input, guint8 *hash_out)
{
guint8 hash_in[2*ZBEE_SEC_CONST_BLOCKSIZE];
@@ -1244,7 +1241,6 @@ zbee_sec_key_hash(guint8 *key, guint8 input, guint8 *hash_out)
zbee_sec_hash(hash_out, ZBEE_SEC_CONST_BLOCKSIZE+1, hash_in+ZBEE_SEC_CONST_BLOCKSIZE);
/* Hash the contents of hash_in to get the final result. */
zbee_sec_hash(hash_in, 2*ZBEE_SEC_CONST_BLOCKSIZE, hash_out);
- return hash_out;
} /* zbee_sec_key_hash */
#else /* HAVE_LIBGCRYPT */
gboolean