diff options
author | deraadt <> | 1999-03-17 02:46:52 +0000 |
---|---|---|
committer | deraadt <> | 1999-03-17 02:46:52 +0000 |
commit | 47648b6f2ebd50ec4182f5ac12648d1d9f6b1a3a (patch) | |
tree | 94d5dc5b216d3f79291daf91396a550cd8be8553 /src/lib | |
parent | cef9eda7567f01cbfafeacec26e0bcda54dd9719 (diff) | |
download | openbsd-47648b6f2ebd50ec4182f5ac12648d1d9f6b1a3a.tar.gz openbsd-47648b6f2ebd50ec4182f5ac12648d1d9f6b1a3a.tar.bz2 openbsd-47648b6f2ebd50ec4182f5ac12648d1d9f6b1a3a.zip |
do not break things
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libssl/Makefile | 7 | ||||
-rw-r--r-- | src/lib/libssl/ssl.8 | 244 |
2 files changed, 2 insertions, 249 deletions
diff --git a/src/lib/libssl/Makefile b/src/lib/libssl/Makefile index 44a67a6764..503a27274a 100644 --- a/src/lib/libssl/Makefile +++ b/src/lib/libssl/Makefile | |||
@@ -1,5 +1,4 @@ | |||
1 | .include <bsd.own.mk> | 1 | .include <bsd.own.mk> |
2 | MAN = ssl.8 | ||
3 | ECHO= /bin/echo | 2 | ECHO= /bin/echo |
4 | 3 | ||
5 | .if exists(${.OBJDIR}/src-patent) | 4 | .if exists(${.OBJDIR}/src-patent) |
@@ -8,11 +7,9 @@ SUBDIR= crypto-patent ssl-patent | |||
8 | SUBDIR= crypto ssl | 7 | SUBDIR= crypto ssl |
9 | .endif | 8 | .endif |
10 | 9 | ||
10 | .include <bsd.subdir.mk> | ||
11 | |||
11 | distribution: | 12 | distribution: |
12 | @echo "Installing ${DESTDIR}/etc/ssl/lib/ssleay.cnf"; \ | 13 | @echo "Installing ${DESTDIR}/etc/ssl/lib/ssleay.cnf"; \ |
13 | ${INSTALL} ${INSTALL_COPY} -g ${BINGRP} -m 444 \ | 14 | ${INSTALL} ${INSTALL_COPY} -g ${BINGRP} -m 444 \ |
14 | ${.CURDIR}/ssleay.cnf ${DESTDIR}/etc/ssl/lib/ssleay.cnf; | 15 | ${.CURDIR}/ssleay.cnf ${DESTDIR}/etc/ssl/lib/ssleay.cnf; |
15 | |||
16 | .include <bsd.man.mk> | ||
17 | .include <bsd.subdir.mk> | ||
18 | |||
diff --git a/src/lib/libssl/ssl.8 b/src/lib/libssl/ssl.8 deleted file mode 100644 index 0a98dd7fb1..0000000000 --- a/src/lib/libssl/ssl.8 +++ /dev/null | |||
@@ -1,244 +0,0 @@ | |||
1 | .Dd March 15, 1999 | ||
2 | .Dt SSL 8 | ||
3 | .Os OpenBSD | ||
4 | .Sh NAME | ||
5 | .Nm ssl | ||
6 | .Nd details for libssl and libcrypto | ||
7 | .Sh DESCRIPTION | ||
8 | This document describes some of the issues relating to the use of | ||
9 | Eric Young's libssl and libcrypto libraries in OpenBSD. This document | ||
10 | is intended as an overview of what the libraries do, what uses them, | ||
11 | and the slightly unorthodox way of upgrading the library. | ||
12 | .Pp | ||
13 | The SSL libraries (libssl and libcrypto) implement the | ||
14 | .Ar SSL version 2 , | ||
15 | .Ar SSL version 3 , | ||
16 | and | ||
17 | .Ar TLS version 1 | ||
18 | protocols. | ||
19 | .Ar SSL version 2 | ||
20 | and | ||
21 | .Ar 3 | ||
22 | are most | ||
23 | commonly used by the | ||
24 | .Ar https | ||
25 | protocol for encrypted web transactions. | ||
26 | Due to patent issues in the United States, there are | ||
27 | problems with shipping a fully-functional implementation of these | ||
28 | protocols anywhere in the world, as such shipment would include shipping | ||
29 | .Ar into | ||
30 | the United States, thus causing problems. | ||
31 | .Sh PATENTS AND THE RSA ALGORITHM | ||
32 | .Ar RSA Data Security Inc (RSADSI) | ||
33 | holds a patent on the | ||
34 | .Ar RSA | ||
35 | algorithm in the United States. Because of this, free | ||
36 | implementations of | ||
37 | .Ar RSA | ||
38 | are difficult to distribute and propogate. | ||
39 | (The | ||
40 | .Ar RSA | ||
41 | patent is probably more effective at preventing the widespread | ||
42 | international adoption of integrated crypto than the much maligned | ||
43 | ITAR restrictions are). The versions of libssl and libcrypto | ||
44 | provided in the stock distribution do not contain the | ||
45 | .Ar RSA | ||
46 | algorithm -- all such functions | ||
47 | are stubbed to fail. Since | ||
48 | .Ar RSA | ||
49 | is a key component of | ||
50 | .Ar SSL version 2 , | ||
51 | this | ||
52 | means that | ||
53 | .Ar SSL version 2 | ||
54 | will not work at all. | ||
55 | .Ar SSL version 3 | ||
56 | and | ||
57 | .Ar TLS version 1 | ||
58 | allow for the exchange of keys via mechanisms that do not | ||
59 | involve | ||
60 | .Ar RSA , | ||
61 | and will work with the shipped version of the libraries, | ||
62 | assuming both ends can agree to a cipher suite and key exchange that | ||
63 | does not involve RSA. | ||
64 | .Pp | ||
65 | For instance, another typical alternative | ||
66 | is | ||
67 | .Ar DSA | ||
68 | -- which is patent-free. | ||
69 | .Pp | ||
70 | The | ||
71 | .Ar https | ||
72 | protocol used by web browsers (in modern incarnations), | ||
73 | allows for the use of | ||
74 | .Ar SSL version 3 | ||
75 | and | ||
76 | .Ar TLS version 1 , | ||
77 | which in theory allows for encrypted web transactions without using | ||
78 | .Ar RSA . | ||
79 | Unfortunately all the popular web browsers | ||
80 | buy their cryptographic code from | ||
81 | .Ar RSADSI . | ||
82 | Predictably, | ||
83 | .Ar RSADSI | ||
84 | would prefer if web browsers used their patented algorithm, and thus their | ||
85 | libraries do not implement any | ||
86 | .Ar non-RSA | ||
87 | cipher and keying combination. | ||
88 | .Sh HOW TO ADD RSA LIBRARIES TO OPENBSD | ||
89 | Fortunately, not all of the world lives in the United | ||
90 | States. | ||
91 | Additionally | ||
92 | .Ar RSADSI | ||
93 | permits non-licensed use of the algorithm by certain parties | ||
94 | (ie. non-commercial use). | ||
95 | If you are permitted to use the | ||
96 | .Ar RSA | ||
97 | algorithm, you can enable the full function of the | ||
98 | .Nm | ||
99 | libraries by updating the shared libraries on your system, | ||
100 | using a command like: | ||
101 | .Bd -literal -offset xxx | ||
102 | # pkg_add ftp://ftp.openbsd.org/pub/OpenBSD/2.5/packages/i386/libssl-1.1.tgz | ||
103 | .Ed | ||
104 | .Pp | ||
105 | (Obviously, replace | ||
106 | .Ar 2.5 | ||
107 | with the current release, and | ||
108 | .Ar i386 | ||
109 | with your architecture name (see | ||
110 | .Xr arch 1 ). | ||
111 | Once your ssl libraries are updated, the ssl libraries will be fully functional. | ||
112 | .Sh SERVER CERTIFICATES | ||
113 | The most common uses of | ||
114 | .Ar SSL/TLS | ||
115 | will require you to generate a server certificate, which is provided by your | ||
116 | host as evidence of its identity when clients make new connections. The | ||
117 | certificates reside in the | ||
118 | .Pa /etc/ssl | ||
119 | directory, with the keys in the | ||
120 | .Pa /etc/ssl/private | ||
121 | directory. | ||
122 | .Pp | ||
123 | Private keys can be encrypted using | ||
124 | .Ar 3DES | ||
125 | and a passphrase to protect their integrity should the encrypted file | ||
126 | be disclosed, However it is | ||
127 | important to note that encrypted server keys mean that the passphrase | ||
128 | needs to be typed in every time the server is started. If a passphrase | ||
129 | is not used, you will need to be absolutely sure your key file | ||
130 | is kept secure. | ||
131 | .Sh GENERATING DSA SERVER CERTIFICATES | ||
132 | Generating a | ||
133 | .Ar DSA | ||
134 | certificate involves several steps. First, you generate | ||
135 | a | ||
136 | .Ar DSA | ||
137 | parameter set with a command like the following: | ||
138 | .Bd -literal -offset indent | ||
139 | # ssleay dsaparam 1024 -out dsa1024.pem | ||
140 | .Ed | ||
141 | .Pp | ||
142 | Would generate | ||
143 | .Ar DSA | ||
144 | parameters for 1024 bit | ||
145 | .Ar DSA | ||
146 | keys, and save them to the | ||
147 | file | ||
148 | .Pa dsa1024.pem . | ||
149 | .Pp | ||
150 | Once you have the | ||
151 | .Ar DSA | ||
152 | paramters generated, you can generate a certificate | ||
153 | and unencrypted private key using the command: | ||
154 | .Bd -literal -offset indent | ||
155 | # ssleay req -x509 -nodes -newkey dsa:dsa1024.pem \\ | ||
156 | -out /etc/dsacert.pem -keyout /etc/ssl/private/dsakey.pem | ||
157 | .Ed | ||
158 | .Pp | ||
159 | To generate an encrypted private key, you would use: | ||
160 | .Bd -literal -offset indent | ||
161 | # ssleay req -x509 -nodes -newkey dsa:dsa1024.pem \\ | ||
162 | -out /etc/dsacert.pem -keyout /etc/ssl/private/dsakey.pem | ||
163 | .Ed | ||
164 | .Sh GENERATING RSA SERVER CERTIFICATES FOR WEB SERVERS | ||
165 | To generate | ||
166 | .Ar RSA | ||
167 | certificates, you will first need to upgrade your | ||
168 | shared libraries to support | ||
169 | .Ar RSA | ||
170 | as described above. Once that is done, | ||
171 | you can generate | ||
172 | .Ar RSA | ||
173 | certificates that will be usable by | ||
174 | .Xr httpd 8 | ||
175 | for | ||
176 | .Ar https | ||
177 | transactions. | ||
178 | .Bd -literal -offset indent | ||
179 | # ssleay genrsa -out /etc/ssl/private/server.key 1024 | ||
180 | .Ed | ||
181 | .Pp | ||
182 | Or, if you wish the key to be encrypted with a passphrase that you will | ||
183 | have to type in when starting servers | ||
184 | .Bd -literal -offset indent | ||
185 | # ssleay genrsa -des3 -out /etc/ssl/private/server.key 1024 | ||
186 | .Ed | ||
187 | .Pp | ||
188 | The next step is to generate a | ||
189 | .Ar Certifiate Signing Request | ||
190 | which is used | ||
191 | to get a | ||
192 | .Ar Certifying Authority (CA) | ||
193 | to sign your certificate. To do this | ||
194 | use the command: | ||
195 | .Bd -literal -offset indent | ||
196 | # ssleay req -new -key /etc/ssl/private/server.key \\ | ||
197 | -out /etc/ssl/private/server.csr | ||
198 | .Ed | ||
199 | .Pp | ||
200 | This | ||
201 | .Pa server.csr | ||
202 | file can then be given to | ||
203 | .Ar Certifying Authority | ||
204 | who will sign the key. | ||
205 | You can also sign the key yourself, using the command: | ||
206 | .Bd -literal -offset indent | ||
207 | # ssleay x509 -req -days 365 -in /etc/ssl/private/server.csr \\ | ||
208 | -signkey /etc/ssl/private/server.key -out /etc/ssl/server.crt | ||
209 | .Ed | ||
210 | .Pp | ||
211 | With | ||
212 | .Pa /etc/ssl/server.crt | ||
213 | and | ||
214 | .Pa /etc/ssl/private/server.key | ||
215 | in place, you should be able to start | ||
216 | .Xr httpd 8 | ||
217 | with the | ||
218 | .Ar -DSSL | ||
219 | flag, enabling | ||
220 | .Ar https | ||
221 | transactions with your machine on port 443. | ||
222 | .Sh BUGS | ||
223 | .Pp | ||
224 | .Nm ssleay | ||
225 | and | ||
226 | .Nm libssl | ||
227 | have nearly nonexistent documentation. | ||
228 | Most documentation consists of examples and README files in | ||
229 | the sources. Mail beck@openbsd.org to assist or | ||
230 | encourage him to finish the job. | ||
231 | .Pp | ||
232 | The world needs more | ||
233 | .Ar DSA | ||
234 | capable | ||
235 | .Ar SSL | ||
236 | services. | ||
237 | .Pp | ||
238 | Patents can be renewed. | ||
239 | .Sh SEE ALSO | ||
240 | .Xr httpd 8 , | ||
241 | .Xr rc 8 | ||
242 | .Sh HISTORY | ||
243 | This document first appeared in | ||
244 | .Ox 2.5 . | ||