Files
HP-Laserjet-Pro-Certificate…/README.md
Frédéric Tronel 2cf4c996f9 Improve README.
2025-12-28 18:27:09 +01:00

45 lines
1.1 KiB
Markdown

# Purpose
I wanted to install a certificate generated by Let's encrypt on my brand new laser printer
(HP Laserjet MFJ 4302) for the integrated administration webserver.
After research on the web, I discovered
# Arguments
positional arguments:
{csr,pem} command help
csr Create CSR
pem Install certificate
options:
-h, --help show this help message and exit
-d, --debug Activate debug.
-c, --config CONFIG_FILENAME
Configuration file.
-u, --user USERNAME Username.
-p, --password [PASSWORD]
Password.
-H, --host HOSTNAME Hostname.
-n, --no-tls-verification
Verify certificate validity.
# How to use it ?
To obtain a CSR:
```
./refresh-certificate.py -c ./config.ini -n -p PASSWORD csr
```
To obtain a PEM certificate from Let's encrypt:
```
certbot certonly --webroot -w /var/www/letsencrypt/ --csr printer.csr
```
To install the PEM file on the printer:
```
./refresh-certificate.py -c ./config.ini -n -p PASSWORD pem
```