Skip to content

Conversation

@gojimmypi
Copy link
Contributor

After several occasions where I had (undesired, unexpected) keystore test files in varying directories....

Here are DOS and Bash scripts to check for the default keystore files in the entire tree (and other branches):

  • wolfboot_signing_private_key.der
  • keystore.der
  • keystore.c

Required git and run in repo directory.

Example, bash

gojimmypi:/mnt/c/workspace/wolfboot-gojimmypi
$ ./tools/scripts/keystore_file_check.sh
./tools/scripts/keystore_file_check.sh v1.0

Confirmed git is installed: git version 2.34.1
Starting ./tools/scripts/keystore_file_check.sh from /mnt/c/workspace/wolfboot-gojimmypi
=== Searching for name: wolfboot_signing_private_key.der ===
Current branch dev has Paths in current branch dev:
  ./wolfboot_signing_private_key.der
1 file(s) named wolfboot_signing_private_key.der
No matches in other branches.

=== Searching for name: keystore.der ===
Current branch dev has Paths in current branch dev:
  ./include/keystore.der
1 file(s) named keystore.der
No matches in other branches.

=== Searching for name: keystore.c ===
Current branch dev has Paths in current branch dev:
  ./keystore.c
  ./src/keystore.c
2 file(s) named keystore.c
Matches in other branches:
  master:IDE/MPLAB/test/keystore.c
  pr-visualgdb-stm32l4-makefile:IDE/MPLAB/test/keystore.c

Example, DOS batch file:

C:\workspace\wolfBoot-gojimmypi>.\tools\scripts\keystore_file_check.bat
Starting keystore_file_check.bat from C:\workspace\wolfBoot-gojimmypi
=== Searching for name: wolfboot_signing_private_key.der ===
Paths in current branch:
  .\wolfboot_signing_private_key.der
Current branch dev has 1 file(s) named wolfboot_signing_private_key.der
No matches in other branches.

=== Searching for name: keystore.der ===
Paths in current branch:
  .\include\keystore.der
Current branch dev has 1 file(s) named keystore.der
No matches in other branches.

=== Searching for name: keystore.c ===
Paths in current branch:
  .\keystore.c
  .\src\keystore.c
Current branch dev has 2 file(s) named keystore.c
Matches in other branches:
  master:IDE/MPLAB/test/keystore.c
  pr-visualgdb-stm32l4-makefile:IDE/MPLAB/test/keystore.c

Copy link
Member

@danielinux danielinux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems superfluous, I'm not sure I understand why we would need such a tool

@danielinux
Copy link
Member

I'll go ahead and close this one. I don't see how this could be useful for other users

@danielinux danielinux closed this Nov 10, 2025
@danielinux
Copy link
Member

also a find one-liner does the same without adding complex scripts to maintain

gojimmypi added a commit to gojimmypi/wolfBoot that referenced this pull request Nov 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants