cat $HOST.key $HOST.crt > $HOST.pem
cat AddTrustExternalCARoot.crt COMODORSA* > sslbundle.crt
openssl genrsa -des3 -passout pass:x -out $HOST.pass.key 2048
openssl rsa -passin pass:x -in $HOST.pass.key -out $HOST.key
rm $HOST.pass.key
openssl req -new -key $HOST.key -out $HOST.csr
openssl x509 -req -days 365 -in $HOST.csr -signkey $HOST.key -out $HOST.crt
cat $HOST.key $HOST.crt > $HOST.pem
openssl s_client -connect $HOST:443 -showcerts > temporary_file
certutil -d sql:$HOME/.pki/nssdb -A -t CP,,C -n "$HOST -i temporary_file
cp $HOST.crt /usr/share/ca-certificates
echo "$HOST.crt" >> /etc/ca-certificates.conf
update-ca-certificates --fresh
Copy $HOST.crt file to device, then import through Settings > Security > Install from storage.