cups
cups copied to clipboard
Documentation on validating TLS server certificates is confusing
I'm trying to connect to an IPPS printer from GNU/Linux with strict certificate validation. This presumably means I need to tell CUPS what server certificate to expect. Unfortunately, the documentation for this is confusing and ambiguous:
- https://www.cups.org/doc/encryption.html says "A client can be configured to only communicate with trusted TLS/1.1+ servers and printers by copying the corresponding certificates to the client (see below)", which points to the text "Other platforms only use the client.conf file and PEM-encoded certificates (hostname.crt) and private keys (hostname.key) in the /etc/cups/ssl and ~/.cups/ssl directories." This is confusing since the presence of a private key should be something only the printer has, not CUPS. It is not clear what
/etc/cups/ssl/hostname.keyis used for, nor is it clear whether/etc/cups/ssl/hostname.crtis the correct place to put the TLS certificate for my printer with that hostname. - The text goes on to say "If present, the /etc/cups/ssl/site.crt file defines a site-wide CA certificate that is used to validate server and printer certificates." It is not clear how this functionality relates to the functionality in the previous sentence. Is
site.crtused for server certificate validation whilehostname.crtis used for something else? Are they both used for server certificate validation, butsite.crtmust have the CA bit set whilehostname.crtmust have the CA bit cleared? Are they both used for server certificate validation regardless of the CA bit, butsite.crtis used regardless of the printer's hostname whilehostname.crtis only used for that hostname? - It is not clear whether
hostname.crtandsite.crtcan contain multiple certificates. The usage of PEM encoding suggests that this is possible, but the singular "a site-wide certificate" language suggests the opposite. It is also not clear whether it is possible to specify intermediate certificates to use in chain building, without making those certificates trust anchors. hostname.crt,hostname.key, andsite.crtare covered only in https://www.cups.org/doc/encryption.html while/etc/cups/ssl/site.crlis only covered in https://www.cups.org/doc/man-client.conf.html , which is kind of a weird way to separate things. It's also not specified what the format ofsite.crlis.
Can the documentation be amended to clarify the above points?