charon.plugins.save-keys.load := no
Whether to load the plugin.
+charon.plugins.save-keys.esp = no
+ Whether to save ESP keys.
+
+charon.plugins.save-keys.ike = no
+ Whether to save IKE keys.
+
charon.plugins.save-keys.wireshark_keys
Directory where the keys are stored in the format supported by Wireshark
+/*
+ * Copyright (C) 2018 Tobias Brunner
+ * HSR Hochschule fuer Technik Rapperswil
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ */
/*
* Copyright (C) 2016 Codrut Cristian Grosu (codrut.cristian.grosu@gmail.com)
* Copyright (C) 2016 IXIA (http://www.ixiacom.com)
* Path to the directory where the decryption tables will be stored.
*/
char *path;
+
+ /**
+ * Whether to save IKE keys
+ */
+ bool ike;
+
+ /**
+ * Whether to save ESP keys
+ */
+ bool esp;
};
METHOD(save_keys_listener_t, destroy, void,
char *path, *name;
FILE *file;
- if (!this->path)
+ if (!this->path || !this->ike)
{
return TRUE;
}
char *path, *family;
FILE *file;
- if (!this->path || child_sa->get_protocol(child_sa) != PROTO_ESP)
+ if (!this->path || !this->esp ||
+ child_sa->get_protocol(child_sa) != PROTO_ESP)
{
return TRUE;
}
.path = lib->settings->get_str(lib->settings,
"%s.plugins.save-keys.wireshark_keys",
NULL, lib->ns),
+ .esp = lib->settings->get_bool(lib->settings,
+ "%s.plugins.save-keys.esp",
+ FALSE, lib->ns),
+ .ike = lib->settings->get_bool(lib->settings,
+ "%s.plugins.save-keys.ike",
+ FALSE, lib->ns),
);
return &this->public;