*Borat voice*GREAT SUCCESS
This test is done on the caddy system so I have direct access to the CA.
```
root@caddy-testing:~# openssl genpkey -algorithm RSA -out client.key
root@caddy-testing:~# openssl req -new -key client.key -out client.csr
[fill in fields]
root@caddy-testing:~# openssl x509 -req -in client.csr -CA ./.local/share/caddy/pki/authorities/local/root.crt -CAkey ./.local/share/caddy/pki/authorities/local/root.key -CAcreateserial -out client.crt -days 365 -sha256
root@caddy-testing:~# openssl x509 -in client.crt -outform der | base64 |tr -d '\n' && echo ''
```
Test without certificate:
```
root@caddy-testing:~# curl https://10.125.216.164:2019/config ; echo $?
curl: (56) OpenSSL SSL_read: OpenSSL/3.5.4: error:0A00045C:SSL routines::tlsv13 alert certificate required, errno 0
56
```
with certificate:
```
root@caddy-testing:~# curl -L --cert client.crt --key client.key https://10.125.216.164:2019/config
{"admin":{"config":{"persist":true},"disabled":false,"identity":{"identifiers":["caddy-testing.incus","10.125.216.164"], etc etc]
``
Generating TLS auth certificate for authentication in #caddyserver #API working. Its the standard x509 stuff, I just hadn't found someone that said that and I spent a long time twisting myself in knots.