Skip to content

Commit a617304

Browse files
authored
Update vpn-gateway-strongswan-certificates-include.md
1 parent 50c3bcb commit a617304

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

includes/vpn-gateway-strongswan-certificates-include.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Generate the user certificate.
2727

2828
```
2929
export PASSWORD="password"
30-
export USERNAME="client"
30+
export USERNAME=$(hostnamectl --static)
3131
3232
ipsec pki --gen --outform pem > "${USERNAME}Key.pem"
3333
ipsec pki --pub --in "${USERNAME}Key.pem" | ipsec pki --issue --cacert caCert.pem --cakey caKey.pem --dn "CN=${USERNAME}" --san "${USERNAME}" --flag clientAuth --outform pem > "${USERNAME}Cert.pem"
@@ -37,4 +37,4 @@ Generate a p12 bundle containing the user certificate. This bundle will be used
3737

3838
```
3939
openssl pkcs12 -in "${USERNAME}Cert.pem" -inkey "${USERNAME}Key.pem" -certfile caCert.pem -export -out "${USERNAME}.p12" -password "pass:${PASSWORD}"
40-
```
40+
```

0 commit comments

Comments
 (0)