sgxprocess returns a string which should have been encoded in JSON, and so this string is decoded from JSON
But if an error occurs inside the SGX enclave, a non-JSON sting is returned by sgxprocess
Those cjson.decode raise an error:
/usr/local/lib/lua/5.3/zmq-rx.lua:111: Error: /usr/local/lib/lua/5.3/sgx.lua:65: Expected value but found invalid token at character 1
The encoding of the return value from sgxprocess has to be checked, and in case of non-JSON value, the string value has to be returned as it is
sgxprocess
returns a string which should have been encoded in JSON, and so this string is decoded from JSON But if an error occurs inside the SGX enclave, a non-JSON sting is returned bysgxprocess
Thosecjson.decode
raise an error:The encoding of the return value from
sgxprocess
has to be checked, and in case of non-JSON value, the string value has to be returned as it is