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
7
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
d4c78e77
Commit
d4c78e77
authored
8 months ago
by
Roman Khlopkov
🔜
Browse files
Options
Downloads
Plain Diff
Merge branch 'bugfix-12239' into 'release-5.3'
Bugfix 12239 See merge request
!302
parents
6b4e8675
94996a43
No related branches found
No related tags found
1 merge request
!302
Bugfix 12239
Pipeline
#41684
passed with stage
in 48 minutes and 56 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
crypto/include/dap_sign.h
+9
-0
9 additions, 0 deletions
crypto/include/dap_sign.h
crypto/src/dap_cert_file.c
+1
-0
1 addition, 0 deletions
crypto/src/dap_cert_file.c
crypto/src/dap_sign.c
+11
-0
11 additions, 0 deletions
crypto/src/dap_sign.c
with
21 additions
and
0 deletions
crypto/include/dap_sign.h
+
9
−
0
View file @
d4c78e77
...
...
@@ -123,6 +123,14 @@ static inline int dap_sign_verify_all(dap_sign_t * a_sign, const size_t a_sign_s
}
return
0
;
}
/**
* @brief
* @return
*/
DAP_STATIC_INLINE
const
char
*
dap_sign_get_str_recommended_types
(){
return
"sig_dil
\n
sig_falcon
\n
sig_sphincs
\n
sig_shipovnik
\n
sig_multi_chained
\n
"
;
}
// Create sign of data hash with key provided algorythm of signing and hashing (independently)
dap_sign_t
*
dap_sign_create
(
dap_enc_key_t
*
a_key
,
const
void
*
a_data
,
const
size_t
a_data_size
,
size_t
a_output_wish_size
);
//Create sign on raw data without hashing. Singing algorythm is key provided
...
...
@@ -143,6 +151,7 @@ bool dap_sign_compare_pkeys(dap_sign_t *l_sign1, dap_sign_t *l_sign2);
dap_enc_key_t
*
dap_sign_to_enc_key
(
dap_sign_t
*
a_chain_sign
);
const
char
*
dap_sign_type_to_str
(
dap_sign_type_t
a_chain_sign_type
);
dap_sign_type_t
dap_sign_type_from_str
(
const
char
*
a_type_str
);
bool
dap_sign_type_is_depricated
(
dap_sign_type_t
a_sign_type
);
dap_sign_t
**
dap_sign_get_unique_signs
(
void
*
a_data
,
size_t
a_data_size
,
size_t
*
a_signs_count
);
void
dap_sign_get_information
(
dap_sign_t
*
a_sign
,
dap_string_t
*
a_str_out
,
const
char
*
a_hash_out_type
);
...
...
This diff is collapsed.
Click to expand it.
crypto/src/dap_cert_file.c
+
1
−
0
View file @
d4c78e77
...
...
@@ -64,6 +64,7 @@ int dap_cert_file_save(dap_cert_t * a_cert, const char * a_cert_file_path)
}
else
{
log_it
(
L_ERROR
,
"Can't serialize certificate in memory"
);
fclose
(
l_file
);
remove
(
a_cert_file_path
);
return
-
4
;
}
}
else
{
...
...
This diff is collapsed.
Click to expand it.
crypto/src/dap_sign.c
+
11
−
0
View file @
d4c78e77
...
...
@@ -168,6 +168,17 @@ dap_sign_type_t dap_sign_type_from_str(const char * a_type_str)
return
l_sign_type
;
}
/**
* @brief The function checks the signature type to see if it is outdated.
* @param a_sign_type
* @return bool
*/
bool
dap_sign_type_is_depricated
(
dap_sign_type_t
a_sign_type
){
if
(
a_sign_type
.
type
==
SIG_TYPE_PICNIC
||
a_sign_type
.
type
==
SIG_TYPE_BLISS
||
a_sign_type
.
type
==
SIG_TYPE_TESLA
)
return
true
;
return
false
;
}
/**
* @brief encrypt data
* call a_key->sign_get
...
...
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