summaryrefslogtreecommitdiff
path: root/sbin/setkey
Commit message (Collapse)AuthorAgeFilesLines
* Refer to AES-CBC as "aes-cbc" rather than "rijndael-cbc" for IPsec.John Baldwin2020-06-042-3/+4
| | | | | | | | | | | | | | At this point, AES is the more common name for Rijndael128. setkey(8) will still accept the old name, and old constants remain for compatiblity. Reviewed by: cem, bcr (manpages) MFC after: 2 weeks Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D24964 Notes: svn path=/head/; revision=361810
* Add RFC reference for AES-CTR with IPsec.John Baldwin2020-05-041-2/+2
| | | | | | | | MFC after: 1 week Sponsored by: Chelsio Communications Notes: svn path=/head/; revision=360634
* Remove support for IPsec algorithms deprecated in r348205 and r360202.John Baldwin2020-05-024-99/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Examples of depecrated algorithms in manual pages and sample configs are updated where relevant. I removed the one example of combining ESP and AH (vs using a cipher and auth in ESP) as RFC 8221 says this combination is NOT RECOMMENDED. Specifically, this removes support for the following ciphers: - des-cbc - 3des-cbc - blowfish-cbc - cast128-cbc - des-deriv - des-32iv - camellia-cbc This also removes support for the following authentication algorithms: - hmac-md5 - keyed-md5 - keyed-sha1 - hmac-ripemd160 Reviewed by: cem, gnn (older verisons) Relnotes: yes Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D24342 Notes: svn path=/head/; revision=360557
* Remove the link to libl which only contains a stub functionBaptiste Daroussin2020-03-232-2/+2
| | | | | | | | on yywrap, if the flex is told yywrap is not in use, then this linkage becomes unnecessary Notes: svn path=/head/; revision=359241
* Revove useless linking to yaccBaptiste Daroussin2020-03-231-1/+1
| | | | Notes: svn path=/head/; revision=359239
* pkgbase: Create a FreeBSD-utilities package and make it the default oneEmmanuel Vadot2019-09-051-1/+0
| | | | | | | | | | | | | The default package use to be FreeBSD-runtime but it should only contain binaries and libs enough to boot to single user and repair the system, it is also very handy to have a package that can be tranform to a small mfsroot. So create a new package named FreeBSD-utilities and make it the default one. Also move a few binaries and lib into this package when it make sense. Reviewed by: bapt, gjb Differential Revision: https://reviews.freebsd.org/D21506 Notes: svn path=/head/; revision=351858
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-206-6/+18
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326025
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Add large replay widow support to setkey(8) and libipsec.Andrey V. Elsukov2017-04-132-2/+31
| | | | | | | | | | | | | | | | | | | | When the replay window size is large than UINT8_MAX, add to the request the SADB_X_EXT_SA_REPLAY extension header that was added in r309144. Also add support of SADB_X_EXT_NAT_T_TYPE, SADB_X_EXT_NAT_T_SPORT, SADB_X_EXT_NAT_T_DPORT, SADB_X_EXT_NAT_T_OAI, SADB_X_EXT_NAT_T_OAR, SADB_X_EXT_SA_REPLAY, SADB_X_EXT_NEW_ADDRESS_SRC, SADB_X_EXT_NEW_ADDRESS_DST extension headers to the key_debug that is used by `setkey -x`. Modify kdebug_sockaddr() to use inet_ntop() for IP addresses formatting. And modify kdebug_sadb_x_policy() to show policy scope and priority. Reviewed by: gnn, Emeric Poupon MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D10375 Notes: svn path=/head/; revision=316759
* Make setkey(8) more clear about anti-replay window size option semantics.Benedict Reuschling2017-04-091-4/+5
| | | | | | | | | | | PR: 172913 Submitted by: john@saltant.com Reviewed by: ae@ MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D10304 Notes: svn path=/head/; revision=316657
* Use unique SPI.Andrey V. Elsukov2017-04-041-1/+1
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=316508
* In the example section show that TCP-MD5 connection needs SA for bothAndrey V. Elsukov2017-04-041-1/+2
| | | | | | | | | | directions. Submitted by: Mike Tancsa <mike at sentex net> MFC after: 1 week Notes: svn path=/head/; revision=316507
* Fix CFLAGS for including netipsec headers #includesEnji Cooper2017-03-131-1/+1
| | | | | | | | | | | | | | | The netipsec headers are referenced via netipsec/..., not ./... . Thus, assuming that the netipsec/... is nested under ${SRCTOP}/sys/netipsec is wrong. This tripped up some individuals building ^/head on systems pre-r314812. MFC after: 1 week Reported by: Roberto Rodriguez Jr <rob.rodz.jr9@gmail.com> Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=315181
* Delete duplicate -I <SRCTOP>/lib/libipsec added in r171135Enji Cooper2017-03-121-1/+1
| | | | | | | | | | | It's already handled earlier on in the Makefile, per the change made in r80029. MFC after: 1 month Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=315094
* Introduce the concept of IPsec security policies scope.Andrey V. Elsukov2017-03-072-22/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently are defined three scopes: global, ifnet, and pcb. Generic security policies that IKE daemon can add via PF_KEY interface or an administrator creates with setkey(8) utility have GLOBAL scope. Such policies can be applied by the kernel to outgoing packets and checked agains inbound packets after IPsec processing. Security policies created by if_ipsec(4) interfaces have IFNET scope. Such policies are applied to packets that are passed through if_ipsec(4) interface. And security policies created by application using setsockopt() IP_IPSEC_POLICY option have PCB scope. Such policies are applied to packets related to specific socket. Currently there is no way to list PCB policies via setkey(8) utility. Modify setkey(8) and libipsec(3) to be able distinguish the scope of security policies in the `setkey -DP` listing. Add two optional flags: '-t' to list only policies related to virtual *tunneling* interfaces, i.e. policies with IFNET scope, and '-g' to list only policies with GLOBAL scope. By default policies from all scopes are listed. To implement this PF_KEY's sadb_x_policy structure was modified. sadb_x_policy_reserved field is used to pass the policy scope from the kernel to userland. SADB_SPDDUMP message extended to support filtering by scope: sadb_msg_satype field is used to specify bit mask of requested scopes. For IFNET policies the sadb_x_policy_priority field of struct sadb_x_policy is used to pass if_ipsec's interface if_index to the userland. For GLOBAL policies sadb_x_policy_priority is used only to manage order of security policies in the SPDB. For IFNET policies it is not used, so it can be used to keep if_index. After this change the output of `setkey -DP` now looks like: # setkey -DPt 0.0.0.0/0[any] 0.0.0.0/0[any] any in ipsec esp/tunnel/87.250.242.144-87.250.242.145/unique:145 spid=7 seq=3 pid=58025 scope=ifnet ifname=ipsec0 refcnt=1 # setkey -DPg ::/0 ::/0 icmp6 135,0 out none spid=5 seq=1 pid=872 scope=global refcnt=1 No objection from: #network Obtained from: Yandex LLC MFC after: 2 weeks Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D9805 Notes: svn path=/head/; revision=314812
* sbin: normalize paths using SRCTOP-relative paths or :H when possibleEnji Cooper2017-03-041-3/+3
| | | | | | | | | | This simplifies make logic/output MFC after: 1 month Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314656
* Document that the size of AH ICV for HMAC-SHA2-NNN should be half ofAndrey V. Elsukov2017-02-271-5/+4
| | | | | | | | | NNN bits as described in RFC4868. PR: 215978 Notes: svn path=/head/; revision=314339
* Merge projects/ipsec into head/.Andrey V. Elsukov2017-02-061-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Small summary ------------- o Almost all IPsec releated code was moved into sys/netipsec. o New kernel modules added: ipsec.ko and tcpmd5.ko. New kernel option IPSEC_SUPPORT added. It enables support for loading and unloading of ipsec.ko and tcpmd5.ko kernel modules. o IPSEC_NAT_T option was removed. Now NAT-T support is enabled by default. The UDP_ENCAP_ESPINUDP_NON_IKE encapsulation type support was removed. Added TCP/UDP checksum handling for inbound packets that were decapsulated by transport mode SAs. setkey(8) modified to show run-time NAT-T configuration of SA. o New network pseudo interface if_ipsec(4) added. For now it is build as part of ipsec.ko module (or with IPSEC kernel). It implements IPsec virtual tunnels to create route-based VPNs. o The network stack now invokes IPsec functions using special methods. The only one header file <netipsec/ipsec_support.h> should be included to declare all the needed things to work with IPsec. o All IPsec protocols handlers (ESP/AH/IPCOMP protosw) were removed. Now these protocols are handled directly via IPsec methods. o TCP_SIGNATURE support was reworked to be more close to RFC. o PF_KEY SADB was reworked: - now all security associations stored in the single SPI namespace, and all SAs MUST have unique SPI. - several hash tables added to speed up lookups in SADB. - SADB now uses rmlock to protect access, and concurrent threads can do SA lookups in the same time. - many PF_KEY message handlers were reworked to reflect changes in SADB. - SADB_UPDATE message was extended to support new PF_KEY headers: SADB_X_EXT_NEW_ADDRESS_SRC and SADB_X_EXT_NEW_ADDRESS_DST. They can be used by IKE daemon to change SA addresses. o ipsecrequest and secpolicy structures were cardinally changed to avoid locking protection for ipsecrequest. Now we support only limited number (4) of bundled SAs, but they are supported for both INET and INET6. o INPCB security policy cache was introduced. Each PCB now caches used security policies to avoid SP lookup for each packet. o For inbound security policies added the mode, when the kernel does check for full history of applied IPsec transforms. o References counting rules for security policies and security associations were changed. The proper SA locking added into xform code. o xform code was also changed. Now it is possible to unregister xforms. tdb_xxx structures were changed and renamed to reflect changes in SADB/SPDB, and changed rules for locking and refcounting. Reviewed by: gnn, wblock Obtained from: Yandex LLC Relnotes: yes Sponsored by: Yandex LLC Differential Revision: https://reviews.freebsd.org/D9352 Notes: svn path=/head/; revision=313330
* setkey appeared in FreeBSD 4.0Sevan Janiyan2016-10-031-1/+3
| | | | | | | | | | PR: 212551 Approved by: bcr (mentor) MFC after: 4 days Differential Revision: https://reviews.freebsd.org/D8105 Notes: svn path=/head/; revision=306616
* Use nitems() from sys/param.h.Marcelo Araujo2016-04-191-1/+1
| | | | | | | MFC after: 2 weeks. Notes: svn path=/head/; revision=298261
* MFHGlen Barber2016-03-021-6/+0
|\ | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=296318
| * DIRDEPS_BUILD: Regenerate without local dependencies.Bryan Drewery2016-02-241-6/+0
| | | | | | | | | | | | | | | | | | | | | | These are no longer needed after the recent 'beforebuild: depend' changes and hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supports skipping 'make depend'. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=295989
* | Explicitly add more files to the 'runtime' package.Glen Barber2016-02-091-0/+1
|/ | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295450
* Add support for keys that include 4 byte SALT values,George V. Neville-Neil2015-07-312-2/+25
| | | | | | | | | | | including GCM and ICM/CTR modes for AES. Reviewed by: jmg MFC after: 1 week Sponsored by: Rubicon Communications (Netgate) Notes: svn path=/head/; revision=286143
* Summary: Remove unsupported 3des-deriv encryption algorithm from documentation.George V. Neville-Neil2015-07-311-1/+0
| | | | Notes: svn path=/head/; revision=286138
* Update the date on the manual page.George V. Neville-Neil2015-07-031-1/+1
| | | | | | | Noticed by: bz Notes: svn path=/head/; revision=285111
* New AES modes for IPSec, user space components.George V. Neville-Neil2015-07-032-1/+3
| | | | | | | | | | | | | | | Update setkey and libipsec to understand aes-gcm-16 as an encryption method. A partial commit of the work in review D2936. Submitted by: eri Reviewed by: jmg MFC after: 2 weeks Sponsored by: Rubicon Communications (Netgate) Notes: svn path=/head/; revision=285108
* Fix support for the null encryption algorithm which now requiresGeorge V. Neville-Neil2015-06-251-1/+1
| | | | | | | | | a key. Sponsored by: Rubicon Communications (Netgate) Notes: svn path=/head/; revision=284816
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+29
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-272-4/+3
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge head from 7/28Simon J. Gerraty2014-08-191-11/+10
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=270164
| * | Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * | Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * | Merge from headSimon J. Gerraty2014-05-081-1/+1
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265720
| * | | Updated dependenciesSimon J. Gerraty2013-03-111-0/+2
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | | Sync with HEAD.David E. O'Brien2013-02-082-2/+2
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246555
| * \ \ \ Sync from headSimon J. Gerraty2012-11-041-1/+3
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242545
| * | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | | | Convert sbin/ to LIBADDBaptiste Daroussin2014-11-251-4/+2
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce overlinking Notes: svn path=/head/; revision=275030
* | | | | Fix spelling of Camellia algorithm. While here, replace blank linesWarren Block2014-07-251-11/+10
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | between examples with actual .Pp breaks. PR: 192067 Submitted by: dmitry2004@yandex.ru MFC after: 1 week Notes: svn path=/head/; revision=269091
* | | | Use src.opts.mk in preference to bsd.own.mk except where we need stuffWarner Losh2014-05-061-1/+1
| |_|/ |/| | | | | | | | | | | | | | | | | from the latter. Notes: svn path=/head/; revision=265420
* | | Correct prefix for "locally installed things"Eitan Adler2013-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Approved by: cperciva MFC After: 3 days Notes: svn path=/head/; revision=245492
* | | Minor wording improvments to some manual pagesEitan Adler2012-12-161-1/+1
| |/ |/| | | | | | | | | | | | | | | Approved by: bcr (mentor) Obtained from: DragonflyBSD (a5294ca835317c68c919ab43936da4f05ab6e926) MFC after: 3 days Notes: svn path=/head/; revision=244318
* | Minor mdoc improvements.Joel Dahl2012-06-031-1/+3
|/ | | | Notes: svn path=/head/; revision=236502
* Minor mdoc nits.Joel Dahl2012-05-131-10/+10
| | | | Notes: svn path=/head/; revision=235400
* mdoc: correct .Bd/.Bl arguments.Joel Dahl2012-03-261-8/+8
| | | | | | | Reviewed by: brueffer Notes: svn path=/head/; revision=233522
* Remove superfluous paragraph macro.Joel Dahl2012-03-251-1/+0
| | | | Notes: svn path=/head/; revision=233458
* mdoc: fix markupUlrich Spörlein2011-06-021-2/+3
| | | | Notes: svn path=/head/; revision=222599