RESPONDER_IP— the strongSwan host with the CryptoHub endpointINITIATOR_IP— the peer host
On the responder: create the initiator’s key and certificate
The initiator’s certificate is issued by the same CryptoHub-resident CA, so both peers trust one root.Shell
Shell
Shell
--verify reports certificate trusted, lifetimes valid.Transfer the initiator’s files
Copy these three files from the responder to the initiator:peer-key.pempeer-cert.pemstrongswanCert.pem
scp where available:
Shell
python3 -m http.server 8080 --bind RESPONDER_IP, fetch them with wget, then stop the server with Ctrl+C. Do not use this method for a key you intend to keep.
On the responder: configure the HSM-backed connection
Shell
You already ran these commands in Validate charon can load the HSM-backed private key. They are idempotent; re-run them if you are picking up from a fresh host.
/etc/swanctl/swanctl.conf with a configuration that has both a connection and the token credential:
swanctl.conf
Shell
--load-all reports loaded certificate, loaded token, and loaded connection 'responder'. --list-conns lists the responder connection with the net child.On the initiator: configure the file-based connection
Shell
swanctl.conf
Shell
Both hosts list their connection, and the local
id on each matches the remote id on the other. A mismatch here is the most common cause of an authentication failure in the next section.
