Automatically updating SSL certificate on a HP M283fdw


I use Home Assistant to generate a wildcard certificate for my lab using the Hurricane Electric DNS challenge. This puts the fullchain certificate and private key file into the /ssl path of Home Assistant. You have to make sure you are using the supported RSA type by the printer. I then have a cron job which pulls these files and creates a PFX file suitable for the printer:

scp root@ha:/ssl/*.pem .  
openssl pkcs12 -export -out wildcard.cert.pfx -inkey privkey.pem -in fullchain.pem

Make sure you set a password. The next step is then to upload the certificate to your printer. In my cases it is a HP M283fdw.

curl -v -k -L --form [email protected] --form Password=mypassword "https://10.0.0.28/hp/device/Certificate.pfx"