wolfssl-examples
wolfssl-examples copied to clipboard
Deflagify
A branch un-implements the modes as flags (e.g., -keygen
became keygen
). The way it is done is to let the non-flag arguments float to the end of argv (thanks to getopt), use the first non-flag argument as the mode, and pass an offset integer to all of the setups. This offset tells the setup where that first non-flag argument is, which will always be the mode name (e.g., "keygen"). From there, where the setups previously looked for argv[2]
they now look for argv[offset+1]
.