From 5181a4b5e782e3a81b33ccb839d505fa3a646c33 Mon Sep 17 00:00:00 2001
From: Dmitry Petrov <dmitry.petrov@rtsoft.de>
Date: Mon, 8 May 2023 15:17:27 +0200
Subject: [PATCH] Set EX_SSS_BOOT_DO_ERASE to 0

If set to 1, all objects, which are handled by Secure chip except for
predefined ones, are deleted when a client application starts.
This breaks the logic of existing example, and functions "getbinkey",
"erasekey", and "decryptaes" start to fail because a requested key is
already removed when ex_sss_entry() is called.
---
 src/se05x-aes-key.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/se05x-aes-key.c b/src/se05x-aes-key.c
index 9f6af80..4a50b52 100644
--- a/src/se05x-aes-key.c
+++ b/src/se05x-aes-key.c
@@ -17,7 +17,7 @@
 static ex_sss_boot_ctx_t gex_sss_symmetric_boot_ctx;
 
 #define EX_SSS_BOOT_PCONTEXT (&gex_sss_symmetric_boot_ctx)
-#define EX_SSS_BOOT_DO_ERASE 1
+#define EX_SSS_BOOT_DO_ERASE 0
 #define EX_SSS_BOOT_EXPOSE_ARGC_ARGV 1
 
 #define MAX_FILE_NAME_SIZE 255
-- 
GitLab