summaryrefslogtreecommitdiff
path: root/sbin/iked/parse.y
AgeCommit message (Collapse)Author
2019-11-12Add configuration options to explicitly specify ESN support for child SAs.tobhe
The default behaviour remains unchanged. ok mikeb@ bluhm@
2019-09-26Fix leaks by cleaning up after configuration parser.tobhe
ok bluhm@
2019-08-26Fix file descriptor leak in config parser. Inspired by bgpd parse.y.tobhe
ok patrick@
2019-08-16Fix segfault in parser when specifying an invalid transform.tobhe
For all transforms the error case only printed the error but did not exit. YYERROR was added to exit gracefully instead of segfaulting later. ok benno@
2019-06-28When system calls indicate an error they return -1, not some arbitraryTheo de Raadt
value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
2019-05-11Add support for IKEv2 Message Fragmentation as defined in RFC 7383.Patrick Wildt
ok sthen@
2019-04-02When curve25519 was added to iked, it was based on the internet-draft andStuart Henderson
used a private-use group number. Switch to the group number assigned in RFC8031 as used in other implementations. "this is the right time" deraadt@ "I like the idea" reyk@ If you use iked<>iked and have configured curve25519 in iked.conf (this is not the default), you can switch to another PFS group before updating then switch back. OpenBSD 6.3+ allows multiple "ikesa" lines so the initiator can choose which to use.
2019-02-13(unsigned) means (unsigned int) which on ptrdiff_t or size_t or otherTheo de Raadt
larger types really is a range reduction... Almost any cast to (unsigned) is a bug. ok millert tb benno
2018-11-07sync cmdline_symset() changes with src/usr.sbin; OK sashan@ claudio@miko
2018-11-01- odd condition/test in PF lexerAlexandr Nedvedicky
(and other lexers too) This commit rectifies earlier change: in the lex... even inside quotes, a \ followed by space or tab should expand to space or tab, and a \ followed by newline should be ignored (as a line continuation). compatible with the needs of hoststated (which has the most strict quoted string requirements), and ifstated (where one commonly does line continuations in strings). OK deraadt@, OK millert@
2018-07-11Do for most running out of memory err() what was done for most runningKenneth R Westerback
out of memory log_warn(). i.e. ("%s", __func__) instead of manual function names and redundant verbiage about which wrapper detected the out of memory condition. ok henning@
2018-07-09No need to mention which memory allocation entry point failed (malloc,Kenneth R Westerback
calloc or strdup), we just need to log that we ran out of memory in a particular function. Recommended by florian@ and deraadt@ ok benno@ henning@ tb@
2018-07-08Be consistent in warn() and log_warn() usage whenKenneth R Westerback
running out of memory. Next step, be correct *and* consistent. ok dennis@ tb@ benno@ schwarze@
2018-06-11Fix an off-by-one line count when using include statements.denis
Thanks to otto@ for the initial diff. OK benno@
2018-04-26Plug leak in error case of the common 'varset' implementations.Kenneth R Westerback
ok benno@
2018-01-31Add support for specifying multiple transforms within a single proposal.Patrick Wildt
This gives us more flexibilty for negotiating with other IKEv2 setups. Tested by and ok sthen@
2018-01-24Implement support for specifying multiple proposals. This means we canPatrick Wildt
have a higher flexibility in negotiating with other peers, or even ease migration from one proposal to a more secure one. ok sthen@
2017-12-01The RFC specifies that in an SA payload the proposals must be numberedPatrick Wildt
starting with number 1. Subsequent proposals must be one more than the previous proposal. ok sthen@
2017-11-27Implement MOBIKE (RFC 4555) support in iked(8), with us acting asPatrick Wildt
responder. In practice this support means that clients like iPhones can roam in different networks (LTE, WiFi) and change their external addresses without having to re-do the whole handshake. It allows the client to choose how and when to change the external tunnel endpoint addresses on demand, depending on which network is better or even is connected at all. ok sthen@ tweaks from jmc@ tested by a handful
2017-11-15Reset the OCSP URL on config reload. Otherwise we end up not beingPatrick Wildt
able to disable OCSP without restarting iked. ok beck@ sthen@
2017-04-24Fix configuration of ASN1_DN IDs.Reyk Floeter
Public key authentication uses public key files that are stored in the /etc/iked/pubkeys/ directory where the IKE IDs are encoded as filenames. This does not simply work with ASN1_DNs where the IDs include slashes and other special characters. Instead of breaking and failing when an ASN1_DN is configured, simply skip the public key lookup but allow to use it with certificates or PSKs. Reported and fix tested by Igor V. Gubenko - Thanks.
2017-03-28Remove RSA from the list of keywords, lookup is now done in a table.Reyk Floeter
This lets us configure explicit old-style RSA again. OK mikeb@
2017-03-27Factor out flows into separate configuration messagesMike Belopuhov
We reach an imsg payload limit with just a few traffic selectors so in order to load more we need to split them up and send separately. Suggested and OK reyk
2017-03-27Add support for RFC4754 (ECDSA) and RFC7427 authentication.Reyk Floeter
These modes provide stronger and more flexible ways for authentication: while RSA public key auth relies on SHA-1 hashes, the news modes use SHA2-256 and up to SHA2-512 hashes. Original diff from markus@ with patches from mikeb@ and me. OK mikeb@ patrick@
2017-01-20Check bounds of the flows array when configuring traffic selectorsMike Belopuhov
From and OK markus@, OK reyk
2017-01-05Replace symset()'s hand-rolled for(;;) traversal of 'symhead' TAILQKenneth R Westerback
with more modern TAILQ_FOREACH(). This what symget() was already doing. Add paranoia '{}' around body of symget()'s TAILQ_FOREACH(). No intentional functional change. ok bluhm@ otto@
2017-01-04Remove modular exponential groups specified in RFC5114Mike Belopuhov
Brought up by doug@, ok reyk, djm, doug
2016-09-03Add the missing bits to have NAT on enc(4) support in iked.Vincent Gross
Ok mikeb@
2016-08-06Unbreak PSK authentication, broken by previous.Pascal Stumpf
ok reyk@ florian@
2016-07-20When parsing the configuration. initialize the auth structureReyk Floeter
correctly, as parse.y's $$ is not zero-initialized. Found by Rene Ammerlaan OK markus@ florian@
2016-06-21do not allow whitespace in macro names, i.e. "this is" = "a variable".Sebastian Benoit
change this in all config parsers in our tree that support macros. problem reported by sven falempin. feedback from henning@, stsp@, deraadt@ ok florian@ mikeb@
2015-12-09Remove plain DES encryption from IPsec.Christian Weisgerber
DES is insecure since brute force attacks are practical due to its short key length. This removes support for DES-CBC encryption in ESP and in IKE main and quick mode from the kernel, isakmpd(8), ipsecctl(8), and iked(8). ok mikeb@
2015-11-04Support Chacha20-Poly1305 for Child SAs; ok reykMike Belopuhov
2015-10-31RFC4754 specifies ECDSA-521 (sic), not -512. ok reyk@Christian Weisgerber
2015-10-02Remove MD5 from the default proposals. At least SHA1 seems to be theReyk Floeter
minimum out there. Even El Capitan announces 3DES and SHA1 instead of MD5. OK mikeb@
2015-08-21Switch iked to C99-style fixed-width integer types.Reyk Floeter
OK mikeb@
2015-08-19spacing (no binary change, verified with checksums)Reyk Floeter
2015-07-03Terminate 'config' keyword array with a NULL element.Mike Belopuhov
Reported by trondd at kagu-tsuchi ! com, thanks!
2015-06-03Do not assume that asprintf() clears the pointer on failure, whichTodd C. Miller
is non-portable. Also add missing asprintf() return value checks. OK deraadt@ guenther@ doug@
2015-02-08Use AI_ADDRCONFIG when resolv hosts on startup.Reyk Floeter
OK henning@
2015-01-19Remove unnecessary <netinet/ip_ipsp.h> includesMike Belopuhov
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
2015-01-12Don't forget about protocol specification when configuring flows.Mike Belopuhov
Tested by and OK claudio.
2014-11-20Don't allow embedded nul characters in strings.Jonathan Gray
Fixes a pfctl crash with an anchor name containing an embedded nul found with the afl fuzzer. pfctl parse.y patch from and ok deraadt@
2014-11-14Add gcc printf format attributes to iked's parse.y and remove unusedDoug Hogan
yywarn() definition. ok bluhm@
2014-08-27Add support for Curve25519 using the public domain code that is foundReyk Floeter
in OpenSSH. The "private use" DH group 1034 is based on the value that was picked by strongswan recently. OK mikeb@ markus@
2014-08-25Add support for DH groups 27-30 using the Brainpool curves which haveReyk Floeter
previously been added to LibreSSL's libcrypto. ok markus@ mikeb@
2014-05-06initiate ike sa rekeying (ikesalifetime keyword), re-queue pfkeyMarkus Friedl
events while we are busy initiating child-SAs; ok mikeb@
2014-02-17basic OCSP support. enable with 'set ocsp "http://10.0.0.10:8888/"'Markus Friedl
ok mikeb@
2014-02-14initial support for IPCompMarkus Friedl
still experimental and rekeying needs some work; ok mikeb@