Add a return value to simaka_crypto_t.derive_keys_*()

This commit is contained in:
Martin Willi
2012-07-16 14:53:33 +02:00
parent 2e96de60a8
commit 86d2cdc1ed
6 changed files with 84 additions and 46 deletions
+11 -7
View File
@@ -62,10 +62,11 @@ struct simaka_crypto_t {
* @param id peer identity
* @param data method specific data
* @param mk chunk receiving allocated master key MK
* @return allocated MSK value
* @param msk chunk receiving allocated MSK
* @return TRUE if keys allocated and derived successfully
*/
chunk_t (*derive_keys_full)(simaka_crypto_t *this, identification_t *id,
chunk_t data, chunk_t *mk);
bool (*derive_keys_full)(simaka_crypto_t *this, identification_t *id,
chunk_t data, chunk_t *mk, chunk_t *msk);
/**
* Derive k_encr/k_auth keys from MK using fast reauthentication.
@@ -74,8 +75,9 @@ struct simaka_crypto_t {
* internal crypter/signer instances.
*
* @param mk master key
* @return TRUE if keys derived successfully
*/
void (*derive_keys_reauth)(simaka_crypto_t *this, chunk_t mk);
bool (*derive_keys_reauth)(simaka_crypto_t *this, chunk_t mk);
/**
* Derive MSK using fast reauthentication.
@@ -84,10 +86,12 @@ struct simaka_crypto_t {
* @param counter fast reauthentication counter value, network order
* @param nonce_s server generated NONCE_S value
* @param mk master key of last full authentication
* @param msk chunk receiving allocated MSK
* @return TRUE if MSK allocated and derived successfully
*/
chunk_t (*derive_keys_reauth_msk)(simaka_crypto_t *this,
identification_t *id, chunk_t counter,
chunk_t nonce_s, chunk_t mk);
bool (*derive_keys_reauth_msk)(simaka_crypto_t *this,
identification_t *id, chunk_t counter,
chunk_t nonce_s, chunk_t mk, chunk_t *msk);
/**
* Clear keys (partially) derived.