CUPS SSL Certificates - jamesperrin/developer-training-resources GitHub Wiki
Table of Contents
Generating SSL Certificate Signing Request (CSR)
- Login into the Linux server.
- Create a folder called
certsand navigate to the new folder location.mkdir certs && cd certs - Display the contents of the CUPS SSL folder
sudo ls -alt /etc/cups/ssl/ - Create copies of the current CUPS SSL certificate public and private parts appending the date when they were created.
sudo cp /etc/cups/ssl/server.key /etc/cups/ssl/server_YYYYMMDD.key && sudo cp /etc/cups/ssl/server.crt /etc/cups/ssl/server_YYYYMMDD.crt - Using OpenSSL to create a Certificate Signing Request (CSR).
- Example
openssl req -new -newkey rsa:2048 -nodes -out server.csr -keyout server.key -subj "/C=US/ST=WA/L=Seattle/O=Your Company, Inc,/OU=IT/CN=www.example.com" -addext "subjectAltName=DNS:www.example.com" - Using OpenSSL to review a CSR server.csr file.
openssl req -text -noout -in server.csr - To display the contents of the CSR server.csr file.
cat server.csr
Installing SSL Certificate
- Login into the Linux server.
- Navigate to the folder
certs.cd certs - Create and Open a file called
server.crttouch server.crt && nano server.crt - Paste in the contents from a Base64 encoded X.509 digital certificate
.cerfile into the fileserver.crt. - Save and close the file
server.crt. - Copy the server.key and server.crt files to the CUPS SSL certificate folder.
sudo cp server.key /etc/cups/ssl/server.key && sudo cp server.crt /etc/cups/ssl/server.crt - Create copies of the new CUPS SSL certificate public and private parts appending the date when they were created.
sudo cp /etc/cups/ssl/server.key /etc/cups/ssl/server_YYYYMMDD.key && sudo cp /etc/cups/ssl/server.crt /etc/cups/ssl/server_YYYYMMDD.crt - Log off Linux server.
exit