I have successfully generated certificates.
openssl genrsa -out ca.key
openssl req -x509 -new -nodes -key ca.key -sha256 -days 3650 -out ca.crt
openssl genrsa -out unbound.key
openssl req -new -key unbound.key -out unbound.csr
openssl x509 -req -in unbound.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out unbound.crt -days 365 -sha256
But
Starting local_unbound.
[1764772744] local-unbound[4997:0] error: Error for server-cert-file: /var/unbound/unbound_server.pem
[1764772744] local-unbound[4997:0] error: Error in SSL_CTX use_certificate_chain_file crypto error:80000002:system library::No such file or directory
[1764772744] local-unbound[4997:0] error: and additionally crypto error:10080002:BIO routines::system lib
[1764772744] local-unbound[4997:0] error: and additionally crypto error:0A080002:SSL routines::system lib
[1764772744] local-unbound[4997:0] fatal error: could not set up remote-control
/etc/rc.d/local_unbound: WARNING: failed to start local_unbound
/var/unbound # ls -l
total 46
-rw-r--r-- 1 root unbound 1285 Dec 3 16:36 ca.crt
-rw------- 1 root unbound 1704 Dec 3 16:35 ca.key
-rw-r--r-- 1 root unbound 41 Dec 3 16:38 ca.srl
drwxr-xr-x 2 unbound unbound 2 Dec 1 05:46 conf.d
-rw-r--r-- 1 root unbound 193 Dec 3 10:49 control.conf
-rw-r--r-- 1 root unbound 133 Dec 3 10:49 forward.conf
-rw-r--r-- 1 pal pal 1261 Dec 3 15:32 lan-zones.conf
-rw-r--r-- 1 unbound unbound 1249 Dec 3 15:30 root.key
-rw-r--r-- 1 pal pal 686 Dec 3 16:13 unbound.conf
-rw-r--r-- 1 root unbound 1245 Dec 3 16:38 unbound.crt
-rw-r--r-- 1 root unbound 956 Dec 3 16:37 unbound.csr
-rw------- 1 root unbound 1704 Dec 3 16:36 unbound.key
openssl genrsa -out ca.key
openssl req -x509 -new -nodes -key ca.key -sha256 -days 3650 -out ca.crt
openssl genrsa -out unbound.key
openssl req -new -key unbound.key -out unbound.csr
openssl x509 -req -in unbound.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out unbound.crt -days 365 -sha256
But
Starting local_unbound.
[1764772744] local-unbound[4997:0] error: Error for server-cert-file: /var/unbound/unbound_server.pem
[1764772744] local-unbound[4997:0] error: Error in SSL_CTX use_certificate_chain_file crypto error:80000002:system library::No such file or directory
[1764772744] local-unbound[4997:0] error: and additionally crypto error:10080002:BIO routines::system lib
[1764772744] local-unbound[4997:0] error: and additionally crypto error:0A080002:SSL routines::system lib
[1764772744] local-unbound[4997:0] fatal error: could not set up remote-control
/etc/rc.d/local_unbound: WARNING: failed to start local_unbound
/var/unbound # ls -l
total 46
-rw-r--r-- 1 root unbound 1285 Dec 3 16:36 ca.crt
-rw------- 1 root unbound 1704 Dec 3 16:35 ca.key
-rw-r--r-- 1 root unbound 41 Dec 3 16:38 ca.srl
drwxr-xr-x 2 unbound unbound 2 Dec 1 05:46 conf.d
-rw-r--r-- 1 root unbound 193 Dec 3 10:49 control.conf
-rw-r--r-- 1 root unbound 133 Dec 3 10:49 forward.conf
-rw-r--r-- 1 pal pal 1261 Dec 3 15:32 lan-zones.conf
-rw-r--r-- 1 unbound unbound 1249 Dec 3 15:30 root.key
-rw-r--r-- 1 pal pal 686 Dec 3 16:13 unbound.conf
-rw-r--r-- 1 root unbound 1245 Dec 3 16:38 unbound.crt
-rw-r--r-- 1 root unbound 956 Dec 3 16:37 unbound.csr
-rw------- 1 root unbound 1704 Dec 3 16:36 unbound.key