OpenWrt Forum Archive

Topic: Install Root Certificate PEM

The content of this topic has been archived on 30 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi there, for a webservice that uses for https a Let's Encrypt certificate, I need to manually add that certificate into my Openwrt router.

The certificate I can download from Letsencrypt.com is a .PEM file.

I can not find how to upload/install it into the OpenWRT router.

Does anyone know how to do that?

Thanks in advance.

cd /etc/ssl/certs/
wget -O letsencryptauthorityx1.pem https://letsencrypt.org/certs/letsencryptauthorityx1.pem
ln -s letsencryptauthorityx1.pem "$(openssl x509 -hash -noout -in letsencryptauthorityx1.pem).0"

Hi thanks for your help. Unfortunately I get this error:

ERROR: cannot verify letsencrypt.org's certificate, issued by `/C=US/O=IdenTrust/OU=TrustID Server/CN=TrustID Server CA A52':
  Unable to locally verify the issuer's authority.
To connect to letsencrypt.org insecurely, use `--no-check-certificate'.

So I used command: wget --no-check-certificate letsencryptauthorityx1.pem https://letsencrypt.org/certs/letsencry … rityx1.pem

That worked. Then I used your command: ln -s letsencryptauthorityx1.pem "$(openssl x509 -hash -noout -in letsencryptauthorityx1.pem).0"

That resulted in following error:

-hash -noout -in letsencryptauthorityx1.pem).0"
unable to load certificate
1997661256:error:0906D06C:lib(9):func(109):reason(108):NA:0:Expecting: TRUSTED CERTIFICATE

What is wrong / an be a solution?

jow wrote:
cd /etc/ssl/certs/
wget -O letsencryptauthorityx1.pem letsencrypt.org/certs/letsencryptauthorityx1.pem
ln -s letsencryptauthorityx1.pem "$(openssl x509 -hash -noout -in letsencryptauthorityx1.pem).0"

Thanks, it works.

The discussion might have continued from here.