The PR adds a high-level regression test suite by capturing a set of reference outputs from the otptool and socsec scripts.
There's no attempt to validate the reference binaries against the intent of the input configurations, rather the reference binaries exist to identify changes in behaviour as the scripts evolve over time. This allows us to more freely make changes to the code, because we know if we cause an unintended change in behaviour it should be caught by the regression tests.
In developing the tests I encountered the issue described in #1. This pull-request includes the fix suggested in the issue.
I've also patched socsec to act in a deterministic way so we get binary outputs that are bit-for-bit equivalent to the reference binaries. This mainly involved fixing the source of IV data.
Hello,
The PR adds a high-level regression test suite by capturing a set of reference outputs from the
otptool
andsocsec
scripts.There's no attempt to validate the reference binaries against the intent of the input configurations, rather the reference binaries exist to identify changes in behaviour as the scripts evolve over time. This allows us to more freely make changes to the code, because we know if we cause an unintended change in behaviour it should be caught by the regression tests.
In developing the tests I encountered the issue described in #1. This pull-request includes the fix suggested in the issue.
I've also patched socsec to act in a deterministic way so we get binary outputs that are bit-for-bit equivalent to the reference binaries. This mainly involved fixing the source of IV data.
Please review!
Andrew