diff options
author | Reto Buerki <reet@codelabs.ch> | 2012-10-16 16:42:23 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2013-03-19 15:23:49 +0100 |
commit | fe504b745d1a4eaf49fa60d62dc351aae1de1f93 (patch) | |
tree | a5946cfac4b7a1d163c1b134dc627fea93c0c808 /src | |
parent | a2f97ff8607912a0955f48322153b8d20c551b66 (diff) | |
download | strongswan-fe504b745d1a4eaf49fa60d62dc351aae1de1f93.tar.bz2 strongswan-fe504b745d1a4eaf49fa60d62dc351aae1de1f93.tar.xz |
keymat: Store signature info in auth octets
Store the ISA context id and the initial message in the auth octets
chunk using the sign_info_t struct. Charon will pass on this information
to the TKM private key sign operation where it is extracted.
Diffstat (limited to 'src')
-rw-r--r-- | src/charon-tkm/src/tkm/tkm_keymat.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/charon-tkm/src/tkm/tkm_keymat.c b/src/charon-tkm/src/tkm/tkm_keymat.c index 2fc5d60eb..95261d8c3 100644 --- a/src/charon-tkm/src/tkm/tkm_keymat.c +++ b/src/charon-tkm/src/tkm/tkm_keymat.c @@ -366,9 +366,21 @@ METHOD(keymat_v2_t, get_auth_octets, bool, { /* store peer init message for authentication step */ this->other_init_msg = chunk_clone(ike_sa_init); + *octets = chunk_empty; + return TRUE; } - DBG1(DBG_IKE, "returning auth octets"); - *octets = chunk_empty; + + sign_info_t *sign; + INIT(sign, + .isa_id = this->isa_ctx_id, + .init_message = chunk_clone(ike_sa_init), + ); + + /* + * store signature info in AUTH octets, which is passed to the private key + * sign() operation + */ + *octets = chunk_create((u_char *)sign, sizeof(sign_info_t)); return TRUE; } |