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
320c3f01
Commit
320c3f01
authored
4 years ago
by
dmitriy.gerasimov
Browse files
Options
Downloads
Plain Diff
Merge branch 'feature-4148' into 'master'
fixed Bugs #4148 See merge request
!120
parents
052c9c5c
c3785e2f
No related branches found
No related tags found
1 merge request
!120
fixed Bugs #4148
Pipeline
#3874
passed with stage
in 21 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/service/vpn/dap_chain_net_srv_vpn_cdb_auth.c
+5
-3
5 additions, 3 deletions
modules/service/vpn/dap_chain_net_srv_vpn_cdb_auth.c
with
5 additions
and
3 deletions
modules/service/vpn/dap_chain_net_srv_vpn_cdb_auth.c
+
5
−
3
View file @
320c3f01
...
...
@@ -187,7 +187,6 @@ int dap_chain_net_srv_vpn_cdb_auth_init (const char * a_domain, const char * a_m
s_hook_serial_update
=
register_hook
(
"hook_serial_update"
);
s_hook_serial_delete
=
register_hook
(
"hook_serial_delete"
);
s_hook_serial_deactivate
=
register_hook
(
"hook_serial_deactivate"
);
//run_hook(s_hook_serial_update, "serial=%s active_days=%lld", l_serial.header.serial, l_active_days);
return
0
;
}
...
...
@@ -329,6 +328,8 @@ int dap_chain_net_srv_vpn_cdb_auth_activate_serial(const char * a_serial_raw, co
dap_serial_key_len
(
l_serial_key
),
s_group_serials_activated
))
{
dap_chain_global_db_gr_del
(
l_serial_key
->
header
.
serial
,
s_group_serials
);
// save gdb
dap_chain_global_db_flush
();
l_ret
=
0
;
// OK
}
}
...
...
@@ -365,7 +366,7 @@ int dap_chain_net_srv_vpn_cdb_auth_check_serial(const char * a_serial, const cha
if
((
l_serial_key
->
header
.
activated
+
l_serial_key
->
header
.
expired
)
<
time
(
NULL
))
l_ret
=
-
4
;
}
else
{
if
(
!
l_ret
)
{
// check pkey
dap_enc_key_t
*
l_client_key
=
NULL
;
size_t
l_pkey_length
=
dap_strlen
(
a_pkey_b64
);
...
...
@@ -382,6 +383,7 @@ int dap_chain_net_srv_vpn_cdb_auth_check_serial(const char * a_serial, const cha
}
DAP_DELETE
(
l_pkey_raw
);
}
DAP_DELETE
(
l_serial_key
);
return
l_ret
;
}
...
...
@@ -763,7 +765,7 @@ int dap_chain_net_srv_vpn_cdb_auth_cli_cmd_serial(const char *a_serial_str, int
return
l_ret
;
}
else
{
dap_chain_node_cli_set_reply_text
(
a_str_reply
,
"unknown subcommand %s, use 'generate', 'list'
or 'upd
ate'"
,
a_serial_str
);
dap_chain_node_cli_set_reply_text
(
a_str_reply
,
"unknown subcommand %s, use 'generate', 'list'
, 'update', 'info', 'delete' or 'deactiv
ate'"
,
a_serial_str
);
}
return
-
1
;
}
...
...
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