Merge pull request #172 from libtom/test_tfm

Run tests for tomsfastmath

[skip ci]
This commit is contained in:
Steffen Jaeckel 2017-06-12 23:08:10 +02:00 committed by GitHub
commit caa05540b7
4 changed files with 18 additions and 9 deletions

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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,
};