Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dap-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
6
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
dap
dap-sdk
Commits
70f8db62
Commit
70f8db62
authored
8 months ago
by
Roman Khlopkov
🔜
Browse files
Options
Downloads
Plain Diff
Merge branch 'hotfix-12492' into 'release-5.3'
Leaks fixed See merge request
!323
parents
8f8f048e
a4955dc4
No related branches found
No related tags found
1 merge request
!323
Leaks fixed
Pipeline
#42272
passed with stage
in 12 minutes and 31 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
io/dap_worker.c
+1
-0
1 addition, 0 deletions
io/dap_worker.c
net/server/enc_server/dap_enc_http.c
+5
-11
5 additions, 11 deletions
net/server/enc_server/dap_enc_http.c
with
6 additions
and
11 deletions
io/dap_worker.c
+
1
−
0
View file @
70f8db62
...
...
@@ -331,6 +331,7 @@ static void s_queue_es_io_callback( dap_events_socket_t * a_es, void * a_arg)
dap_events_socket_t
*
l_msg_es
=
dap_context_find
(
l_context
,
l_msg
->
esocket_uuid
);
if
(
l_msg_es
==
NULL
){
log_it
(
L_INFO
,
"We got i/o message for esocket %"
DAP_UINT64_FORMAT_U
" thats now not in list. Lost %zu data"
,
l_msg
->
esocket_uuid
,
l_msg
->
data_size
);
DAP_DELETE
(
l_msg
->
data
);
DAP_DELETE
(
l_msg
);
return
;
}
...
...
This diff is collapsed.
Click to expand it.
net/server/enc_server/dap_enc_http.c
+
5
−
11
View file @
70f8db62
...
...
@@ -109,7 +109,6 @@ void enc_http_proc(struct dap_http_simple *cl_st, void * arg)
size_t
l_block_key_size
=
32
;
int
l_protocol_version
=
0
;
size_t
l_sign_count
=
0
;
char
*
encrypt_msg
=
NULL
,
*
encrypt_id
=
NULL
;
sscanf
(
cl_st
->
http_client
->
in_query_string
,
"enc_type=%d,pkey_exchange_type=%d,pkey_exchange_size=%zu,block_key_size=%zu,protocol_version=%d,sign_count=%zu"
,
&
l_enc_block_type
,
&
l_pkey_exchange_type
,
&
l_pkey_exchange_size
,
&
l_block_key_size
,
&
l_protocol_version
,
&
l_sign_count
);
...
...
@@ -175,15 +174,8 @@ void enc_http_proc(struct dap_http_simple *cl_st, void * arg)
log_it
(
L_DEBUG
,
"Callback for ACL is not set, pass anauthorized"
);
}
if
(
!
(
encrypt_msg
=
DAP_NEW_Z_SIZE
(
char
,
DAP_ENC_BASE64_ENCODE_SIZE
(
l_pkey_exchange_key
->
pub_key_data_size
)
+
1
))
||
!
(
encrypt_id
=
DAP_NEW_Z_SIZE
(
char
,
DAP_ENC_BASE64_ENCODE_SIZE
(
DAP_ENC_KS_KEY_ID_SIZE
)
+
1
))
)
{
log_it
(
L_CRITICAL
,
"%s"
,
c_error_memory_alloc
);
dap_enc_key_delete
(
l_pkey_exchange_key
);
*
return_code
=
Http_Status_InternalServerError
;
return
;
}
char
*
encrypt_msg
=
DAP_NEW_Z_SIZE
(
char
,
DAP_ENC_BASE64_ENCODE_SIZE
(
l_pkey_exchange_key
->
pub_key_data_size
)
+
1
),
*
encrypt_id
=
DAP_NEW_STACK_SIZE
(
char
,
DAP_ENC_BASE64_ENCODE_SIZE
(
DAP_ENC_KS_KEY_ID_SIZE
)
+
1
);
dap_enc_base64_encode
(
l_pkey_exchange_key
->
pub_key_data
,
l_pkey_exchange_key
->
pub_key_data_size
,
encrypt_msg
,
DAP_ENC_DATA_TYPE_B64
);
l_enc_key_ks
->
key
=
dap_enc_key_new_generate
(
l_enc_block_type
,
...
...
@@ -203,6 +195,7 @@ void enc_http_proc(struct dap_http_simple *cl_st, void * arg)
dap_sign_t
*
l_node_sign
=
dap_sign_create
(
l_node_cert
->
enc_key
,
l_pkey_exchange_key
->
pub_key_data
,
l_pkey_exchange_key
->
pub_key_data_size
,
0
);
if
(
!
l_node_sign
)
{
dap_enc_key_delete
(
l_pkey_exchange_key
);
DAP_DELETE
(
encrypt_msg
);
*
return_code
=
Http_Status_InternalServerError
;
return
;
}
...
...
@@ -214,6 +207,7 @@ void enc_http_proc(struct dap_http_simple *cl_st, void * arg)
log_it
(
L_CRITICAL
,
"%s"
,
c_error_memory_alloc
);
dap_enc_key_delete
(
l_pkey_exchange_key
);
*
return_code
=
Http_Status_InternalServerError
;
DAP_DELETE
(
encrypt_msg
);
DAP_DELETE
(
l_node_sign
);
return
;
}
...
...
@@ -222,7 +216,7 @@ void enc_http_proc(struct dap_http_simple *cl_st, void * arg)
}
_enc_http_write_reply
(
cl_st
,
encrypt_id
,
encrypt_msg
,
l_node_sign_msg
);
DAP_DELETE
(
encrypt_msg
);
dap_enc_key_delete
(
l_pkey_exchange_key
);
DAP_DEL_Z
(
l_node_sign_msg
);
...
...
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