#include "config.h"
-#include <glib.h>
#include <epan/packet.h>
#include <epan/expert.h>
#include <epan/oids.h>
#include <epan/asn1.h>
#include <epan/prefs.h>
-#include <epan/wmem/wmem.h>
#include "packet-ber.h"
#include "packet-pkcs12.h"
#include "packet-x509if.h"
#include "packet-cms.h"
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-
-#ifdef HAVE_LIBGCRYPT
#include <wsutil/wsgcrypt.h>
-#endif
#define PNAME "PKCS#12: Personal Information Exchange"
#define PSNAME "PKCS12"
static int proto_pkcs12 = -1;
static int hf_pkcs12_X509Certificate_PDU = -1;
+static int hf_pkcs12_AuthenticatedSafe_PDU = -1; /* AuthenticatedSafe */
static gint ett_decrypted_pbe = -1;
static expert_field ei_pkcs12_octet_string_expected = EI_INIT;
{
const char *name = NULL;
- name = oid_resolved_from_string(oid);
+ name = oid_resolved_from_string(wmem_packet_scope(), oid);
proto_item_append_text(tree, " (%s)", name ? name : oid);
}
if (pw == NULL)
pwlen = 0;
else
- pwlen = strlen (pw);
+ pwlen = strlen(pw);
if (pwlen > 63 / 2)
{
salt = NULL;
}
-int PBE_decrypt_data(const char *object_identifier_id_param, tvbuff_t *encrypted_tvb, asn1_ctx_t *actx, proto_item *item)
+int PBE_decrypt_data(const char *object_identifier_id_param _U_, tvbuff_t *encrypted_tvb _U_, asn1_ctx_t *actx _U_, proto_item *item _U_)
{
#ifdef HAVE_LIBGCRYPT
const char *encryption_algorithm;
tvb_set_free_cb(clear_tvb, g_free);
name = g_string_new("");
- oidname = oid_resolved_from_string(object_identifier_id_param);
+ oidname = oid_resolved_from_string(wmem_packet_scope(), object_identifier_id_param);
g_string_printf(name, "Decrypted %s", oidname ? oidname : object_identifier_id_param);
/* add it as a new source */
{ "X509Certificate", "pkcs12.X509Certificate",
FT_NONE, BASE_NONE, NULL, 0,
"pkcs12.X509Certificate", HFILL }},
+ { &hf_pkcs12_AuthenticatedSafe_PDU,
+ { "AuthenticatedSafe", "pkcs12.AuthenticatedSafe",
+ FT_UINT32, BASE_DEC, NULL, 0,
+ NULL, HFILL }},
+
#include "packet-pkcs12-hfarr.c"
};