ocserv: support custom server SSL certificate#29638
Conversation
Add UCI options for the path to the server's SSL certificate and private key. This enables the use of a certificate provided by an external certificate authority instead of the default self-signed certificate. The self-signed certificate is still produced if it doesn't already exist, and is used by default. So this change should be transparent to existing users. Fixes openwrt#23099. Signed-off-by: Jack Lovell <jacklovell1990@gmail.com>
|
LGTM. My main concern is how would this be used with letsencrypt or so? |
|
One would use LetsEncrypt to generate a certificate and key pair, for example using the ACME package - I prefer using the DNS-01 challenge available with the For example, a certificate for the It's possible to use The ocserv configuration is intentionally agnostic to the method used to obtain a certificate, in case users have a certificate from another provider: there are commercial certificate authorities who may provide certificates for example. It also future-proofs the package in case the acme interface changes or another free provider gains popularity. If this PR gets merged I would update https://openwrt.org/docs/guide-user/services/vpn/openconnect/server with instructions for how to use a custom certificate, linking to the LetsEncrypt instructions for obtaining one with acme. |
Add UCI options for the path to the server's SSL certificate and private key. This enables the use of a certificate provided by an external certificate authority instead of the default self-signed certificate.
The self-signed certificate is still produced if it doesn't already exist, and is used by default. So this change should be transparent to existing users.
Fixes #23099.
This is the commit from #29604 cherry-picked to the master branch instead of 25.12. Tested in the OpenWRT rootfs docker container, but not on actual hardware.
📦 Package Details
Maintainer: @nmav
Description:
Add UCI options for the path to the server's SSL certificate and private key. This enables the use of a certificate provided by an external certificate authority instead of the default self-signed certificate.
🧪 Run Testing Details
✅ Formalities
If your PR contains a patch:
git am(e.g., subject line, commit description, etc.)
We must try to upstream patches to reduce maintenance burden.