private-key: Add optional method that returns supported signature schemes

This commit is contained in:
Tobias Brunner 2018-10-12 10:35:04 +02:00 committed by Andreas Steffen
parent 9b5b55b026
commit 1c4738325d
1 changed files with 13 additions and 0 deletions

View File

@ -39,6 +39,19 @@ struct private_key_t {
*/
key_type_t (*get_type)(private_key_t *this);
/**
* Get signature schemes supported by this key.
*
* This is useful for keys that only support certain hash algorithms or
* require specific parameters for RSA/PSS signatures.
*
* @note Implementing this method is optional. If multiple schemes are
* returned, they should be ordered by decreasing preference.
*
* @return enumerator over signature_params_t*
*/
enumerator_t *(*supported_signature_schemes)(private_key_t *this);
/**
* Create a signature over a chunk of data.
*