diff options
author | Yves-Alexis Perez <corsac@debian.org> | 2013-01-02 14:18:20 +0100 |
---|---|---|
committer | Yves-Alexis Perez <corsac@debian.org> | 2013-01-02 14:18:20 +0100 |
commit | c1343b3278cdf99533b7902744d15969f9d6fdc1 (patch) | |
tree | d5ed3dc5677a59260ec41cd39bb284d3e94c91b3 /src/libsimaka/simaka_crypto.h | |
parent | b34738ed08c2227300d554b139e2495ca5da97d6 (diff) | |
download | vyos-strongswan-c1343b3278cdf99533b7902744d15969f9d6fdc1.tar.gz vyos-strongswan-c1343b3278cdf99533b7902744d15969f9d6fdc1.zip |
Imported Upstream version 5.0.1
Diffstat (limited to 'src/libsimaka/simaka_crypto.h')
-rw-r--r-- | src/libsimaka/simaka_crypto.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/libsimaka/simaka_crypto.h b/src/libsimaka/simaka_crypto.h index d1830e658..c07755865 100644 --- a/src/libsimaka/simaka_crypto.h +++ b/src/libsimaka/simaka_crypto.h @@ -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. |