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
542e0dcd
Unverified
Commit
542e0dcd
authored
Dec 16, 2019
by
Sergiy Lavrynenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-1850 sgxwallet is build with all local dependencies
parent
f3d36d37
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
26 deletions
+21
-26
DKGCrypto.cpp
DKGCrypto.cpp
+4
-7
Makefile.am
Makefile.am
+8
-4
README.md
README.md
+7
-13
Makefile.am
secure_enclave/Makefile.am
+1
-1
Makefile.in
secure_enclave/Makefile.in
+1
-1
No files found.
DKGCrypto.cpp
View file @
542e0dcd
...
...
@@ -26,11 +26,13 @@
#include "sgxwallet.h"
#include <iostream>
#include <memory>
#include <memory>
#include "SGXWalletServer.hpp"
#include "RPCException.h"
#include <libBLS/libff/libff/algebra/curves/alt_bn128/alt_bn128_pp.hpp>
//#include <libBLS/libff/libff/algebra/curves/alt_bn128/alt_bn128_pp.hpp>
#include <libff/algebra/curves/alt_bn128/alt_bn128_pp.hpp>
std
::
vector
<
std
::
string
>
SplitString
(
const
char
*
koefs
,
const
char
symbol
){
std
::
string
str
(
koefs
);
...
...
@@ -250,7 +252,7 @@ bool CreateBLSShare( const std::string& BLSKeyName, const char * s_shares, const
if
(
!
hex2carray
(
encryptedKeyHex
,
&
dec_key_len
,
encr_key
)){
throw
RPCException
(
INVALID_HEX
,
"Invalid encryptedKeyHex"
);
}
uint32_t
enc_bls_len
=
0
;
std
::
cerr
<<
"BEFORE create_bls_key IN ENCLAVE "
<<
std
::
endl
;
...
...
@@ -341,8 +343,3 @@ std::vector<std::string> mult_G2(const std::string& x){
result
[
3
]
=
ConvertToString
(
elG2
.
Y
.
c1
);
return
result
;
}
Makefile.am
View file @
542e0dcd
...
...
@@ -91,10 +91,14 @@ secure_enclave.signed.so: secure_enclave/secure_enclave.signed.so
## Use the variables, not the actual library names to ensure these
## targets work on simulation builds.
sgxwallet_LDADD
=
-l
$(SGX_URTS_LIB)
-Lleveldb
/build
-LlibBLS
/build
-LlibBLS
/build/libff/libff
-l
:libbls.a
-l
:libleveldb.a
\
-l
:libff.a
-lgmp
-ldl
-l
:libsgx_capable.a
-l
:libsgx_tprotected_fs.a
-ljsonrpccpp-stub
-lpthread
-ljsonrpccpp-common
\
-ljsonrpccpp-server
-ljsonrpccpp-client
-ljsoncpp
-lcurl
intel-sgx-ssl/Linux/package/lib64/libsgx_usgxssl.a
\
intel-sgx-ssl/Linux/package/lib64/libsgx_tsgxssl_crypto.a
sgxwallet_LDADD
=
-l
$(SGX_URTS_LIB)
-LlibBLS
/deps/deps_inst/x86_or_x64/lib
-Lleveldb
/build
-LlibBLS
/build
\
-LlibBLS
/build/libff/libff
\
-l
:libbls.a
-l
:libleveldb.a
\
-l
:libff.a
-lgmp
-ldl
-l
:libsgx_capable.a
-l
:libsgx_tprotected_fs.a
\
-ljsonrpccpp-stub
-ljsonrpccpp-server
-ljsonrpccpp-client
-ljsonrpccpp-common
-ljsoncpp
-lmicrohttpd
\
intel-sgx-ssl/Linux/package/lib64/libsgx_usgxssl.a
\
intel-sgx-ssl/Linux/package/lib64/libsgx_tsgxssl_crypto.a
\
-lgnutls
-lgcrypt
-lcurl
-lssl
-lcrypto
-lz
-lpthread
testw_SOURCES
=
testw.cpp stubclient.cpp SGXWalletServer.cpp RPCException.cpp BLSCrypto.cpp ServerInit.cpp LevelDB.cpp
\
...
...
README.md
View file @
542e0dcd
...
...
@@ -63,14 +63,6 @@ Currently the build builds with **automake 1.15**. You need to install it since
cd scripts; sudo dpkg -i automake_1.15.1-3ubuntu2_all.deb; cd ..
```
## Prepare custom root variables for locally build dependencies
```
export CFLAGS="-I`pwd`/libBLS/deps/deps_inst/x86_or_x64/include"
export CXXFLAGS="-I`pwd`/libBLS/deps/deps_inst/x86_or_x64/include"
export LDFLAGS="-L`pwd`/libBLS/deps/deps_inst/x86_or_x64/lib"
```
## Build dependencies
Dependencies only need to be built once.
...
...
@@ -84,12 +76,11 @@ cd scripts; ./build.py; cd ..
Co to the project's top directory, then run
```
export CFLAGS=
export CXXFLAGS=
export LDFLAGS=
#autoreconf
libtoolize --force
aclocal
autoheader
automake --force-missing --add-missing
autoconf
automake
./configure
```
...
...
@@ -98,6 +89,9 @@ automake
Go to project's top directory and run
```
export CFLAGS=-I`readlink -f ./libBLS/deps/deps_inst/x86_or_x64/include`
export CXXFLAGS=-I`readlink -f ./libBLS/deps/deps_inst/x86_or_x64/include`
export LDFLAGS=-L`readlink -f ./libBLS/deps/deps_inst/x86_or_x64/lib`
make
```
...
...
secure_enclave/Makefile.am
View file @
542e0dcd
...
...
@@ -63,7 +63,7 @@ ENCLAVE_KEY=$(ENCLAVE)_private.pem
## Additional Automake flags needed to build the enclave.
##
AM_CPPFLAGS
+=
-Wall
-Wno-implicit-function-declaration
$(TGMP_CPPFLAGS)
-I
.
.
/trusted_libff
-I
../sgx-sdk-build/sgxsdk/include/libcxx
\
AM_CPPFLAGS
+=
-Wall
-Wno-implicit-function-declaration
$(TGMP_CPPFLAGS)
-I
./trusted_libff
-I
../sgx-sdk-build/sgxsdk/include/libcxx
\
-I
../intel-sgx-ssl/Linux/package/include
AM_CXXFLAGS
+=
-fno-builtin
...
...
secure_enclave/Makefile.in
View file @
542e0dcd
...
...
@@ -322,7 +322,7 @@ SGXSSL_BINDIR = @SGXSSL_BINDIR@
AM_CFLAGS
=
@SGX_ENCLAVE_CFLAGS@
AM_CPPFLAGS
=
@SGX_ENCLAVE_CPPFLAGS@
-Wall
\
-Wno-implicit-function-declaration
$(TGMP_CPPFLAGS)
\
-I
.
.
/trusted_libff
-I
../sgx-sdk-build/sgxsdk/include/libcxx
\
-I
./trusted_libff
-I
../sgx-sdk-build/sgxsdk/include/libcxx
\
-I
../intel-sgx-ssl/Linux/package/include
AM_CXXFLAGS
=
@SGX_ENCLAVE_CXXFLAGS@ @SGX_ENCLAVE_CFLAGS@
-fno-builtin
AM_LDFLAGS
=
@SGX_ENCLAVE_LDFLAGS@
$(TGMP_LDFLAGS)
...
...
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