Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sgxwallet
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董子豪
sgxwallet
Commits
0e270582
Unverified
Commit
0e270582
authored
May 07, 2020
by
kladko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-2536-fix-cert
parent
8482f666
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
10 deletions
+6
-10
SGXRegistrationServer.cpp
SGXRegistrationServer.cpp
+2
-5
SGXRegistrationServer.h
SGXRegistrationServer.h
+4
-5
No files found.
SGXRegistrationServer.cpp
View file @
0e270582
...
@@ -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
)
{
...
...
SGXRegistrationServer.h
View file @
0e270582
...
@@ -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
st
d
::
st
ring
&
csr
);
virtual
Json
::
Value
SignCertificate
(
const
string
&
csr
);
virtual
Json
::
Value
GetCertificate
(
const
st
d
::
st
ring
&
hash
);
virtual
Json
::
Value
GetCertificate
(
const
string
&
hash
);
static
int
initRegistrationServer
(
bool
_autoSign
=
false
);
static
int
initRegistrationServer
(
bool
_autoSign
=
false
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment