Skip to content
Snippets Groups Projects
  1. Mar 13, 2021
  2. Feb 23, 2021
    • Simon Tatham's avatar
      Fix cgtest again. · ee6b0724
      Simon Tatham authored
      When I added the fmt_version field to ppk_save_parameters, I forgot to
      fill it in in the special version of that struct used by cgtest.
      Without that, it defaulted to 0, triggering an assertion failure.
      ee6b0724
  3. Feb 21, 2021
    • Simon Tatham's avatar
      Fix determinism failures in cgtest. · 8eb4cd56
      Simon Tatham authored
      Thanks to Pavel and his CI for pointing out what I'd forgotten: the
      automated test of cmdgen.c expects that round-tripping a PPK file to
      some other format and back will regenerate the identical file. Of
      course, with a randomised salt in the new-look password hash, that
      isn't true any more in normal usage.
      
      Fixed by adding an option in the existing parameters structure to
      provide a salt override. That shouldn't be used anywhere except
      cgtest, but in cgtest, it restores the determinism we need.
      
      Another potential (but not guaranteed) source of difference is the
      automatic time-scaling of the Argon2 parameter choice. So I've turned
      that off too, while I'm at it.
      8eb4cd56
  4. Feb 02, 2020
    • Simon Tatham's avatar
      Move the code for cgtest into cgtest.c. · be30aac1
      Simon Tatham authored
      I don't really know why it was still in cmdgen.c at all. There's no
      reason it shouldn't live in its own source file, and keep cmdgen.c for
      the actual code of the key generation program!
      be30aac1
  5. Mar 30, 2016
    • Simon Tatham's avatar
      cmdgen: rescue test suite from bit rot. · 3e40566b
      Simon Tatham authored
      cmdgen.c has contained code for ages to build a test main() if you
      compile with -DTEST_CMDGEN. But it's painful to do so manually, since
      you've still got to link in all the same supporting objects, and also
      nobody can have actually done that for a while because the stub test
      code hasn't been kept up to date with changes in the internal APIs
      (specifically prompt_t).
      
      Now we have the ability to include our test programs in Recipe as [UT]
      or [XT] so as to leave them out of 'make install', that seems like a
      useful thing to do with cmdgen's test suite. So here's a Recipe change
      that builds it as 'cgtest', plus fixes for compiler warnings and bit
      rot. Pleasantly, the test suite still _passes_ after those are fixed.
      3e40566b
Loading