3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 2001 Gerald Combs
7 * SPDX-License-Identifier: GPL-2.0-or-later
11 #include "secrets-types.h"
13 const char* secrets_type_description(uint32_t type
)
16 /* value_string from file-pcapng.c
17 * XXX: value_string is defined in epan. Perhaps some of the
18 * functions (not the ones that allocate in wmem_packet_scope())
19 * should be moved to wsutil so that other libraries can use them
20 * (capinfos, etc. don't link with libwireshark).
22 static const value_string secrets_types_vals
[] = {
23 { SECRETS_TYPE_TLS
, "TLS Key Log" },
24 { SECRETS_TYPE_SSH
, "SSH Key Log" },
25 { SECRETS_TYPE_WIREGUARD
, "WireGuard Key Log" },
26 { SECRETS_TYPE_ZIGBEE_NWK_KEY
, "Zigbee NWK Key" },
27 { SECRETS_TYPE_ZIGBEE_APS_KEY
, "Zigbee APS Key" },
28 { SECRETS_TYPE_OPCUA
, "OPC UA Key Log" },
31 return val_to_str_const(type
, secrets_types_vals
, "Unknown");
34 case SECRETS_TYPE_TLS
:
36 case SECRETS_TYPE_SSH
:
38 case SECRETS_TYPE_WIREGUARD
:
39 return "WireGuard Key Log";
40 case SECRETS_TYPE_ZIGBEE_NWK_KEY
:
41 return "Zigbee NWK Key";
42 case SECRETS_TYPE_ZIGBEE_APS_KEY
:
43 return "Zigbee APS Key";
44 case SECRETS_TYPE_OPCUA
:
45 return "OPC UA Key Log";