aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2018-12-10 17:05:24 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2018-12-10 17:05:24 +0800
commitff6764bb7e4f3643729bb12a1935f11d92590753 (patch)
treeacb9995d33a0cb86f203b455a2ede44eacc68465
parente17ebfd57bcc6b97d7012811527fbad93952f655 (diff)
downloaddexon-bls-ff6764bb7e4f3643729bb12a1935f11d92590753.tar
dexon-bls-ff6764bb7e4f3643729bb12a1935f11d92590753.tar.gz
dexon-bls-ff6764bb7e4f3643729bb12a1935f11d92590753.tar.bz2
dexon-bls-ff6764bb7e4f3643729bb12a1935f11d92590753.tar.lz
dexon-bls-ff6764bb7e4f3643729bb12a1935f11d92590753.tar.xz
dexon-bls-ff6764bb7e4f3643729bb12a1935f11d92590753.tar.zst
dexon-bls-ff6764bb7e4f3643729bb12a1935f11d92590753.zip
fix compiler error for MCL_USE_OPENSSL=0
-rw-r--r--.travis.yml2
-rw-r--r--test/bls_test.hpp10
2 files changed, 3 insertions, 9 deletions
diff --git a/.travis.yml b/.travis.yml
index 5f02678..6af3a64 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -15,3 +15,5 @@ script:
- make test_ci DISABLE_THREAD_TEST=1
- make test_go
- bin/bls_c384_test.exe
+ - make clean && make -C ../mcl clean
+ - make test_ci -j3 test DISABLE_THREAD_TEST=1 MCL_USE_OPENSSL=0
diff --git a/test/bls_test.hpp b/test/bls_test.hpp
index 7c819b2..58ab475 100644
--- a/test/bls_test.hpp
+++ b/test/bls_test.hpp
@@ -4,11 +4,7 @@
#include <iostream>
#include <sstream>
#include <cybozu/benchmark.hpp>
-#ifdef MCL_DONT_USE_OPENSSL
#include <cybozu/sha2.hpp>
-#else
-#include <cybozu/crypto.hpp>
-#endif
template<class T>
void streamTest(const T& t)
@@ -449,11 +445,7 @@ void verifyAggregateTest()
char msg[128];
CYBOZU_SNPRINTF(msg, sizeof(msg), "abc-%d", (int)i);
const size_t msgSize = strlen(msg);
-#ifdef MCL_DONT_USE_OPENSSL
- cybozu::Sha256(msg, msgSize).get(h[i].data);
-#else
- cybozu::crypto::Hash::digest(h[i].data, cybozu::crypto::Hash::N_SHA256, msg, msgSize);
-#endif
+ cybozu::Sha256().digest(h[i].data, sizeofHash, msg, msgSize);
secs[i].init();
secs[i].getPublicKey(pubs[i]);
secs[i].signHash(sigs[i], h[i].data, sizeofHash);