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
5e9c346d
Unverified
Commit
5e9c346d
authored
May 07, 2020
by
kladko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed docs
parent
1fdcafed
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
5 deletions
+7
-5
CSRManagerServer.cpp
CSRManagerServer.cpp
+1
-1
CSRManagerServer.h
CSRManagerServer.h
+2
-1
SGXRegistrationServer.cpp
SGXRegistrationServer.cpp
+2
-2
ServerInit.cpp
ServerInit.cpp
+2
-1
No files found.
CSRManagerServer.cpp
View file @
5e9c346d
...
@@ -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_s
erver
()
{
int
CSRManagerServer
::
initCSRManagerS
erver
()
{
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)
...
...
CSRManagerServer.h
View file @
5e9c346d
...
@@ -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
();
...
...
SGXRegistrationServer.cpp
View file @
5e9c346d
...
@@ -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
Get
ertificateImpl
(
const
string
&
hash
)
{
Json
::
Value
getC
ertificateImpl
(
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
GetS
ertificateImpl
(
hash
);
return
getC
ertificateImpl
(
hash
);
}
}
void
SGXRegistrationServer
::
set_cert_created
(
bool
b
)
{
void
SGXRegistrationServer
::
set_cert_created
(
bool
b
)
{
...
...
ServerInit.cpp
View file @
5e9c346d
...
@@ -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_s
erver
();
CSRManagerServer
::
initCSRManagerS
erver
();
}
else
{
}
else
{
SGXWalletServer
::
initHttpServer
();
SGXWalletServer
::
initHttpServer
();
}
}
...
...
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