1. May 01, 2021
  2. Apr 02, 2021
  3. Mar 31, 2021
  4. Mar 17, 2021
  5. Mar 03, 2021
  6. Feb 22, 2021
    • Richard Levitte's avatar
      Always cNORM before "\n" · b56b7ee0
      Richard Levitte authored
      Using cNORM after "\n" may or may not work, probably because of the
      line buffered nature of standard output.
      
      If an error is displayed immediately after a printf that has cNORM
      after "\n", the error output sometimes "overrides" the cNORM, and you
      may end up with a surprisingly colorful error message, not to mention
      that this may also affect your prompt in the same manner.
      
      The lesson is to always output cNORM before the ending "\n".
      b56b7ee0
    • Richard Levitte's avatar
      Modify installation instructions for gost-engine library and module · bc111014
      Richard Levitte authored
      - Simplify the installation of libraries and programs to simply use
        defaults.
      - Install only the gost engine in module form into the OpenSSL engine
        directory.
      - Install the gostsum and gost12sum manuals in the normal man1 directory,
        as there's really no reason to install them among OpenSSL stuff
        specifically.
      - Install the cmake configuration file.
      bc111014
    • Richard Levitte's avatar
      Also build gost-engine in library form · d9a2b297
      Richard Levitte authored
      In this form, the GOST engine isn't loadable through OpenSSL's dynamic
      ENGINE loader, but directly as its own function, ENGINE_load_gost().
      After making that call, the engine functionality can be used as usual.
      This includes a public header file called gost-engine.h, which declares
      that functions.
      
      This also rearranges the code in gost_eng.c, as the binding
      functionality was spread around in the file.  Now, it's all nicely
      tucked at the end.
      d9a2b297
  7. Feb 21, 2021
  8. Feb 20, 2021
  9. Feb 18, 2021
  10. Feb 17, 2021
  11. Feb 16, 2021
    • Richard Levitte's avatar
      Remove the use of test/run_tests in favor of 'prove' · 4573beda
      Richard Levitte authored
      'prove' is a well developed TAP harness program, there's no real need
      to write one's own.
      
      We do need to set certain paths properly for the appropriate 'openssl'
      program to be run.  We do that with a 'prove' plugin (WrapOpenSSL.pm)
      that simply amends the appropriate system environment variables, given
      a number of cmake generated environment variables that indicate where
      OpenSSL files reside.
      4573beda
  12. Feb 15, 2021
    • Richard Levitte's avatar
      Move gost_cmds[] from gost_ctl.c to gost_eng.c · f2bbf8ca
      Richard Levitte authored
      This make that array uniquely belonging to the engine proper, while
      leaving the more generic gost parameters functionality in the
      gost_core library.
      f2bbf8ca
    • Richard Levitte's avatar
      Cleanup source organisation, and make 'gost' an actual module · c8666fa2
      Richard Levitte authored
      GOST_CORE_SOURCE_FILES and GOST_ENGINE_SOURCE_FILES were a bit
      disorganised, they are now re-arranged so GOST_ENGINE_SOURCE_FILES
      contains ENGINE specific source only, and what was less ENGINE
      specific was moved to GOST_CORE_SOURCE_FILES.  Furthermore,
      GOST_LIB_SOURCE_FILES now includes GOST_CORE_SOURCE_FILES, so the
      gost_core library is complete with all implementations.
      
      As a consequence, 'gost' is now explicitly made into a dlopenable
      module.  On some operating systems, that makes a difference.
      
      This paves the way for alternative implementations based on the same
      base code, such as a provider implementation.
      
      It's quite possible that the re-arrangement done here isn't "pure"
      enough.  Future development will tell.
      c8666fa2
  13. Feb 07, 2021
  14. Jan 21, 2021
  15. Jan 08, 2021
  16. Dec 06, 2020
    • Alexei A. Smekalkine's avatar
      gost_crypt: process full available block in CFB and CNT mode · 711b83cb
      Alexei A. Smekalkine authored
      If at the input of the encryption function in the CFB mode we have
      an integer number of blocks, then in the main loop all blocks will be
      processed, except for the last one due to an incorrect border check.
      The last block will be fully processed as a "partial" remainder, but
      the initialization vector will not be updated. And, thus, the value
      of IV will always be incorrect in this case.
      
      This breaks stateless protocols due to an invalid initialization vector:
      all messages except the first cannot be decrypted. (Naturally, we are
      talking about a case with disabled key meshing, which does not allow
      context recovery due to an erroneous implementation.)
      
      It is worth noting here that the code for processing partial blocks
      (both at the input of the encryption functions and at the output) is
      a historically unnecessary artifact, since we do not set the
      EVP_CIPH_FLAG_CUSTOM_CIPHER flag and, as a result, OpenSSL processes
      partial blocks for us.
      
      This patch corrects the checking of the main loop boundary.
      
      A similar error is present in the code for the CNT mode, but there it
      does not manifest itself in any way, because the restoration of the
      state in this mode is impossible: even after disabling key meshing, we
      still have the state-dependent transformation of the IV.
      
      As an extra result of this fix, the code for processing partial blocks
      can be completely removed now.
      
      (cherry picked from commit cf402dd4)
      711b83cb
  17. Nov 29, 2020
  18. Nov 20, 2020
  19. Nov 13, 2020
  20. Nov 05, 2020
  21. Oct 29, 2020
    • Vitaly Chikunov's avatar
      CMakeLists.txt: Fix warning on gcc-9 · 6c7addf7
      Vitaly Chikunov authored
      /root/rpmbuild/BUILD/openssl-gost-engine-1.1.1/CMakeFiles/CMakeTmp/src.c:4:14: warning: initialization of 'int *' from incompatible pointer type 'char *' [-Wincompatible-pointer-types]
          4 |     int *p = buf + 1;
            |              ^~~
      /root/rpmbuild/BUILD/openssl-gost-engine-1.1.1/CMakeFiles/CMakeTmp/src.c:5:14: warning: initialization of 'int *' from incompatible pointer type 'char *' [-Wincompatible-pointer-types]
          5 |     int *q = buf + 2;
            |              ^~~
      
      Reported-by: Ilya Shipitsin <https://github.com/chipitsine>
      Fixes: #288
      6c7addf7
  22. Oct 09, 2020
  23. Oct 04, 2020
  24. Sep 27, 2020
  25. Sep 24, 2020
  26. Sep 21, 2020
  27. Sep 18, 2020