diff --git a/.travis.yml b/.travis.yml index 86fade7..20bf726 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,8 @@ before_script: - gem install coveralls-lcov - curl http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.11.orig.tar.gz | tar xz - export PATH=$PATH:`pwd`/lcov-1.11/bin + - curl -s https://packagecloud.io/install/repositories/libtom/tomsfastmath/script.deb.sh | sudo bash + - sudo apt-get install libtfm-dev=0.13-5 matrix: fast_finish: true @@ -22,9 +24,9 @@ branches: compiler: - gcc - clang - -script: bash "${BUILDSCRIPT}" "${BUILDNAME}" "${BUILDOPTIONS}" "makefile V=1" "-DUSE_LTM -DLTM_DESC -I/usr/include" "/usr/lib/x86_64-linux-gnu/libtommath.a" - +script: + - bash "${BUILDSCRIPT}" "${BUILDNAME}" "${BUILDOPTIONS}" "makefile V=1" "-DUSE_LTM -DLTM_DESC" "/usr/lib/x86_64-linux-gnu/libtommath.a" + - bash "${BUILDSCRIPT}" "${BUILDNAME}" "${BUILDOPTIONS}" "makefile.shared V=1" "-DUSE_TFM -DTFM_DESC" "-ltfm" env: - | BUILDSCRIPT="check_source.sh" diff --git a/coverage.sh b/coverage.sh index 6686b44..d582f92 100755 --- a/coverage.sh +++ b/coverage.sh @@ -17,6 +17,11 @@ if [ -z "$(echo $CC | grep "gcc")" ]; then exit 0 fi +if [ "$(echo $2 | grep -v 'makefile[.]')" == "" ]; then + echo "only run coverage for the regular makefile, early exit success" + exit 0 +fi + # output version bash printinfo.sh diff --git a/src/headers/tomcrypt_custom.h b/src/headers/tomcrypt_custom.h index ce72015..1c9ebe0 100644 --- a/src/headers/tomcrypt_custom.h +++ b/src/headers/tomcrypt_custom.h @@ -492,11 +492,6 @@ #define LTC_PKCS_1 #endif -#if defined(TFM_DESC) && defined(LTC_RSA_BLINDING) - #warning RSA blinding currently not supported in combination with TFM - #undef LTC_RSA_BLINDING -#endif - #if defined(LTC_PELICAN) && !defined(LTC_RIJNDAEL) #error Pelican-MAC requires LTC_RIJNDAEL #endif diff --git a/src/math/tfm_desc.c b/src/math/tfm_desc.c index df4c63c..d8e09af 100644 --- a/src/math/tfm_desc.c +++ b/src/math/tfm_desc.c @@ -699,6 +699,13 @@ static int tfm_ecc_projective_add_point(ecc_point *P, ecc_point *Q, ecc_point *R #endif +static int set_rand(void *a, int size) +{ + LTC_ARGCHK(a != NULL); + fp_rand(a, size); + return CRYPT_OK; +} + const ltc_math_descriptor tfm_desc = { "TomsFastMath", @@ -788,7 +795,7 @@ const ltc_math_descriptor tfm_desc = { &addmod, &submod, - NULL, + set_rand, };