Skip to content
Snippets Groups Projects
Commit d4c78e77 authored by Roman Khlopkov's avatar Roman Khlopkov 🔜
Browse files

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!302Bugfix 12239
Pipeline #41684 passed with stage
in 48 minutes and 56 seconds
......@@ -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\nsig_falcon\nsig_sphincs\nsig_shipovnik\nsig_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);
......
......@@ -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{
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment