]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
swanctl: Clear possibly unencrypted key/container files from memory
authorTobias Brunner <tobias@strongswan.org>
Thu, 30 Sep 2021 13:37:46 +0000 (15:37 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 4 Oct 2021 09:30:03 +0000 (11:30 +0200)
src/swanctl/commands/load_creds.c

index 2c1947dd1eaddf6fc386c2bb1bd76a098c285f8a..c6c24d2337473aa00a0222c0e2e83d2aa3bf9c3a 100644 (file)
@@ -445,7 +445,7 @@ static void load_keys(load_ctx_t *ctx, char *type, char *dir)
                                        {
                                                load_key(ctx, path, type, *map);
                                        }
-                                       chunk_unmap(map);
+                                       chunk_unmap_clear(map);
                                }
                                else
                                {
@@ -552,7 +552,7 @@ static void load_containers(load_ctx_t *ctx, char *type, char *dir)
                                if (map)
                                {
                                        load_encrypted_container(ctx, rel, path, type, *map);
-                                       chunk_unmap(map);
+                                       chunk_unmap_clear(map);
                                }
                                else
                                {