Https connection to LuCI is discarded

I see. However I am running into this error even if I do what I am supposed to do acording to the github issue (so it seems it would not help me).

I have this file supi_hnizdo.conf:

[req]
distinguished_name  = req_distinguished_name
x509_extensions     = v3_req
prompt              = no
string_mask         = utf8only

[req_distinguished_name]
C                   = world
ST                  = state
L                   = city
O                   = myorg
OU                  = myunit
CN                  = supi_hnizdo.lan

[v3_req]
keyUsage            = nonRepudiation, digitalSignature, keyEncipherment
extendedKeyUsage    = serverAuth
subjectAltName      = @alt_names

[alt_names]
DNS.1               = supi_hnizdo.lan
IP.1                = 192.168.2.1
IP.2                = 2a03:a900:1000:22b1::1
~                                                      

I then run:

openssl req -x509 -nodes -days 365 -newkey ec:<(openssl ecparam -name prime256v1) -keyout supi_hnizdo.key -out supi_hnizdo.crt -config supi_hnizdo.conf
/etc/init.d/uhttpd restart

my /etc/config/uhttpd is like this:

config uhttpd 'main'
        list listen_http '0.0.0.0:80'
        list listen_http '[::]:80'
        list listen_https '0.0.0.0:443'
        list listen_https '[::]:443'
        option redirect_https '0'
        option home '/www'
        option rfc1918_filter '1'
        option max_requests '3'
        option max_connections '100'
        option cert '/etc/ssl/supi_hnizdo.crt'
        option key '/etc/ssl/supi_hnizdo.key'
        option cgi_prefix '/cgi-bin'
        list lua_prefix '/cgi-bin/luci=/usr/lib/lua/luci/sgi/uhttpd.lua'
        option script_timeout '60'
        option network_timeout '30'
        option http_keepalive '20'
        option tcp_keepalive '1'
        option ubus_prefix '/ubus'

config cert 'defaults'
        option days '730'
        option key_type 'ec'
        option bits '2048'
        option ec_curve 'P-256'
        option country 'ZZ'
        option state 'Somewhere'
        option location 'Unknown'
        option commonname 'OpenWrt'

On my machine, I run

scp root@192.168.2.1:/etc/ssl/supi_hnizdo.crt . 
certutil -d sql:$HOME/.pki/nssdb -A -t "CT,C,c" -n supi_hnizdo -i supi_hnizdo.crt

And then I get the ""NET::ERR_CERT_INVALID" without being able to override it (unless I type "thisisunsafe").

If I run certutil -d $HOME/.pki/nssdb -D -n supi_hnizdo

I can then override the error (after each time I run certutil, I restart the browser). This is all on Chrome, Firefox just accepts the certificate and is happy. I forgot to add I am on 23.05 on Belkin RT3200.