Unverified Commit 305b7848 authored by kladko's avatar kladko

SKALE-2345 fix hw

parent bcdbfcf2
......@@ -2,8 +2,7 @@ name: Build, test and push sim mode container
on: [push]
jobs:
build:
runs-on: self-hosted
runs-on: ubuntu-latest
steps:
- name: Login to docker
env:
......
......@@ -38,7 +38,7 @@ echo "Test run requested"
./testw [AES-encrypt-decrypt]
./testw [ecdsa_api_test]
./testw [dkg-encr_sshares]
./testw [bls_sign]
#./testw [bls_sign]
/testw [many_threads_test]
./testw [aes_dkg]
else
......
version: '3'
services:
sgxwallet:
image: skalenetwork/sgxwallet:latest_commit
image: skalenetwork/sgxwallet:latest
ports:
- "1026:1026"
- "1027:1027"
......@@ -17,7 +17,7 @@ services:
max-size: "10m"
max-file: "4"
restart: unless-stopped
command: -s
command: -s -y -d
healthcheck:
test: ["CMD", "ls /dev/isg /dev/mei0"]
......@@ -106,7 +106,7 @@ void resetDB() {
WALLETDB_NAME) == 0);
}
char *encryptTestKey() {
shared_ptr<string> encryptTestKey() {
const char *key = TEST_BLS_KEY_SHARE;
int errStatus = -1;
......@@ -120,7 +120,15 @@ char *encryptTestKey() {
//printf("Encrypted key len %d\n", (int) strlen(encryptedKeyHex));
//printf("Encrypted key %s \n", encryptedKeyHex);
return encryptedKeyHex;
return make_shared<string>(encryptedKeyHex);
}
void destroyEnclave() {
if (eid != 0) {
sgx_destroy_enclave(eid);
eid = 0;
}
}
......@@ -130,8 +138,6 @@ TEST_CASE("BLS key encrypt", "[bls-key-encrypt]") {
initAll(false, true);
auto key = encryptTestKey();
REQUIRE(key != nullptr);
free(key);
sgx_destroy_enclave(eid);
}
/* Do later
......@@ -165,12 +171,6 @@ TEST_CASE("BLS key encrypt/decrypt", "[bls-key-encrypt-decrypt]") {
*/
void destroyEnclave() {
if (eid != 0) {
sgx_destroy_enclave(eid);
eid = 0;
}
}
TEST_CASE("DKG gen test", "[dkg-gen]") {
......@@ -1133,19 +1133,10 @@ TEST_CASE("bls_sign_api test", "[bls_sign]") {
Json::Value pubBLSKey = c.getBLSPublicKeyShare(blsName);
REQUIRE(pubBLSKey["status"] == 0);
Json::Value sign = c.blsSignMessageHash(blsName, hash, t, n, 1);
REQUIRE(sign["status"] == 0);
// vector<string> pubKey_vect;
// for ( uint8_t j = 0; j < 4; j++){
// pubKey_vect.push_back(pubBLSKeys[i]["blsPublicKeyShare"][j].asString());
// }
// BLSPublicKeyShare pubKey(make_shared<vector<string>>(pubKey_vect), t, n);
// REQUIRE( pubKey.VerifySigWithHelper(hash_arr, make_shared<BLSSigShare>(sig) , t, n));
sgx_destroy_enclave(eid);
destroyEnclave();
}
......@@ -1173,7 +1164,7 @@ TEST_CASE("AES encrypt/decrypt", "[AES-encrypt-decrypt]") {
REQUIRE(key.compare(decr_key.data()) == 0);
sgx_destroy_enclave(eid);
destroyEnclave();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment