Finally solved! I found a solution that worked on TrueNAS, although I am not sure if it is the right one. But it works :)
The clue was in finding the right place for certificate info for a FreeBSD based system as TrueNAS is:
"/etc/ssl/certs/ca-certificates.crt", // Debian/Ubuntu/Gentoo etc.
"/etc/pki/tls/certs/ca-bundle.crt", // Fedora/RHEL
"/etc/ssl/ca-bundle.pem", // OpenSUSE
"/etc/ssl/cert.pem", // OpenBSD
"/usr/local/share/certs/ca-root-nss.crt", // FreeBSD/DragonFly
"/etc/pki/tls/cacert.pem", // OpenELEC
"/etc/certs/ca-certificates.crt", // Solaris 11.2+
(got it from
https://stackoverflow.com/questions...wn-authority-both-with-docker-and-with-github)
First uploaded the certificate to the NAS using this command:
Code:
scp filename username@ip_address:/home/username
(from this guide
https://linuxhandbook.com/transfer-files-ssh/)
Then as my certificate was not .crt I converted it following the same command I used before
Code:
openssl x509 -inform PEM -in certificate.cer -out certificate.crt
(some info about
here and
here)
And then installed it following this:
Code:
openssl x509 -in startssl.crt -text >> /etc/ssl/cert.pem
(reference in
https://forums.freebsd.org/threads/adding-certificate-to-ca_root_nss.51945/)
What is not making me feel right is that the process adds the certificate to that file but seems a kind of copy-paste at the end instead of the original file that seemed generated by the system
My only concern now is if the solution will survive a system reboot, as what I tried in the previous message disappeared after rebooting. Anyway, it works and could be done again easily again afterward.
Hope this can be useful for others!