Unverified Commit 6b412016 authored by kladko's avatar kladko

SKALE-3067-cleanup-sgx

parent d44dae07
...@@ -166,7 +166,7 @@ string trustedGetSecretShares(const string &_polyName, const char *_encryptedPol ...@@ -166,7 +166,7 @@ string trustedGetSecretShares(const string &_polyName, const char *_encryptedPol
throw SGXException(INVALID_HEX, "Invalid encryptedPolyHex"); throw SGXException(INVALID_HEX, "Invalid encryptedPolyHex");
} }
status = trustedSetEncryptedDkgPolyAES(eid, &errStatus, errMsg1.data(), encrDKGPoly.data(), &encLen); status = trustedSetEncryptedDkgPolyAES(eid, &errStatus, errMsg1.data(), encrDKGPoly.data(), encLen);
if (status != SGX_SUCCESS || errStatus != 0) { if (status != SGX_SUCCESS || errStatus != 0) {
throw SGXException(-666, errMsg1.data()); throw SGXException(-666, errMsg1.data());
......
...@@ -1587,7 +1587,7 @@ trustedDecryptDkgSecretAES(int *errStatus, char *errString, uint8_t *encrypted_d ...@@ -1587,7 +1587,7 @@ trustedDecryptDkgSecretAES(int *errStatus, char *errString, uint8_t *encrypted_d
} }
void trustedSetEncryptedDkgPolyAES(int *errStatus, char *errString, uint8_t *encrypted_poly, uint64_t *enc_len) { void trustedSetEncryptedDkgPolyAES(int *errStatus, char *errString, uint8_t *encrypted_poly, uint64_t enc_len) {
LOG_DEBUG(__FUNCTION__); LOG_DEBUG(__FUNCTION__);
*errString = 0; *errString = 0;
...@@ -1596,7 +1596,7 @@ void trustedSetEncryptedDkgPolyAES(int *errStatus, char *errString, uint8_t *enc ...@@ -1596,7 +1596,7 @@ void trustedSetEncryptedDkgPolyAES(int *errStatus, char *errString, uint8_t *enc
CHECK_STATE(encrypted_poly); CHECK_STATE(encrypted_poly);
memset(getThreadLocalDecryptedDkgPoly(), 0, DKG_BUFER_LENGTH); memset(getThreadLocalDecryptedDkgPoly(), 0, DKG_BUFER_LENGTH);
int status = AES_decrypt(encrypted_poly, *enc_len, (char *) getThreadLocalDecryptedDkgPoly(), int status = AES_decrypt(encrypted_poly, enc_len, (char *) getThreadLocalDecryptedDkgPoly(),
DKG_BUFER_LENGTH); DKG_BUFER_LENGTH);
if (status != SGX_SUCCESS) { if (status != SGX_SUCCESS) {
......
...@@ -224,7 +224,7 @@ enclave { ...@@ -224,7 +224,7 @@ enclave {
[out] int *errStatus, [out] int *errStatus,
[out, count = SMALL_BUF_SIZE] char* err_string, [out, count = SMALL_BUF_SIZE] char* err_string,
[in, count = 3050] uint8_t* encrypted_poly, [in, count = 3050] uint8_t* encrypted_poly,
[user_check] uint64_t* enc_len); uint64_t enc_len);
public void trustedGetEncryptedSecretShareAES( public void trustedGetEncryptedSecretShareAES(
[out]int *errStatus, [out]int *errStatus,
......
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