Commit Graph
926 Commits
Author SHA1 Message Date
Clavister OpenSource adf7b76f4c IKEv1 XAuth: Temporarilty add an "initiate_later" flag to the task manager. When set to TRUE it will cause "initiate" to be called when the current process_response call is finished. This change should be reverted once we have a better method in place. 2012-03-20 17:30:51 +01:00
Martin Willi 9cc38c8efb Use quick mode task initiator flag instead of passing it as parameter 2012-03-20 17:30:51 +01:00
Martin Willi 4e0bc9af22 Add quick mode ID payloads only if establishing a non-host2host tunnel 2012-03-20 17:30:51 +01:00
Martin Willi c4b8539f93 Refactored traffic selector handling in quick mode 2012-03-20 17:30:51 +01:00
Martin Willi 818330aafe Refactored NONCE payload handling in quick mode 2012-03-20 17:30:51 +01:00
Tobias Brunner 78f7728c30 No need to build a HASH payload in XAUTH task.
It gets added automatically when the message is generated.
2012-03-20 17:30:51 +01:00
Martin Willi c4c5950458 Create host-to-host traffic selectors if quick mode identities missing 2012-03-20 17:30:51 +01:00
Martin Willi da063ec95e Fixed task_manager_v1 compiler warnings 2012-03-20 17:30:50 +01:00
Martin Willi 3e246c4883 Generate a new mid only after we start a new task (and exchange) 2012-03-20 17:30:50 +01:00
Martin Willi a7910b1c6e Derive IKEv1 CHILD_SA keymat twice, once for each IPsec SA 2012-03-20 17:30:50 +01:00
Martin Willi 85f5c478bf Fix seed construction for IKEv1 key derivation 2012-03-20 17:30:50 +01:00
Martin Willi 9cc8bd4fd2 Use a dedicated message hash to detect IKEv1 retransmissions 2012-03-20 17:30:50 +01:00
Tobias Brunner cd200cb821 Authenticate and verify Phase 2 IKEv1 messages with appropriate hashes. 2012-03-20 17:30:50 +01:00
Martin Willi b6016fcab3 Fixed a config reference leak in IKEv2 initiate 2012-03-20 17:30:49 +01:00
Martin Willi 384c1a32a2 XAUTH is initiated based on configuration, no need to call externally 2012-03-20 17:30:49 +01:00
Martin Willi 017d98bf39 Merged IKEv1 attribute payload/data into configuration payload/attribute 2012-03-20 17:30:49 +01:00
Clavister OpenSource df99e976be Temp fix for compile error with XAUTH code. 2012-03-20 17:30:49 +01:00
Clavister OpenSource 23f4e4b42d IKEv1 XAUTH: Added ability to configure XAUTH+PSK. Added task to handle XAUTH requests. Modified task_manager_v1 to enable it to initiate new tasks immediately after finishing a response. 2012-03-20 17:30:49 +01:00
Clavister OpenSource 79e9f776dc Updates ike_cert_post task with modifications needed for dealing with updated cert_payload class. 2012-03-20 17:30:49 +01:00
Martin Willi 5351d63c79 Install negotiated IKEv1 CHILD_SA negotiated in quick mode 2012-03-20 17:30:48 +01:00
Martin Willi ff2a2ad33a Implemented IKEv1 keymat CHILD_SA key derivation function 2012-03-20 17:30:48 +01:00
Martin Willi 6cd72730bf Moved keymat key length lookup functions to keymat.c 2012-03-20 17:30:48 +01:00
Martin Willi d4f6686c69 Extended PRF+ by a non-counting variant as used by IKEv1 2012-03-20 17:30:48 +01:00
Martin Willi a0b52db079 Refactored main mode NONCE/KE payload processing 2012-03-20 17:30:47 +01:00
Martin Willi a0f851cfe0 Refactored main mode HASH payload processing 2012-03-20 17:30:47 +01:00
Martin Willi 73380c8685 Skip any payloads in front of SA to extract initiators SA bytes 2012-03-20 17:30:47 +01:00
Martin Willi 21b7db99c6 Implemented quick mode protocol handling, no CHILD_SA or HASH payloads yet 2012-03-20 17:30:47 +01:00
Martin Willi 12b6a68a5f Add missing keymat cast to avoid compiler warning 2012-03-20 17:30:47 +01:00
Martin Willi 17ec1c74de Don't compare initiator flag in IKE_SA manager, pass initiator parameter to IKE_SA constructor 2012-03-20 17:30:47 +01:00
Martin Willi 1b99befac3 Create and verify PSK HASH payloads in IKEv1 main mode 2012-03-20 17:30:47 +01:00
Martin Willi 4eee34ac49 Added keymat_v1_t.get_hash() to calculate authentication hashes 2012-03-20 17:30:46 +01:00
Martin Willi 059d694a6b Derive IKE keys as IKEv1 initiator, too 2012-03-20 17:30:46 +01:00
Tobias Brunner b6f0029497 Added IV generation to keymat_v1_t. 2012-03-20 17:30:46 +01:00
Tobias Brunner 0463674971 Use key derivation in IKEv1 main mode (PSK authentication). 2012-03-20 17:30:46 +01:00
Tobias Brunner aadb9e8355 Added a simple AEAD wrapper for IKEv1 encryption/decryption. 2012-03-20 17:30:46 +01:00
Tobias Brunner b05d91edd7 Added IKEv1 key derivation with support for AUTH_CLASS_PSK. 2012-03-20 17:30:45 +01:00
Tobias Brunner 3d59c5c382 Update cached hosts on ike_sa_t when processing IKEv1 messages. 2012-03-20 17:30:45 +01:00
Tobias Brunner 0cec72df40 Provide keymat_t to message_t to encrypt/decrypt data. 2012-03-20 17:30:45 +01:00
Tobias Brunner a0563846b0 Moved version specific keymat functions to specific interfaces. 2012-03-20 17:30:45 +01:00
Martin Willi a09972df2b Added a generic TASK_ prefix to all task types 2012-03-20 17:30:45 +01:00
Martin Willi 744c080153 Initiate and respond to quick mode task (stub) 2012-03-20 17:30:45 +01:00
Martin Willi 9124e3425b Fixed reference counting bugs in main mode 2012-03-20 17:30:44 +01:00
Martin Willi 73aaf76be3 Implemented basic message id handling for IKEv1 2012-03-20 17:30:44 +01:00
Martin Willi 2b04aa46ea Added a quick mode task stub 2012-03-20 17:30:44 +01:00
Martin Willi c311d22d0f Don't clone chunk in message.get_packet_data 2012-03-20 17:30:44 +01:00
Martin Willi 31fc14e394 Verify IKEv1 nonce size, send 32 byte nonces 2012-03-20 17:30:44 +01:00
Martin Willi 6c2b7d4ed9 Partially implemented third main mode exchange (identities) 2012-03-20 17:30:44 +01:00
Martin Willi 26b55dc6c8 Implemented first two exchanges of Main Mode as initiator 2012-03-20 17:30:43 +01:00
Martin Willi 9cc63d2cf0 Added enum name for MAIN_MODE task 2012-03-20 17:30:43 +01:00
Martin Willi 558f79f76d Added missing task manager factory declaration 2012-03-20 17:30:43 +01:00