]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
pem: Clear possibly unencrypted key file from memory
authorTobias Brunner <tobias@strongswan.org>
Thu, 30 Sep 2021 13:33:40 +0000 (15:33 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 4 Oct 2021 09:30:03 +0000 (11:30 +0200)
src/libstrongswan/plugins/pem/pem_builder.c

index 9ca96a4d218e59736d022a99c18ee03ba3ea1a95..bdf0aec9ae606f09539173cd6490cbe42025fc3b 100644 (file)
@@ -450,7 +450,7 @@ static void *load_from_file(char *file, credential_type_t type, int subtype,
                return NULL;
        }
        cred = load_from_blob(*chunk, type, subtype, subject, flags);
-       chunk_unmap(chunk);
+       chunk_unmap_clear(chunk);
        return cred;
 }