]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
save-keys: Add warning message to log if keys are being saved
authorTobias Brunner <tobias@strongswan.org>
Thu, 15 Feb 2018 09:04:47 +0000 (10:04 +0100)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Thu, 15 Feb 2018 22:03:29 +0000 (23:03 +0100)
src/libcharon/plugins/save_keys/save_keys_listener.c

index 72e3dadf15f668ddf757b7823d7e78b2cf7998d3..fc16f20e66a9fa2be87e7907c359c3f8a904409c 100644 (file)
@@ -415,5 +415,21 @@ save_keys_listener_t *save_keys_listener_create()
                                                                           FALSE, lib->ns),
        );
 
+       if (this->path && (this->ike || this->esp))
+       {
+               char *keys = "IKE";
+
+               if (this->ike && this->esp)
+               {
+                       keys = "IKE AND ESP";
+               }
+               else if (this->esp)
+               {
+                       keys = "ESP";
+               }
+               DBG0(DBG_DMN, "!!", keys, this->path);
+               DBG0(DBG_DMN, "!! WARNING: SAVING %s KEYS TO '%s'", keys, this->path);
+               DBG0(DBG_DMN, "!!", keys, this->path);
+       }
        return &this->public;
 }