Commit Graph
65 Commits
Author SHA1 Message Date
Martin Willi 5f2f864efc Support IKEv1 notifies in message_t.get_notify() 2012-03-20 17:31:35 +01:00
Tobias Brunner bd8d1f1d9c Accept unencrypted Aggressive Mode messages.
Racoon does not encrypt the third message during Aggressive Mode.
2012-03-20 17:31:34 +01:00
Martin Willi ebc7bcb550 Encrypt payloads of third aggressive mode message 2012-03-20 17:31:33 +01:00
Martin Willi 07b8ec7c00 Cast keymat safely, not based on external input 2012-03-20 17:31:30 +01:00
Martin Willi 82b1e5e270 Accept NULL as keymat when generating a message 2012-03-20 17:31:29 +01:00
Martin Willi 15a682f4c2 Separated libcharon/sa directory with ikev1 and ikev2 subfolders 2012-03-20 17:31:26 +01:00
Martin Willi 5d0458af0a Another set of cleanups in message.c 2012-03-20 17:31:25 +01:00
Martin Willi b9a707e696 Some coding style cleanups 2012-03-20 17:31:25 +01:00
Martin Willi a4cc071364 Do not trust unprotected INFORMATIONALS, just print that we got one 2012-03-20 17:31:23 +01:00
Martin Willi 3ba15819ed Remove executable flag from source code files 2012-03-20 17:31:22 +01:00
Clavister OpenSource b8383f1f2d Encrypt INFORMATIONAL exchange if needed 2012-03-20 17:31:14 +01:00
Clavister OpenSource 5d1eeec297 Handle incoming delete messages 2012-03-20 17:31:13 +01:00
Clavister OpenSource 7d9269bfce certificate handling for XAuth responder. 2012-03-20 17:31:11 +01:00
Clavister OpenSource 07abb470c6 IKEv1: Added basic support for INFORMATIONAL exchange types, and for NOTIFY_V1 messages in the 3rd message in quick_mode. 2012-03-20 17:31:11 +01:00
Tobias Brunner a0bea44a97 Message rules for IKEv1 NAT-T payloads added. 2012-03-20 17:31:10 +01:00
Tobias Brunner 1e97783c99 Added payloads for IKEv1 NAT-Traversal negotiation. 2012-03-20 17:31:09 +01:00
Tobias Brunner 37639e94fb Handle invalid IKEv1 hashes more specifically. 2012-03-20 17:31:08 +01:00
Tobias Brunner 29a5e0707e Handle unsupported IKEv1 exchange types more specifically. 2012-03-20 17:31:08 +01:00
Tobias Brunner 983e852af8 Handle INFORMATIONAL_V1 messages when no keys have been derived yet.
This allows to gracefully process the INFORMATIONAL_V1 message rules which
require the payloads to be encrypted and thus the exchange to be
authenticated with a HASH payload.  If such an exchange is now initiated
before the ISAKMP_SA is established, the message is simply sent unencrypted
and without HASH payload.
2012-03-20 17:31:08 +01:00
Tobias Brunner f4e21faa98 Fixed encryption of IKEv2 messages. 2012-03-20 17:30:50 +01:00
Martin Willi d020d4d695 Print message payload names after prepending IKEv1 HASH payload 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 017d98bf39 Merged IKEv1 attribute payload/data into configuration payload/attribute 2012-03-20 17:30:49 +01:00
Clavister OpenSource 54a8a94fa9 IKEv1 ConfigMode: Added TRANSACTION exchange type. Added attribute_payload (IKEv2 equiv cp_payload) and data_attribute (IKEv2 equiv configuration_attribute) payload types. Did not combine with IKEv2 because it wasn't trivial to do so. This might be a task worth investigating in the future, because there is a decent amount of shared code here. 2012-03-20 17:30:49 +01:00
Tobias Brunner d66199884f Set flags on message according to IKE version when parsing header. 2012-03-20 17:30:46 +01:00
Tobias Brunner c92f2cf36d Encrypt IKEv1 messages. 2012-03-20 17:30:46 +01:00
Tobias Brunner 477e856a15 Decrypt IKEv1 messages. 2012-03-20 17:30:46 +01:00
Tobias Brunner 0cec72df40 Provide keymat_t to message_t to encrypt/decrypt data. 2012-03-20 17:30:45 +01:00
Martin Willi 3bd5fcc832 Print message ID as unsigned integer 2012-03-20 17:30:45 +01:00
Martin Willi 9e40e3e9fa Added message encoding rules for quick mode 2012-03-20 17:30:45 +01:00
Martin Willi c311d22d0f Don't clone chunk in message.get_packet_data 2012-03-20 17:30:44 +01:00
Martin Willi 04ee2b7fed Added IKEv1 support to notify payload 2012-03-20 17:30:43 +01:00
Martin Willi bce8d3be11 Don't set IKEv2 only header flags when using IKEv1 2012-03-20 17:30:41 +01:00
Tobias Brunner 354ac9579f Compile error fixed. 2012-03-20 17:30:41 +01:00
Tobias Brunner 7f56cf1a65 Message parsing slightly refactored, allows parsing of unencrypted IKEv1 messages. 2012-03-20 17:30:40 +01:00
Tobias Brunner 4ed52db2bb Allow creation of message_t objects for IKEv1 packets. 2012-03-20 17:30:40 +01:00
Tobias Brunner 8a2d079d78 Certificate request payloads can be sent in pretty much any IKEv1 message. 2012-03-20 17:30:40 +01:00
Tobias Brunner 8f3aea2f77 Message rules for IKEv1 INFORMATIONAL exchange added.
Since INFORMATIONAL "exchanges" are actually unidirectionally sent
message we don't have any responder rules.
2012-03-20 17:30:40 +01:00
Tobias Brunner 130c9a54c2 Message rules for IKEv1 AGGRESSIVE exchange added.
These are basically the same as for ID_PROT but no payloads are expected
to be encrypted (at least if using PSK or signatures for authentication).
2012-03-20 17:30:40 +01:00
Tobias Brunner 6ba70ba8dd Message rules for IKEv1 ID_PROT exchange added.
These rules are quite broad and cover main mode with at least PSK and
signature based authentication.
2012-03-20 17:30:40 +01:00
Martin Willi 526b5afb45 Extended IKE header for IKEv1 support 2012-03-20 17:30:39 +01:00
Andreas Steffen a022f0863d increased message buffer to cope with NCP's innumerable UNITY Configuration Payloads 2011-08-16 23:22:20 +02:00
Martin Willi 61e13630f8 Show error code of Microsoft specific error notify 2011-08-03 12:01:15 +02:00
Tobias Brunner f3bb1bd039 Fixed common misspellings.
Mostly found by 'codespell'.
2011-07-20 16:14:10 +02:00
Tobias Brunner a07568cf6a Use has_more in decrypt_payloads instead of calling enumerate twice. 2011-07-06 09:43:46 +02:00
Martin Willi 6d41218ced Be a little more liberal in checking maximum payload count 2011-04-20 15:15:00 +02:00
Martin Willi f7aca91603 Accept IKE_SA_INIT responses without CERTIFICATE_REQUESTs 2011-04-20 15:04:02 +02:00
Martin Willi fe79cd4257 Accept non-encrypted INFORMATIONALs for ME connectivity checks 2011-02-01 09:47:36 +01:00
Martin Willi 9ca5d0280e Moved check if packet already encoded to ike_sa, avoids message() hook invocation twice 2011-01-05 16:45:52 +01:00
Martin Willi 2813be18f5 Added a message method to set the "higher version supported" flag 2011-01-05 16:45:52 +01:00