summaryrefslogtreecommitdiff
path: root/sbin/iked
AgeCommit message (Collapse)Author
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@
2016-06-02Use the last 32-bits of the IPv6 address to dynamically assignPatrick Wildt
addresses from the pool, instead of the fourth byte, which usually represents network bits. ok markus@ mikeb@
2016-06-01Implement a second address pool specifically for IPv6, so thatPatrick Wildt
clients can be given an IPv4 and IPv6 address at the same time, thus enabling dual stack usage. ok markus@ mikeb@
2016-06-01ikev2_cp_fixaddr() is called to replace unspecified (e.g. 0.0.0.0)Patrick Wildt
addresses by specified (e.g. 192.0.2.1) ones. The function should return if the address is already set. The check was wrong for the IPv6 case, as it returned if it's not set. This caused the address to never be fixed. ok markus@ mikeb@
2016-03-07http -> https for IETF/IANA URLs in commentsmmcc
2016-01-27fyx typo. s,dynanic,dynamic,Gleydson Soares
OK reyk
2015-12-10comment typommcc
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-12-07Add imsg "peerid" to debug messages (only within -DDEBUG).Reyk Floeter
2015-12-07Sync proc.c, use shorter proc_compose[v]()Reyk Floeter
2015-12-07sync with vmdReyk Floeter
2015-12-05EAGAIN handling for imsg_read. OK henning@ benno@Claudio Jeker
2015-12-02remove unimplemented PF_KEY algorithms; ok sthen@ mpi@ mikeb@Christian Weisgerber
2015-11-23Replace socket_set_blockmode() and fcntl(fd, F_SETFL, O_NONBLOCK) callsReyk Floeter
with the SOCK_NONBLOCK flag to socket() and accept4(). OK claudio@ jung@
2015-11-22Update log.c: change fatal() and fatalx() into variadic functions,Reyk Floeter
include the process name, and replace all calls of fatal*(NULL) with fatal(__func__) for better debugging. OK benno@
2015-11-21Once again, fix the license text. After many years, we just cannotReyk Floeter
get rid of the "LOSS OF MIND" joke. Haha. We keep on removing it and it shows up again because it accidentally gets synced from somewhere else. bgpd and ospfd don't have it anymore, but their offsprings still carry it. If you see it, remove it, and, in the OpenBSD ISC case, use the original text from /usr/share/misc/license.template. All authors agree.
2015-11-21Move local logging functions to util.c (which is shared with ikectl),Reyk Floeter
sync log.c with relayd and httpd - all three daemons are using a copy of the same file now. Nevertheless, adding "extern int debug/verbose" in util.c is not super nice but helps for now. No functional change.
2015-11-19Simplify all instances of get_string() and get_data() using malloc() andmmcc
strndup(). ok millert@
2015-11-18pledge exposed a simple bug: the unprivileged child tried to print theReyk Floeter
policy after receiving it from the parent. print_policy -> print_proto -> getprotobynumber -> pledge abort because it tried to access /etc/protocols without rpath. It was just a debugging message that can be moved to the parent (printing the policy on the sender side and not the receiver side). The parent has rpath and dns. Issue found by sthen@ with "proto etherip" OK sthen@ benno@
2015-11-04Support Chacha20-Poly1305 for Child SAs; ok reykMike Belopuhov
2015-11-01replace "can not" with "cannot";Jason McIntyre
2015-10-31pastoChristian Weisgerber
2015-10-31RFC4754 specifies ECDSA-521 (sic), not -512. ok reyk@Christian Weisgerber
2015-10-23push LDSTATIC line down so it's not overridden by makefile.inc. ok reykTed Unangst
2015-10-22iked hereby pledges that it will run with restricted systemReyk Floeter
operations. This adds pledge(2) too all processes, including the iked parent process; the existing privsep design has been improved for better pledgeability. There haven't been any serious problems as it was already sane (eg. by receiving the PFKEYv2 and UDP sockets via fd passing). The control socket moved to an independent process to remove some abilities from the cert process. Committed in agreement with many but nobody was brave enough to OK it. Better testing will happen with having it in the tree. "It's the truth" deraadt@ "Let's see what happens" benno@
2015-10-22Stop linking iked -static: It was inherited from isakmpd that isReyk Floeter
-static for NFS-over-IPsec that might mount the libraries after /usr. The benefit of linking iked dynamic outweighs the historic reason, eg. to get full address space randomization and to benefit from libcrypto updates, so we turn it into a dynamic binary. OK deraadt@ naddy@
2015-10-20Fix ocsp by adding a missing TAILQ_INIT().Reyk Floeter
Confirmed by markus@ with an identical diff
2015-10-19break long lines in examples; ok jmc@Christian Weisgerber
2015-10-19Fix control_imsg_forward() by changing imsg_compose() toReyk Floeter
imsg_compose_event(). This was done by pyr@ in relayd/control.c -r1.32 (2009/06/05, ok eric@) but somehow didn't slip into other daemons that imported control.c.
2015-10-19Remove the ikev1 stub - Since I started iked, it has an empty privsepReyk Floeter
process for ISAKMP+IKEv1. I kept it to let somebody either contribute the old protocol one day, I never intended to implement IKEv1 myself, or to add a new kind of pipe to isakmpd to hand off IKEv1 messages. As IKEv2 is widely supported by all major OS and networking vendors now, I'm happy to scrap the idea of supporting ISAKMP+IKEv1. It is still possible to use isakmpd for legacy VPNs. OK mikeb@
2015-10-15Remove some unnecessary NULL-checks before free(). Change two bzero()mmcc
calls on pf data to explicit_bzero(). ok mikeb@
2015-10-02Curve25519 is now specified in draft-ietf-ipsecme-safecurves-00 (alongReyk Floeter
with Curve448). And we already support it. Mention it here to update the Id when it was assigned by IANA.
2015-10-02RFC7634 specifies ChaCha20-Poly1305 for IKEv2 and IPsec and IANAReyk Floeter
assigned an official ID 28 for it. This is good news, and we should really support it as well. Just add the ID for now. Discussed with mikeb@
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-10-02If the policy certreqtype is 0, use the global one instead.Reyk Floeter
This fixes EAP (user-based auth) with IKEv2 in El Capitan. OK mikeb@
2015-10-01Don't reject an "empty" CERTREQ (one with no CA hashes), instead treat it asStuart Henderson
if no CERTREQ were received. In conjunction with the previous iOS9 interop fix, this may fix an interop problem seen by Denis Lapshin with BlackBerry OS 10.3.1 and one of a number with firebrick.co.uk's IKEv2 implementation diagnosed by their developer Cliff Hones. ok reyk@
2015-10-01Fix interoperability with Apple iOS9: If we don't get a (valid)Reyk Floeter
CERTREQ but a CERT, respond with a local CERT that was selected based on our own policy instead of leaving it out. This seems to be valid with the RFC that makes the CERTREQ optional and allows to ignore it or to apply an own policy. OK mikeb@ sthen@
2015-08-26use 0xffff not 0xfffff for a 16 bit port constantJonathan Gray
ok mikeb@
2015-08-21Switch iked to C99-style fixed-width integer types.Reyk Floeter
OK mikeb@
2015-08-19Add missing OpenBSD CVS tag - no binary changeReyk Floeter
2015-08-19spacing (no binary change, verified with checksums)Reyk Floeter
2015-07-17Assign correct destination port value for the destination netmask.Mike Belopuhov
This repairs setup of SPD flows that specify port only on the one side of the from-to specification. ok markus
2015-07-14clarification from trondd;Jason McIntyre
ok mikeb
2015-07-07repair policy-ikesa-linking by replacing the broken RB_TREE w/TAILQMarkus Friedl
(e.g. the policy might be used-after-free on 'ikectl reconfig') ok mikeb@
2015-07-03Terminate 'config' keyword array with a NULL element.Mike Belopuhov
Reported by trondd at kagu-tsuchi ! com, thanks!
2015-06-11Use "compliant" header guards by avoiding the reserved '_' namespace.Reyk Floeter
Pointed out by Markus Elfring OK mikeb@ millert@
2015-06-05Fix coupling and decoupling operations.vgross
With help and ok from mikeb@
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@