Unverified Commit a2fdbcb7 authored by kladko's avatar kladko

SKALE-2341 Added tags for older commits

parent 4e26af8b
This diff is collapsed.
This diff is collapsed.
...@@ -61,13 +61,10 @@ std::vector<std::string> genECDSAKey() { ...@@ -61,13 +61,10 @@ std::vector<std::string> genECDSAKey() {
throw RPCException(status, errMsg); throw RPCException(status, errMsg);
} }
std::vector<std::string> keys(3); std::vector<std::string> keys(3);
if (printDebugInfo) {
std::cerr << "account key is " << errMsg << std::endl; std::cerr << "account key is " << errMsg << std::endl;
std::cerr << "enc_len is " << enc_len << std::endl; std::cerr << "enc_len is " << enc_len << std::endl;
// std::cerr << "enc_key is " << std::endl;
// for(int i = 0 ; i < 1024; i++)
// std::cerr << (int)encr_pr_key[i] << " " ;
}
char *hexEncrKey = (char *) calloc(BUF_LEN * 2, 1); char *hexEncrKey = (char *) calloc(BUF_LEN * 2, 1);
carray2Hex(encr_pr_key, enc_len, hexEncrKey); carray2Hex(encr_pr_key, enc_len, hexEncrKey);
keys.at(0) = hexEncrKey; keys.at(0) = hexEncrKey;
...@@ -77,10 +74,8 @@ std::vector<std::string> genECDSAKey() { ...@@ -77,10 +74,8 @@ std::vector<std::string> genECDSAKey() {
unsigned long seed = randGen(); unsigned long seed = randGen();
if (printDebugInfo) {
spdlog::debug("seed is {}", seed); spdlog::debug("seed is {}", seed);
std::cerr << "strlen is " << strlen(hexEncrKey) << std::endl; std::cerr << "strlen is " << strlen(hexEncrKey) << std::endl;
}
gmp_randstate_t state; gmp_randstate_t state;
gmp_randinit_default(state); gmp_randinit_default(state);
...@@ -133,13 +128,12 @@ std::string getECDSAPubKey(const char *_encryptedKeyHex) { ...@@ -133,13 +128,12 @@ std::string getECDSAPubKey(const char *_encryptedKeyHex) {
} }
string pubKey = string(pubKeyX.data()) + string(pubKeyY.data());//concatPubKeyWith0x(pub_key_x, pub_key_y);// string pubKey = string(pubKeyX.data()) + string(pubKeyY.data());//concatPubKeyWith0x(pub_key_x, pub_key_y);//
if (printDebugInfo) {
spdlog::debug("enc_len is {}", enc_len); spdlog::debug("enc_len is {}", enc_len);
spdlog::debug("pubkey is {}", pubKey); spdlog::debug("pubkey is {}", pubKey);
spdlog::debug("pubkey length is {}", pubKey.length()); spdlog::debug("pubkey length is {}", pubKey.length());
spdlog::debug("err str is {}", errMsg.data()); spdlog::debug("err str is {}", errMsg.data());
spdlog::debug("err status is {}", err_status); spdlog::debug("err status is {}", err_status);
}
return pubKey; return pubKey;
} }
......
...@@ -62,10 +62,10 @@ std::shared_ptr<string> LevelDB::readString(const string &_key) { ...@@ -62,10 +62,10 @@ std::shared_ptr<string> LevelDB::readString(const string &_key) {
auto status = db->Get(readOptions, _key, &*result); auto status = db->Get(readOptions, _key, &*result);
if (printDebugInfo) {
spdlog::debug("key to read from db: {}",_key ); spdlog::debug("key to read from db: {}",_key );
//std::cerr << "key to read from db: " << _key << std::endl; //std::cerr << "key to read from db: " << _key << std::endl;
}
throwExceptionOnError(status); throwExceptionOnError(status);
...@@ -83,10 +83,10 @@ void LevelDB::writeString(const string &_key, const string &_value) { ...@@ -83,10 +83,10 @@ void LevelDB::writeString(const string &_key, const string &_value) {
throwExceptionOnError(status); throwExceptionOnError(status);
if (printDebugInfo) {
spdlog::debug("written key: {}",_key ); spdlog::debug("written key: {}",_key );
// std::cerr << "written key " << _key << std::endl; // std::cerr << "written key " << _key << std::endl;
}
} }
...@@ -100,10 +100,9 @@ void LevelDB::deleteDHDKGKey (const string &_key) { ...@@ -100,10 +100,9 @@ void LevelDB::deleteDHDKGKey (const string &_key) {
throwExceptionOnError(status); throwExceptionOnError(status);
if (printDebugInfo) {
spdlog::debug("key deleted: {}",full_key ); spdlog::debug("key deleted: {}",full_key );
//std::cerr << "key deleted " << full_key << std::endl; //std::cerr << "key deleted " << full_key << std::endl;
}
} }
void LevelDB::deleteTempNEK(const string &_key){ void LevelDB::deleteTempNEK(const string &_key){
...@@ -130,10 +129,9 @@ void LevelDB::deleteKey(const string &_key){ ...@@ -130,10 +129,9 @@ void LevelDB::deleteKey(const string &_key){
throwExceptionOnError(status); throwExceptionOnError(status);
if (printDebugInfo) {
spdlog::debug("key deleted: {}",_key ); spdlog::debug("key deleted: {}",_key );
// std::cerr << "key deleted " << _key << std::endl; // std::cerr << "key deleted " << _key << std::endl;
}
} }
...@@ -219,10 +217,9 @@ void LevelDB::writeDataUnique(const string & Name, const string &value) { ...@@ -219,10 +217,9 @@ void LevelDB::writeDataUnique(const string & Name, const string &value) {
} }
writeString(key, value); writeString(key, value);
if (printDebugInfo) {
spdlog::debug("{}",Name, " is written to db"); spdlog::debug("{}",Name, " is written to db");
//std::cerr << Name << " is written to db " << std::endl;
}
} }
......
...@@ -231,8 +231,6 @@ void init_SEK(){ ...@@ -231,8 +231,6 @@ void init_SEK(){
gen_SEK(); gen_SEK();
} }
else{ else{
if (printDebugInfo)
spdlog::info("going to set SEK from db" );
set_SEK(encr_SEK_ptr); set_SEK(encr_SEK_ptr);
} }
} }
......
...@@ -77,9 +77,8 @@ void initEnclave() { ...@@ -77,9 +77,8 @@ void initEnclave() {
} }
#endif #endif
if (printDebugInfo) {
spdlog::debug("SGX_DEBUG_FLAG = {}", SGX_DEBUG_FLAG); spdlog::debug("SGX_DEBUG_FLAG = {}", SGX_DEBUG_FLAG);
}
status = sgx_create_enclave_search(ENCLAVE_NAME, SGX_DEBUG_FLAG, &token, status = sgx_create_enclave_search(ENCLAVE_NAME, SGX_DEBUG_FLAG, &token,
&updated, &eid, 0); &updated, &eid, 0);
......
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