]> git.ipfire.org Git - thirdparty/cups.git/blame - ENCRYPTION.txt
Load cups into easysw/current.
[thirdparty/cups.git] / ENCRYPTION.txt
CommitLineData
ef416fc2 1ENCRYPTION - CUPS v1.1.20 - 11/24/2003
2--------------------------------------
3
4This file describes the encryption support provided by CUPS.
5
6WARNING: CLIENTS CURRENTLY TRUST ALL CERTIFICATES FROM SERVERS.
7This makes the CUPS client applications vulnerable to "man in
8the middle" attacks, so we don't recommend using this to do
9remote administration over WANs at this time.
10
11Future versions of CUPS will keep track of server certificates
12and provide a callback/confirmation interface for accepting new
13certificates and warning when a certificate has changed.
14
15
16LEGAL STUFF
17
18BEFORE USING THE ENCRYPTION SUPPORT, PLEASE VERIFY THAT IT IS
19LEGAL TO DO SO IN YOUR COUNTRY. CUPS by itself doesn't include
20any encryption code, but it can link against the OpenSSL, GNU
21TLS, or CDSA libraries which do.
22
23
24OVERVIEW OF ENCRYPTION SUPPORT IN CUPS
25
26CUPS supports SSL/2.0, SSL/3.0, and TLS/1.0 encryption using
27keys as large as 128-bits. Encryption support is provided via
28the OpenSSL, GNU TLS, or CDSA libraries and some new hooks in
29the CUPS code.
30
31CUPS provides support for dedicated (https) and "upgrade" (TLS)
32encryption of sessions. The "HTTP Upgrade" method is described
33in RFC 2817; basically, the client can be secure or unsecure,
34and the client or server initiates an upgrade to a secure
35connection via some new HTTP fields and status codes. The HTTP
36Upgrade method is new and no browsers we know of support it yet.
37Stick with "https" for web browsers.
38
39The current implementation is very basic. The CUPS client
40software (lp, lpr, etc.) uses encryption as requested by the
41user or server.
42
43The user can specify the "-E" option with the printing commands
44to force encryption of the connection. Encryption can also be
45specified using the Encryption directive in the client.conf file
46or in the CUPS_ENCRYPTION environment variable:
47
48 Never
49
50 Never do encryption.
51
52 Always
53
54 Always do SSL/TLS encryption using the https scheme.
55
56 IfRequested
57
58 Upgrade to TLS encryption if the server asks for it.
59 This is the default setting.
60
61 Required
62
63 Always upgrade to TLS encryption as soon as the
64 connection is made. This is different than the "Always"
65 mode above since the connection is initially unsecure
66 and the client initiates the upgrade to TLS encryption.
67 (same as using the "-E" option)
68
69These keywords are also used in the cupsd.conf file to secure
70particular locations. To secure all traffic on the server, listen
71on port 443 (https port) instead of port 631 and change the "ipp"
72service listing (or add it if you don't have one) in /etc/services
73to 443. To provide both secure and normal methods, add a line
74reading:
75
76 SSLPort 443
77
78to /etc/cups/cupsd.conf.
79
80
81BEFORE YOU BEGIN
82
83You'll need the OpenSSL, GNU TLS, or CDSA libraries from:
84
85 http://www.openssl.org/
86 http://www.gnutls.org/
87 http://www.intel.com/labs/archive/cdsa.htm
88
89
90CONFIGURING WITH ENCRYPTION SUPPORT
91
92Once you have the OpenSSL, GNU TLS, or CDSA libraries installed,
93you'll need to configure CUPS to use it with the "--enable-ssl"
94option:
95
96 ./configure --enable-ssl
97
98If the library stuff is not in a standard location, make sure to
99define the CFLAGS, CXXFLAGS, and LDFLAGS environment variables
100with the appropriate compiler and linker options first.
101
102
103GENERATING A SERVER CERTIFICATE AND KEY
104
105The following OpenSSL command will generate a server certificate
106and key that you can play with. Since the certificate is not
107properly signed it will generate all kinds of warnings in
108Netscape and MSIE:
109
110 openssl req -new -x509 -keyout /etc/cups/ssl/server.key \
111 -out /etc/cups/ssl/server.crt -days 365 -nodes
112
113 chmod 600 /etc/cups/ssl/server.*
114
115The "-nodes" option prevents the certificate and key from being
116encrypted. The cupsd process runs in the background, detached
117from any input source; if you encrypt these files then cupsd
118will not be able to load them!
119
120Send all rants about non-encrypted certificate and key files to
121/dev/null. It makes sense to encrypt user files, but not for
122files used by system processes/daemons...
123
124
125REPORTING PROBLEMS
126
127If you have problems, READ THE DOCUMENTATION FIRST! If the
128documentation does not solve your problems please send an email
129to "cups-support@cups.org". Include your operating system and
130version, compiler and version, and any errors or problems you've
131run into. The "/var/log/cups/error_log" file should also be sent,
132as it often helps to determine the cause of your problem.
133
134If you are running a version of Linux, be sure to provide the
135Linux distribution you have, too.
136
137Please note that the "cups-support@cups.org" email address goes
138to the CUPS developers; they are busy people, so your email may
139go unanswered for days or weeks. In general, only general build
140or distribution problems will actually get answered - for
141end-user support see the "README.txt" for a summary of the
142resources available.