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