Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cellframe-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
16
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cellframe
cellframe-sdk
Commits
fbf92cb7
Commit
fbf92cb7
authored
3 years ago
by
Aleksandr Vodianov
Committed by
dmitriy.gerasimov
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Support 4917
parent
f14b846f
No related branches found
No related tags found
4 merge requests
!366
Docs sdk devel
,
!365
Docs sdk devel
,
!362
Docs sdk
,
!356
Support 4917
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cmake/OS_Detection.cmake
+5
-2
5 additions, 2 deletions
cmake/OS_Detection.cmake
dap-sdk/crypto/src/dap_enc_ringct20.c
+1
-2
1 addition, 2 deletions
dap-sdk/crypto/src/dap_enc_ringct20.c
modules/chain/dap_chain_ledger.c
+4
-4
4 additions, 4 deletions
modules/chain/dap_chain_ledger.c
with
10 additions
and
8 deletions
cmake/OS_Detection.cmake
+
5
−
2
View file @
fbf92cb7
...
...
@@ -45,6 +45,7 @@ message(STATUS "[*] Building for a ${ARCH_WIDTH}-bit system")
if
(
UNIX
)
add_definitions
(
"-DDAP_OS_UNIX"
)
if
(
APPLE
)
EXECUTE_PROCESS
(
COMMAND whoami COMMAND tr -d '\n' OUTPUT_VARIABLE L_USER
)
EXECUTE_PROCESS
(
COMMAND echo -n /Users/
${
L_USER
}
OUTPUT_VARIABLE L_USERDIR_PATH
)
set
(
USERDIR_PATH
"
${
L_USERDIR_PATH
}
"
)
...
...
@@ -61,10 +62,12 @@ if(UNIX)
OUTPUT_STRIP_TRAILING_WHITESPACE
)
add_definitions
(
"-DDAP_OS_MAC -DDAP_OS_MAC_ARCH=
${
MACOS_ARCH
}
"
)
endif
()
if
(
${
_CMAKE_OSX_SYSROOT_PATH
}
MATCHES
"iOS"
)
elseif
(
${
_CMAKE_OSX_SYSROOT_PATH
}
MATCHES
"iOS"
)
set
(
IOS ON
)
add_definitions
(
"-DDAP_OS_IOS"
)
else
()
set
(
MACOS ON
)
add_definitions
(
"-DDAP_OS_MAC -DDAP_OS_MAC_ARCH=
${
MACOS_ARCH
}
"
)
endif
()
endif
()
...
...
This diff is collapsed.
Click to expand it.
dap-sdk/crypto/src/dap_enc_ringct20.c
+
1
−
2
View file @
fbf92cb7
...
...
@@ -347,8 +347,7 @@ int ringct20_crypto_sign_open_with_pbkList(const unsigned char * msg, const unsi
if
(
sig
->
sig_len
<
sizeof
(
DAP_RINGCT20_SIGN_SECURITY
)
+
sizeof
(
wLenSig
))
return
-
1
;
DAP_RINGCT20_SIGN_SECURITY
sec_kind
=
*
(
DAP_RINGCT20_SIGN_SECURITY
*
)
sig
->
sig_data
;
wLenSig
=
*
(
typeof
(
&
wLenSig
))(
sig
->
sig_data
+
sizeof
(
DAP_RINGCT20_SIGN_SECURITY
));
wLenSig
=
*
(
int
*
)(
sig
->
sig_data
+
sizeof
(
DAP_RINGCT20_SIGN_SECURITY
));
if
(
wpbkList
!=
0
&&
wLenSig
!=
wpbkList
)
{
return
-
1
;
...
...
This diff is collapsed.
Click to expand it.
modules/chain/dap_chain_ledger.c
+
4
−
4
View file @
fbf92cb7
...
...
@@ -493,7 +493,7 @@ static int s_token_tsd_parse(dap_ledger_t * a_ledger, dap_chain_ledger_token_ite
//Allowed tx receiver addres list add, remove or clear
case
DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TX_RECEIVER_ALLOWED_ADD
:{
if
(
l_tsd
->
size
==
sizeof
(
dap_chain_addr_t
)
){
dap_chain_addr_t
*
l_addrs
=
a_token_item
->
tx_recv_allow
?
DAP_NEW_Z_SIZE
(
typeof
(
*
a_token_item
->
tx_recv_allow
)
,
dap_chain_addr_t
*
l_addrs
=
a_token_item
->
tx_recv_allow
?
DAP_NEW_Z_SIZE
(
dap_chain_addr_t
,
sizeof
(
*
a_token_item
->
tx_recv_allow
)
)
:
DAP_REALLOC
(
a_token_item
->
tx_recv_allow
,(
a_token_item
->
tx_recv_allow_size
+
1
)
*
sizeof
(
*
a_token_item
->
tx_recv_allow
)
);
...
...
@@ -585,7 +585,7 @@ static int s_token_tsd_parse(dap_ledger_t * a_ledger, dap_chain_ledger_token_ite
//Blocked tx receiver addres list add, remove or clear
case
DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TX_RECEIVER_BLOCKED_ADD
:{
if
(
l_tsd
->
size
==
sizeof
(
dap_chain_addr_t
)
){
dap_chain_addr_t
*
l_addrs
=
a_token_item
->
tx_recv_block
?
DAP_NEW_Z_SIZE
(
typeof
(
*
a_token_item
->
tx_recv_block
)
,
dap_chain_addr_t
*
l_addrs
=
a_token_item
->
tx_recv_block
?
DAP_NEW_Z_SIZE
(
dap_chain_addr_t
,
sizeof
(
*
a_token_item
->
tx_recv_block
)
)
:
DAP_REALLOC
(
a_token_item
->
tx_recv_block
,(
a_token_item
->
tx_recv_block_size
+
1
)
*
sizeof
(
*
a_token_item
->
tx_recv_block
)
);
// Check if its correct
...
...
@@ -674,7 +674,7 @@ static int s_token_tsd_parse(dap_ledger_t * a_ledger, dap_chain_ledger_token_ite
//Allowed tx sender addres list add, remove or clear
case
DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TX_SENDER_ALLOWED_ADD
:{
if
(
l_tsd
->
size
==
sizeof
(
dap_chain_addr_t
)
){
dap_chain_addr_t
*
l_addrs
=
a_token_item
->
tx_send_allow
?
DAP_NEW_Z_SIZE
(
typeof
(
*
a_token_item
->
tx_send_allow
)
,
dap_chain_addr_t
*
l_addrs
=
a_token_item
->
tx_send_allow
?
DAP_NEW_Z_SIZE
(
dap_chain_addr_t
,
sizeof
(
*
a_token_item
->
tx_send_allow
)
)
:
DAP_REALLOC
(
a_token_item
->
tx_send_allow
,(
a_token_item
->
tx_send_allow_size
+
1
)
*
sizeof
(
*
a_token_item
->
tx_send_allow
)
);
// Check if its correct
...
...
@@ -761,7 +761,7 @@ static int s_token_tsd_parse(dap_ledger_t * a_ledger, dap_chain_ledger_token_ite
//Blocked tx sender addres list add, remove or clear
case
DAP_CHAIN_DATUM_TOKEN_TSD_TYPE_TX_SENDER_BLOCKED_ADD
:{
if
(
l_tsd
->
size
==
sizeof
(
dap_chain_addr_t
)
){
dap_chain_addr_t
*
l_addrs
=
a_token_item
->
tx_send_block
?
DAP_NEW_Z_SIZE
(
typeof
(
*
a_token_item
->
tx_send_block
)
,
dap_chain_addr_t
*
l_addrs
=
a_token_item
->
tx_send_block
?
DAP_NEW_Z_SIZE
(
dap_chain_addr_t
,
sizeof
(
*
a_token_item
->
tx_send_block
)
)
:
DAP_REALLOC
(
a_token_item
->
tx_send_block
,(
a_token_item
->
tx_send_block_size
+
1
)
*
sizeof
(
*
a_token_item
->
tx_send_block
)
);
// Check if its correct
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment