Ssl certificates for Luci WebUI

I am using OpenWrt 21.02.2 r16495-bf0c965af0 / LuCI openwrt-21.02 branch git-22.046.85957-59c3392 on Xiaomi Mi Router 4A Gigabit Edition as an access point. My main router/firewall is pfsense CE 2.7.2. I have created a local certificate authority on pfsense and created certificate and key for my openwrt.I installed luci-app-uhtttpd. I renamed the certificates to uhttpd.crt and uhttpd.key and moved them to /etc on the openWrt after I renamed the existing uhttpd.crt and uhttpd.key to something else. After that I ran /etc/inti.d/uhttpd restart and rebooted the device.
It didn't work. I saw somewhere that you have to delete the certs portion of /etc/config/uhttpd. I did it and repeated the process with the certificates from the beginning. It doesn't work. Can anyone help me?
Edit: The Root certificate authority is installed on my browser and I have many more services and devices with certificates from pfsense that work fine

Did you see https://openwrt.org/docs/guide-user/luci/getting_rid_of_luci_https_certificate_warnings ?
You can skip the certificate creation part since you already have one.

Don't forget to update your router to the latest OpenWrt version available.

Just as an FYI, that version is long since EOL'd and unsupported. Please consider upgrading to the latest OpenWrt version so that you're up-to-date with the latest security patches, features, and bug fixes (and obviously also a version that is currently supported):

https://firmware-selector.openwrt.org/?version=23.05.4&target=ramips%2Fmt7621&id=xiaomi_mi-router-4a-gigabit

(the above is a link to the Mi Router 4A Gigabit v1, there is also a v2, so make sure you get the right download if yours is v2).