summaryrefslogtreecommitdiff
path: root/sbin/iked
AgeCommit message (Collapse)Author
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@
2015-03-26initial support for RFC 7427 signatures, so we are no longerMarkus Friedl
restricted to SHA1 for RSA signatures. ok mikeb@
2015-02-28Reduce usage of predefined strings in manpages.Anthony J. Bentley
Predefined strings are not very portable across troff implementations, and they make the source much harder to read. Usually the intended character can be written directly. No output changes, except for two instances where the incorrect escape was used in the first place. tweaks + ok schwarze@
2015-02-15convert bcmp to memcmpTed Unangst
ok doug millert miod
2015-02-08Use AI_ADDRCONFIG when resolv hosts on startup.Reyk Floeter
OK henning@
2015-02-06unneeded getopt.hTheo de Raadt
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-15tell the truth about DES.Igor Sobrado
joint work with djm@ and jsing@ ok djm@
2015-01-12Don't forget about protocol specification when configuring flows.Mike Belopuhov
Tested by and OK claudio.
2015-01-02PFS stands for Perfect Forward Secrecy.Igor Sobrado
ok reyk@
2014-12-16Replace setpgrp(0, getpid()) with setpgid(0, 0). OK deraadt@ tedu@Todd C. Miller
2014-12-05Store return value of i2d_X509_NAME in a signed integer to makeMike Belopuhov
sure the negative error gets treated correctly and doesn't get accidentally promoted to a huge unsigned value. From Pedro Martelletto, thanks! OK reyk
2014-12-05Specify correct number of iovecs when sending replies to the ikev2 procMike Belopuhov
Crash reported and fix tested by Vincent Gross <dermiste at kilob ! yt>; patch from Pedro Martelletto, thanks!
2014-12-03Init SPI using arc4random_buf, rather than (r << 32) | rTheo de Raadt
ok matthew