Browse Source

don't allow LTC_CLEAN_STACK to be enabled until fixed

As discussed in issue #486 [1] the current behavior shouldn't be used
anymore.

[1] https://github.com/libtom/libtomcrypt/issues/486
Steffen Jaeckel 4 years ago
parent
commit
6b12bc5bd8
2 changed files with 5 additions and 24 deletions
  1. 0 24
      .travis.yml
  2. 5 0
      src/headers/tomcrypt_custom.h

+ 0 - 24
.travis.yml

@@ -61,22 +61,6 @@ env:
     BUILDNAME="SMALL+NOTABLES"
     BUILDOPTIONS="-DLTC_SMALL_CODE -DLTC_NO_TABLES"
     BUILDSCRIPT=".ci/run.sh"
-  - |
-    BUILDNAME="CLEANSTACK"
-    BUILDOPTIONS="-DLTC_CLEAN_STACK"
-    BUILDSCRIPT=".ci/run.sh"
-  - |
-    BUILDNAME="CLEANSTACK+SMALL"
-    BUILDOPTIONS="-DLTC_SMALL_CODE -DLTC_CLEAN_STACK"
-    BUILDSCRIPT=".ci/run.sh"
-  - |
-    BUILDNAME="CLEANSTACK+NOTABLES"
-    BUILDOPTIONS="-DLTC_NO_TABLES -DLTC_CLEAN_STACK"
-    BUILDSCRIPT=".ci/run.sh"
-  - |
-    BUILDNAME="CLEANSTACK+NOTABLES+SMALL"
-    BUILDOPTIONS="-DLTC_NO_TABLES -DLTC_CLEAN_STACK -DLTC_SMALL_CODE"
-    BUILDSCRIPT=".ci/run.sh"
   - |
     BUILDNAME="NO_FAST"
     BUILDOPTIONS="-DLTC_NO_FAST"
@@ -93,18 +77,10 @@ env:
     BUILDNAME="NO_TIMING_RESISTANCE"
     BUILDOPTIONS="-DLTC_NO_ECC_TIMING_RESISTANT -DLTC_NO_RSA_BLINDING"
     BUILDSCRIPT=".ci/run.sh"
-  - |
-    BUILDNAME="CLEANSTACK+NOTABLES+SMALL+NO_ASM+NO_TIMING_RESISTANCE+LTC_FORTUNA_RESEED_RATELIMIT_STATIC"
-    BUILDOPTIONS="-DLTC_CLEAN_STACK -DLTC_NO_TABLES -DLTC_SMALL_CODE -DLTC_NO_ECC_TIMING_RESISTANT -DLTC_NO_RSA_BLINDING -DLTC_FORTUNA_RESEED_RATELIMIT_STATIC"
-    BUILDSCRIPT=".ci/run.sh"
   - |
     BUILDNAME="PTHREAD"
     BUILDOPTIONS="-DLTC_PTHREAD"
     BUILDSCRIPT=".ci/run.sh"
-  - |
-    BUILDNAME="PTHREAD+CLEANSTACK+NOTABLES+SMALL+NO_ASM+NO_TIMING_RESISTANCE+LTC_FORTUNA_RESEED_RATELIMIT_STATIC"
-    BUILDOPTIONS="-DLTC_CLEAN_STACK -DLTC_NO_TABLES -DLTC_SMALL_CODE -DLTC_NO_ECC_TIMING_RESISTANT -DLTC_NO_RSA_BLINDING -DLTC_FORTUNA_RESEED_RATELIMIT_STATIC -DLTC_PTHREAD"
-    BUILDSCRIPT=".ci/run.sh"
   - |
     BUILDNAME="STOCK+ARGTYPE=1"
     BUILDOPTIONS="-DARGTYPE=1"

+ 5 - 0
src/headers/tomcrypt_custom.h

@@ -585,6 +585,11 @@
    #define LTC_PBES
 #endif
 
+#if defined(LTC_CLEAN_STACK)
+/* if you're sure that you want to use it, remove the line below */
+   #error LTC_CLEAN_STACK is considered as broken
+#endif
+
 #if defined(LTC_PBES) && !defined(LTC_PKCS_5)
    #error LTC_PBES requires LTC_PKCS_5
 #endif