]> feistymeow.org Git - feisty_meow.git/commitdiff
cleaning out inadvertent references to blowfish dev
authorFred Hamster <fred@gruntose.com>
Tue, 6 Oct 2026 23:15:10 +0000 (19:15 -0400)
committerFred Hamster <fred@gruntose.com>
Tue, 6 Oct 2026 23:15:10 +0000 (19:15 -0400)
trying to minimize how much we refer to the almighty non-working blowfish at this point.

nucleus/library/crypto/cryptical_envelopment.cpp
nucleus/library/crypto/ssl_init.cpp
nucleus/library/crypto/ssl_init.h
nucleus/library/filesystem/huge_file.cpp
nucleus/library/tests_crypto/test_blowfish_crypto.cpp
nucleus/library/unit_test/unit_base.h

index d90af5c78651535facd11d972220258b9178befd..1d125010f1d9f1faac6efd958979ec8cf920420a 100644 (file)
@@ -23,7 +23,6 @@
 #include <mathematics/chaos.h>
 #include <structures/static_memory_gremlin.h>
 
-///#include <openssl/blowfish.h>
 #include <openssl/err.h>
 #include <openssl/evp.h>
 
@@ -35,13 +34,7 @@ using namespace structures;
 namespace crypto {
 
 const int FUDGE = 1024;
-  /* extra space for the cipher's block size.  blowfish, e.g., is only 8 bytes for
-  the cipher block size, so we'd only ever need possibly 8 bytes padding?
-  */
-//hmmm: guarantee the fudge space is enough for other algorithms!
-
-//#undef set_key
-  // get rid of a macro we don't want.
+  /* extra space for the cipher's block size. */
 
 //#define DEBUG_CRYPTICAL_ENVELOPMENT
   // uncomment for noisier version.
@@ -178,7 +171,12 @@ bool cryptical_envelopment::generate_key(int size, byte_array &new_key)
   for (int i = 0; i < bytes; i++)
     new_key[i] = static_ssl_initializer().randomizer().inclusive(0, 255);
 
-//code that we thought might be necessary but which doesn't help blowfish not suck.
+/*
+  the wipe unused bits code... we thought this might be necessary at one
+  point, but have never found it to help anything.  doesn't seem to impede
+  twofish from working properly, but that doesn't mean we leave it turned
+  on.  yuck.
+*/
 //#define WIPE_UNUSED_BITS
 #ifdef WIPE_UNUSED_BITS
   // clear the bits that cannot be non-zero for a key whose bits are not evenly divisible by 8.
index ea9d45b16bf58dc7e4845033acba47ec29cbec91..ed202d2675cb180a86bacd6109e1301b0d768cfe 100644 (file)
@@ -59,7 +59,7 @@ ssl_init::ssl_init()
   FUNCDEF("ctor");
 
   LOG("prior to provider setup");
-  // new code needed because blowfish is considered legacy code now.  ugh.
+  // load the legacy provider to get access to blowfish and other antiques.
   c_legacy_provider = OSSL_PROVIDER_load(NULL_POINTER, "legacy");
   if (!c_legacy_provider) {
     ALWAYS_LOG("failed to load legacy openssl provider!  mega boofer fail!");
index fbda4516d3d22125c41b649f8d0be475ef8891d3..a181d6b90e88c9fac3d2df4c74d65495a702bd67 100644 (file)
@@ -25,7 +25,7 @@ struct ossl_provider_st;
 
 namespace crypto {
 
-//! provides some initialization for the RSA and blowfish crypto.
+//! provides some initialization for the cryptography engines.
 /*!
   This class does the SSL initialization needed before any functions can
   be used.  It also sets up the random seed for SSL.  NOTE: you should never
@@ -33,8 +33,10 @@ namespace crypto {
   very bottom and it will be managed globally for the entire program.
 */
 
-// we define NEWER_OPENSSL for those places where we're using more recent versions.
-// this forces the code to choose newer methods over deprecated ones.
+/*
+  we define NEWER_OPENSSL for those places where we're using more recent versions.
+  this forces the code to choose newer methods over deprecated ones.
+*/
 #if OPENSSL_VERSION_NUMBER > 0x10100000L
   #define NEWER_OPENSSL
 #endif
index 5d8e7dc0db9393ba887ff9c9d7b1d37a7d8bd9b5..1786061727efafd4a41d8ae5e9b4f2152b3c092b 100644 (file)
@@ -316,7 +316,7 @@ basis::outcome huge_file::touch()
     byte_array junk(1);
     int written;
     outcome ret = write(junk, written);
-    if (ret != OKAY) ret;
+    if (ret != OKAY) return ret;
     if (!truncate())
       return FAILURE;
   }
index 41d5f22b9c075e2495ca2a04139f9e3960de25aa..d51605dc59805200490e025e8cdd27fa90b533de 100644 (file)
@@ -97,8 +97,10 @@ int test_blowfish::execute()
   LOG("starting blowfish test...");
 #endif
 
-  // a known hack--we have bad failures in this test, thanks to openssl as far
-  // as we can tell.  so we signal not to fail in the test results.
+  /*
+    a known hack--we have bad failures in this test, thanks to openssl as far
+    as we can tell.  so we signal not to fail in the test results.
+  */
   set_failures_are_critial(false);
 
   int left = THREAD_COUNT;
index 996ae517d3c855c054041bdd8bd5bcb8ddfb4449..887356a1c5ecffcb21ec8d4c1585b27d1ec5e26c 100644 (file)
@@ -69,10 +69,11 @@ public:
 
   bool failures_are_critical() const { return c_fail_on_errors; }
     /*!<
-     * report whether we consider test errors to be a critical failure.  if true, then any
-     * error causes a non-zero exit return from the unit test.  if false, then the successful
-     * zero exit occurs instead.  this allows a test which is known to fail to not break the
-     * build (ahem, borked blowfish!).
+     * report whether we consider test errors to be a critical failure.
+     * if true (which is the default), then any error causes a non-zero exit
+     * return from the unit test.  if set to false (optional), then the
+     * successful zero exit occurs even when errors are seen in the tests.
+     * this keeps a test which is known to fail from breaking the build.
      */ 
   void set_failures_are_critial(bool are_failures_critical)
       { c_fail_on_errors = are_failures_critical; }  //<! setter for test fail flag.