aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-snmp.h
diff options
context:
space:
mode:
authorOlivier Verriest <verri@x25.pm>2017-07-30 14:07:43 +0000
committerAnders Broman <a.broman58@gmail.com>2017-08-04 05:57:20 +0000
commit97dcf87a868a51502e1ea6a90cd7a9ee3bbc59cf (patch)
tree515ca0088d46d38596809d6d4957ecff20ba7120 /epan/dissectors/packet-snmp.h
parentdc69a8446ee47fd6d38d4fb4416db89ef5487696 (diff)
SNMP: add support for USM SHA-2 algorithms (RFC 7860)
Generlize the USM handling and add support for HMAC-SHA-2 authentication protocols. Change-Id: I7cca2f24db61620423fded078c680322aff86400 Reviewed-on: https://code.wireshark.org/review/22846 Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl> Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-snmp.h')
-rw-r--r--epan/dissectors/packet-snmp.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/epan/dissectors/packet-snmp.h b/epan/dissectors/packet-snmp.h
index aaa09a85a5..11e2f2bd48 100644
--- a/epan/dissectors/packet-snmp.h
+++ b/epan/dissectors/packet-snmp.h
@@ -39,20 +39,21 @@ typedef struct _snmp_usm_key {
typedef struct _snmp_ue_assoc_t snmp_ue_assoc_t;
typedef struct _snmp_usm_params_t snmp_usm_params_t;
-typedef gboolean (*snmp_usm_authenticator_t)(snmp_usm_params_t*, guint8** calc_auth, guint* calc_auth_len, gchar const** error);
typedef tvbuff_t* (*snmp_usm_decoder_t)(snmp_usm_params_t*, tvbuff_t* encryptedData, packet_info *pinfo, gchar const** error);
-typedef void (*snmp_usm_password_to_key_t)(const guint8 *password, guint passwordlen, const guint8 *engineID, guint engineLength, guint8 *key);
-typedef struct _snmp_usm_auth_model_t {
- snmp_usm_password_to_key_t pass2key;
- snmp_usm_authenticator_t authenticate;
- guint key_size;
+typedef enum _snmp_usm_auth_model_t {
+ SNMP_USM_AUTH_MD5 = 0,
+ SNMP_USM_AUTH_SHA1,
+ SNMP_USM_AUTH_SHA2_224,
+ SNMP_USM_AUTH_SHA2_256,
+ SNMP_USM_AUTH_SHA2_384,
+ SNMP_USM_AUTH_SHA2_512
} snmp_usm_auth_model_t;
typedef struct _snmp_user_t {
snmp_usm_key_t userName;
- snmp_usm_auth_model_t* authModel;
+ snmp_usm_auth_model_t authModel;
snmp_usm_key_t authPassword;
snmp_usm_key_t authKey;