Libreswan Documentation

Logo

Libreswan's Online Documentation

View the Project on GitHub libreswan/libreswan.github.io

Support
FAQ Common Error Messages
History
Implemented Standards
Kernel Support
HOWTO Additional ipsec.conf documentation
AWS Mesh
brendans Road Warrior Setup at Home
Configuration examples
Confuse !?@: github wiki
Enterprise cloud encryption
Entropy matters
EoIP shared ethernet LAN using IPsec
High Availability Fallover VPN in AWS
Host to host VPN
Host to host VPN with PSK
Libreswan as client to a Cisco ASA or VPN3000 server
Microsoft Azure configuration
Migrate from IKEv1 DPD to IKEv2 LIVENESS
Opportunistic IPsec
Opportunistic IPsec using LetsEncrypt
Pluto and DNSSEC
Read status output
Route based VPN
SElinux and Labeled IPsec VPN
Subnet extrusion
Subnet to subnet using NAT
Subnet to subnet VPN
Subnet to subnet VPN with PSK
Unauthenticated Opportunistic IPsec
Using Apache to serve PKCS
Using NSS Hardware Tokens
Using NSS with libreswan
VPN server for remote clients using IKEv2
VPN server for remote clients using IKEv2 split VPN
GSoC
2023 Code Project Ideas
2026 Code Project Ideas
Contributor Guidance DRAFT
Contributor Guidance FINAL
2027 Code Project Ideas
Contributor Guidance
GSoC OnBoarding
Completed Projects 2026 RFC 9593 Announcing Supported Authentication Methods in IKEv2
2026 Improve the ACQUIRE to IKE policy lookup
2026 Add HOST TO HOST Support on BSD
2021 RFC 8420 Add EdDSA Signature Authentication Support to IKEv2
2020 Session Resumption
2020 IKEv2 Interop testing with OpenBSD
2020 IKE Intermediate Exchange
2019 Libreswan Opportunistic IPsec using LetsEncrypt
2018 RSA PSS Support in compliance with RFC 7427 and RFC 8247
2018 RFC 7427 Add ECDSA Signature Authentication Support to IKEv2
2018 RFC 5685 Redirect Mechanism
2018 Managing Interface
2017 TCP encapsulation of IKE and IPsec
2017 RFC 7427 Add Signature Authentication Support to IKEv2
2017 Postquantum Preshared Keys
Presentations
IRC
Hacking Documentation
Git, GitHub, and Pull Requests
Merging GitHub Pull Requests
Programming Conventions
Release Engineering
Slop
Testing Docker
Hacks IKEv1
Retransmits and Timeouts
KVM 1. Setup The Host
2. Configure Testing
3. Compile Libreswan
4. Test Libreswan
5. Accessing The Console
6. Maintenance and Internals
Bisecting
Debugging Pluto
Logging In Using SSH
Performance
Running A Custom Kernel
Running A Single Test
Running In The Background
Setup a Web Server
Testing Old Branches
Updating Test Results
Namespace Magic
Namespaces
Topology
Internals 3.14 X509
Benchmarking and Performance testing
Cipher suites and algorithm support
Cloud OE ideas
Compiling with AddressSanitizer
Compliance of RFC 7427 Signature Authentication in IKEv2
Coverity
Cryptographic Acceleration
Developer links strongswan android
Discouraged or forbidden C functions
IKEv2 Child SA
IKEv2 CP and EAP support
Introduction
Libreswan xfrm kernel support
Logging cleanup
New OE
Pluto
Pluto packet processing
Proposed ipsec ca command
Retransmit timings
Road Map
SAref code
Setting up system for debug logging
stf status
Testing 2017 Next Generation
Unbound
Uncrustify
Use Cases and Requirements document for ECC ECDSA support
Use Cases and Requirements document
XFRM Interface Development Notes
XFRM pCPU
XFRM pCPU RSS
Security Crypto boundary and certification
Libreswan and Heartbleed
Libreswan and TunnelCrack
Reporting a Vulnerability
Vulnerabilities
Meetups 2013 Helsinki
2014 San Francisco
2014 Toronto
2018 Toronto
Obsolete HOWTOs IKEv1 XAUTH with FreeOTP and FreeIPA
IKEv1 XAUTH with Google Authenticator One Time Passwords
Route based VPN using VTI
Testing Namespace
VPN server for remote clients using IKEv1 with L2TP
VPN server for remote clients using IKEv1 XAUTH with Certificates
VPN server for remote clients using IKEv1 XAUTH with PSK

Merging GitHub Pull Requests

Note: this is written from the POV of merging a contributors changes. But the same applies when merging your own changes.

Why Merge?

The goals are:

For instance, given:

       .- [PULL] --> TESTS -> CODE -> DOCS    <-- TESTSUITE PASSES
      /
... u0 -- [main] -> OTHER -> STUFF            <-- TESTSUITE PASSES

Then after the merge:

       .- [PULL-REQUEST] -> CODE -> TESTS -> DOCS       <-- PASSES
      /                                          \  
... u0 -- [main] -> OTHER -> STUFF -> [PASSES]   MERGE  <-- SHOULD PASS

The the branch, pre-merge commit and merge are all available for testing.

Since a rebase puts the test and code changes directly into mainline that no longer holds:

... u0 -- [main] -> OTHER -> STUFF 
                                  \
                                   TESTS      <- BREAKS TESTSUITE
                                    \
                                     CODE     <- FIXES TESTSUITE
                                      \
                                       DOCS   <- FIXES TESTSUITE

What Not To Do

The Setup

The notes below were made with a fresh repo set up as described below. With so many pull-requests to deal with, occasionally starting with a clean slate helps.

If you haven’t already, I strongly recommend installing and using pretty-git-prompt (this seems to be missing on Debian?).

sudo dnf install pretty-git-prompt
$ grep PS1 ~/.bashrc
export PS1="[\u@\h \W \$(pretty-git-prompt)]\\$ "

Now set up an empty repo and import libreswan:

mkdir git-hub
cd git-hub
git init
git remote add libreswan ...
git fetch libreswan
git checkout main

Getting the ${HANDLE} and ${BRANCH}

At the bottom of the pull request View command line instructions. From there get the GitHub HANDLE and BRANCH (it’s assumed HANDLE’s repo is called libreswan.git. They will be used below (I’d not bother setting these up as variables, they are too short lived).

Fetch the branch

[main]$ git remote add ${HANDLE} git@github.com:${HANDLE}/libreswan.git
[main]$ git fetch ${HANDLE}

At this point, it’s probably a good idea to run tests.

Merge the branch

Lets assume the branch is 100% tested and complete. It involves the following steps:

  1. Create the Merge
  2. Cleanup the Merge
  3. Push

Create The Merge

[${BRANCH}]$ git checkout main
[main]$ git merge --no-ff ${HANDLE}/${BRANCH}
[main ^NNN]$ make -j
[main ^NNN]$ ./kvm test-clean install check

Cleanup The Merge

[main]$ git commit --signoff --amend --author 'get it from a branch commit'

Re-test?

Push

But first check over the results.

[main]$ gitk
[main]$ git push

Alternatives

The rebase merge.

Who knew. GitHub lets us push to pull-request branches!

If the pull-request be getting stale, or you see that some tweaking is needed, consider first rebasing:

now continue with the cleanup above

Developers

Since developers can commit directly to the repo they’re afforded some leeway.

Standalone changes don’t tend to be merged

For instance:

but this doesn’t apply to pull-requests or more substantive changes.

Want to Live on the Edge?

See Bubble Merging.