Unverified Commit 5e9c346d authored by kladko's avatar kladko

Fixed docs

parent 1fdcafed
...@@ -131,7 +131,7 @@ Json::Value CSRManagerServer::signByHash(const string &hash, int status) { ...@@ -131,7 +131,7 @@ Json::Value CSRManagerServer::signByHash(const string &hash, int status) {
return signByHashImpl(hash, status); return signByHashImpl(hash, status);
} }
int init_csrmanager_server() { int CSRManagerServer::initCSRManagerServer() {
hs3 = new jsonrpc::HttpServer(BASE_PORT + 2); hs3 = new jsonrpc::HttpServer(BASE_PORT + 2);
hs3->BindLocalhost(); hs3->BindLocalhost();
cs = new CSRManagerServer(*hs3, JSONRPC_SERVER_V2); // server (json-rpc 2.0) cs = new CSRManagerServer(*hs3, JSONRPC_SERVER_V2); // server (json-rpc 2.0)
......
...@@ -42,9 +42,10 @@ class CSRManagerServer : public abstractCSRManagerServer { ...@@ -42,9 +42,10 @@ class CSRManagerServer : public abstractCSRManagerServer {
virtual Json::Value getUnsignedCSRs(); virtual Json::Value getUnsignedCSRs();
virtual Json::Value signByHash(const std::string& hash, int status); virtual Json::Value signByHash(const std::string& hash, int status);
static int initCSRManagerServer();
}; };
extern int init_csrmanager_server();
......
...@@ -109,7 +109,7 @@ Json::Value signCertificateImpl(const string &_csr, bool _autoSign = false) { ...@@ -109,7 +109,7 @@ Json::Value signCertificateImpl(const string &_csr, bool _autoSign = false) {
return result; return result;
} }
Json::Value GetertificateImpl(const string &hash) { Json::Value getCertificateImpl(const string &hash) {
Json::Value result; Json::Value result;
string cert; string cert;
...@@ -166,7 +166,7 @@ Json::Value SGXRegistrationServer::SignCertificate(const string &csr) { ...@@ -166,7 +166,7 @@ Json::Value SGXRegistrationServer::SignCertificate(const string &csr) {
Json::Value SGXRegistrationServer::GetCertificate(const string &hash) { Json::Value SGXRegistrationServer::GetCertificate(const string &hash) {
spdlog::info(__FUNCTION__); spdlog::info(__FUNCTION__);
LOCK(m) LOCK(m)
return GetSertificateImpl(hash); return getCertificateImpl(hash);
} }
void SGXRegistrationServer::set_cert_created(bool b) { void SGXRegistrationServer::set_cert_created(bool b) {
......
...@@ -113,6 +113,7 @@ void initAll(uint32_t _logLevel, bool _checkCert, bool _autoSign) { ...@@ -113,6 +113,7 @@ void initAll(uint32_t _logLevel, bool _checkCert, bool _autoSign) {
static int sgxServerInited; static int sgxServerInited;
cout << "Running sgxwallet version:" << SGXWALLET_VERSION << endl; cout << "Running sgxwallet version:" << SGXWALLET_VERSION << endl;
CHECK_STATE(sgxServerInited == 0) CHECK_STATE(sgxServerInited == 0)
sgxServerInited = 1; sgxServerInited = 1;
initEnclave(_logLevel); initEnclave(_logLevel);
...@@ -122,7 +123,7 @@ void initAll(uint32_t _logLevel, bool _checkCert, bool _autoSign) { ...@@ -122,7 +123,7 @@ void initAll(uint32_t _logLevel, bool _checkCert, bool _autoSign) {
if (useHTTPS) { if (useHTTPS) {
SGXWalletServer::initHttpsServer(_checkCert); SGXWalletServer::initHttpsServer(_checkCert);
SGXRegistrationServer::initRegistrationServer(_autoSign); SGXRegistrationServer::initRegistrationServer(_autoSign);
init_csrmanager_server(); CSRManagerServer::initCSRManagerServer();
} else { } else {
SGXWalletServer::initHttpServer(); SGXWalletServer::initHttpServer();
} }
......
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