Unverified Commit 0e270582 authored by kladko's avatar kladko

SKALE-2536-fix-cert

parent 8482f666
...@@ -56,7 +56,7 @@ HttpServer *httpServer2 = nullptr; ...@@ -56,7 +56,7 @@ HttpServer *httpServer2 = nullptr;
SGXRegistrationServer::SGXRegistrationServer(AbstractServerConnector &connector, SGXRegistrationServer::SGXRegistrationServer(AbstractServerConnector &connector,
serverVersion_t type, bool _autoSign) serverVersion_t type, bool _autoSign)
: AbstractRegServer(connector, type), isCertCreated(false), autoSign(_autoSign) {} : AbstractRegServer(connector, type), autoSign(_autoSign) {}
Json::Value signCertificateImpl(const string &_csr, bool _autoSign = false) { Json::Value signCertificateImpl(const string &_csr, bool _autoSign = false) {
...@@ -169,10 +169,7 @@ Json::Value SGXRegistrationServer::GetCertificate(const string &hash) { ...@@ -169,10 +169,7 @@ Json::Value SGXRegistrationServer::GetCertificate(const string &hash) {
return getCertificateImpl(hash); return getCertificateImpl(hash);
} }
void SGXRegistrationServer::set_cert_created(bool b) {
sleep(100);
isCertCreated = b;
}
int SGXRegistrationServer::initRegistrationServer(bool _autoSign) { int SGXRegistrationServer::initRegistrationServer(bool _autoSign) {
......
...@@ -32,18 +32,17 @@ using namespace jsonrpc; ...@@ -32,18 +32,17 @@ using namespace jsonrpc;
using namespace std; using namespace std;
class SGXRegistrationServer: public AbstractRegServer { class SGXRegistrationServer: public AbstractRegServer {
std::recursive_mutex m; recursive_mutex m;
bool isCertCreated;
bool autoSign; bool autoSign;
public: public:
SGXRegistrationServer(AbstractServerConnector &connector, serverVersion_t type, bool _autoSign = false); SGXRegistrationServer(AbstractServerConnector &connector, serverVersion_t type, bool _autoSign = false);
void set_cert_created(bool b);
virtual Json::Value SignCertificate(const std::string& csr); virtual Json::Value SignCertificate(const string& csr);
virtual Json::Value GetCertificate(const std::string& hash); virtual Json::Value GetCertificate(const string& hash);
static int initRegistrationServer(bool _autoSign = false); static int initRegistrationServer(bool _autoSign = false);
......
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