]> git.ipfire.org Git - thirdparty/cups.git/blame - ENCRYPTION.txt
Merge changes from 1.1.x into 1.2 devel.
[thirdparty/cups.git] / ENCRYPTION.txt
CommitLineData
b1d503b0 1ENCRYPTION - CUPS v1.1.7 - 02/21/2001
7428af94 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 library
21which does.
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 library and some new hooks in the CUPS code.
29
30CUPS provides support for dedicated (https) and "upgrade" (TLS)
31encryption of sessions. The "HTTP Upgrade" method is described
32in RFC 2817; basically, the client can be secure or unsecure,
33and the client or server initiates an upgrade to a secure
34connection via some new HTTP fields and status codes. The HTTP
35Upgrade method is new and no browsers we know of support it yet.
36Stick with "https" for web browsers.
37
38The current implementation is very basic. The CUPS client
39software (lp, lpr, etc.) uses encryption as requested by the
1c9e0181 40user or server.
41
42The user can specify the "-E" option with the printing commands
43to force encryption of the connection. Encryption can also be
44specified using the Encryption directive in the client.conf file
45or in the CUPS_ENCRYPTION environment variable:
7428af94 46
47 Never
48
49 Never do encryption.
50
51 Always
52
53 Always do SSL/TLS encryption using the https scheme.
54
55 IfRequested
56
57 Upgrade to TLS encryption if the server asks for it.
58 This is the default setting.
59
60 Required
61
62 Always upgrade to TLS encryption as soon as the
63 connection is made. This is different than the "Always"
64 mode above since the connection is initially unsecure
65 and the client initiates the upgrade to TLS encryption.
1c9e0181 66 (same as using the "-E" option)
7428af94 67
68These keywords are also used in the cupsd.conf file to secure
69particular locations. To secure all traffic on the server, listen
70on port 443 (https port) instead of port 631 and change the "ipp"
71service listing (or add it if you don't have one) in /etc/services
b1d503b0 72to 443. To provide both secure and normal methods, add a line
73reading:
74
75 SSLPort 443
76
77to /etc/cups/cupsd.conf.
7428af94 78
79
80BEFORE YOU BEGIN
81
82You'll need the OpenSSL library from:
83
84 http://www.openssl.org
85
86
87CONFIGURING WITH ENCRYPTION SUPPORT
88
89Once you have the OpenSSL library installed, you'll need to
90configure CUPS to use it with the "--enable-ssl" option:
91
92 ./configure --enable-ssl
93
94If the OpenSSL stuff is not in a standard location, make sure to
95define the CFLAGS, CXXFLAGS, and LDFLAGS environment variables
96with the appropriate compiler and linker options first.
97
98
99GENERATING A SERVER CERTIFICATE AND KEY
100
101The following OpenSSL command will generate a server certificate
102and key that you can play with. Since the certificate is not
103properly signed it will generate all kinds of warnings in
104Netscape and MSIE:
105
106 openssl req -new -x509 -keyout /etc/cups/ssl/server.key \
107 -out /etc/cups/ssl/server.crt -days 365 -nodes
108
109 chmod 600 /etc/cups/ssl/server.*
110
111The "-nodes" option prevents the certificate and key from being
112encrypted. The cupsd process runs in the background, detached
113from any input source; if you encrypt these files then cupsd
114will not be able to load them!
115
116Send all rants about non-encrypted certificate and key files to
117/dev/null. It makes sense to encrypt user files, but not for
118files used by system processes/daemons...
119
120
121REPORTING PROBLEMS
122
123If you have problems, READ THE DOCUMENTATION FIRST! If the
124documentation does not solve your problems please send an email
125to "cups-support@cups.org". Include your operating system and
126version, compiler and version, and any errors or problems you've
127run into. The "/var/log/cups/error_log" file should also be sent,
128as it often helps to determine the cause of your problem.
129
130If you are running a version of Linux, be sure to provide the
131Linux distribution you have, too.
132
133Please note that the "cups-support@cups.org" email address goes
134to the CUPS developers; they are busy people, so your email may
135go unanswered for days or weeks. In general, only general build
136or distribution problems will actually get answered - for
137end-user support see the "README.txt" for a summary of the
138resources available.