]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
pkcs12: Make sure to wipe potentially decrypted PKCS#7 data
authorTobias Brunner <tobias@strongswan.org>
Tue, 11 Jul 2023 09:44:11 +0000 (11:44 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 26 Jul 2023 13:08:33 +0000 (15:08 +0200)
src/libstrongswan/plugins/pkcs12/pkcs12_decode.c

index 6f8f06f271d7e181dcd4d121823e7909e9451360..bed02cc423119a204c8a1de8f6656d6979cd4f52 100644 (file)
@@ -307,10 +307,10 @@ static bool parse_authenticated_safe(private_pkcs12_t *this, chunk_t blob)
                                if (!parse_safe_contents(this, parser->get_level(parser)+1,
                                                                                 data))
                                {
-                                       chunk_free(&data);
+                                       chunk_clear(&data);
                                        goto end;
                                }
-                               chunk_free(&data);
+                               chunk_clear(&data);
                                break;
                        }
                }