Add pointer to EGD manpage.
[openssl.git] / FAQ
1 OpenSSL  -  Frequently Asked Questions
2 --------------------------------------
3
4 * Which is the current version of OpenSSL?
5 * Where is the documentation?
6 * How can I contact the OpenSSL developers?
7 * Do I need patent licenses to use OpenSSL?
8 * Is OpenSSL thread-safe?
9 * Why do I get a "PRNG not seeded" error message?
10 * Why does the linker complain about undefined symbols?
11 * Where can I get a compiled version of OpenSSL?
12 * I've compiled a program under Windows and it crashes: why?
13 * Why do I get errors about unknown algorithms?
14 * How do I create certificates or certificate requests?
15 * Why can't I create certificate requests?
16 * Why does <SSL program> fail with a certificate verify error?
17 * How can I create DSA certificates?
18 * Why can't I make an SSL connection using a DSA certificate?
19 * Why can't the OpenSSH configure script detect OpenSSL?
20
21
22 * Which is the current version of OpenSSL?
23
24 The current version is available from <URL: http://www.openssl.org>.
25 OpenSSL 0.9.5 was released on February 28th, 2000.
26
27 In addition to the current stable release, you can also access daily
28 snapshots of the OpenSSL development version at <URL:
29 ftp://ftp.openssl.org/snapshot/>, or get it by anonymous CVS access.
30
31
32 * Where is the documentation?
33
34 OpenSSL is a library that provides cryptographic functionality to
35 applications such as secure web servers.  Be sure to read the
36 documentation of the application you want to use.  The INSTALL file
37 explains how to install this library.
38
39 OpenSSL includes a command line utility that can be used to perform a
40 variety of cryptographic functions.  It is described in the openssl(1)
41 manpage.  Documentation for developers is currently being written.  A
42 few manual pages already are available; overviews over libcrypto and
43 libssl are given in the crypto(3) and ssl(3) manpages.
44
45 The OpenSSL manpages are installed in /usr/local/ssl/man/ (or a
46 different directory if you specified one as described in INSTALL).
47 In addition, you can read the most current versions at
48 <URL: http://www.openssl.org/docs/>.
49
50 For information on parts of libcrypto that are not yet documented, you
51 might want to read Ariel Glenn's documentation on SSLeay 0.9, OpenSSL's
52 predecessor, at <URL: http://www.columbia.edu/~ariel/ssleay/>.  Much
53 of this still applies to OpenSSL.
54
55 There is some documentation about certificate extensions and PKCS#12
56 in doc/openssl.txt
57
58 The original SSLeay documentation is included in OpenSSL as
59 doc/ssleay.txt.  It may be useful when none of the other resources
60 help, but please note that it reflects the obsolete version SSLeay
61 0.6.6.
62
63
64 * How can I contact the OpenSSL developers?
65
66 The README file describes how to submit bug reports and patches to
67 OpenSSL.  Information on the OpenSSL mailing lists is available from
68 <URL: http://www.openssl.org>.
69
70
71 * Do I need patent licenses to use OpenSSL?
72
73 The patents section of the README file lists patents that may apply to
74 you if you want to use OpenSSL.  For information on intellectual
75 property rights, please consult a lawyer.  The OpenSSL team does not
76 offer legal advice.
77
78 You can configure OpenSSL so as not to use RC5 and IDEA by using
79  ./config no-rc5 no-idea
80
81 Until the RSA patent expires, U.S. users may want to use
82  ./config no-rc5 no-idea no-rsa
83
84 Please note that you will *not* be able to communicate with most of
85 the popular web browsers without RSA support.
86
87
88 * Is OpenSSL thread-safe?
89
90 Yes (with limitations: an SSL connection may not concurrently be used
91 by multiple threads).  On Windows and many Unix systems, OpenSSL
92 automatically uses the multi-threaded versions of the standard
93 libraries.  If your platform is not one of these, consult the INSTALL
94 file.
95
96 Multi-threaded applications must provide two callback functions to
97 OpenSSL.  This is described in the threads(3) manpage.
98
99
100 * Why do I get a "PRNG not seeded" error message?
101
102 Cryptographic software needs a source of unpredictable data to work
103 correctly.  Many open source operating systems provide a "randomness
104 device" that serves this purpose.  On other systems, applications have
105 to call the RAND_add() or RAND_seed() function with appropriate data
106 before generating keys or performing public key encryption.
107
108 Some broken applications do not do this.  As of version 0.9.5, the
109 OpenSSL functions that need randomness report an error if the random
110 number generator has not been seeded with at least 128 bits of
111 randomness.  If this error occurs, please contact the author of the
112 application you are using.  It is likely that it never worked
113 correctly.  OpenSSL 0.9.5 and later make the error visible by refusing
114 to perform potentially insecure encryption.
115
116 On systems without /dev/urandom, it is a good idea to use the Entropy
117 Gathering Demon; see the RAND_egd() manpage for details.
118
119 Most components of the openssl command line tool try to use the
120 file $HOME/.rnd (or $RANDFILE, if this environment variable is set)
121 for seeding the PRNG.  If this file does not exist or is too short,
122 the "PRNG not seeded" error message may occur.
123
124 [Note to OpenSSL 0.9.5 users: The command "openssl rsa" in version
125 0.9.5 does not do this and will fail on systems without /dev/urandom
126 when trying to password-encrypt an RSA key!  This is a bug in the
127 library; try a later version instead.]
128
129
130 * Why does the linker complain about undefined symbols?
131
132 Maybe the compilation was interrupted, and make doesn't notice that
133 something is missing.  Run "make clean; make".
134
135 If you used ./Configure instead of ./config, make sure that you
136 selected the right target.  File formats may differ slightly between
137 OS versions (for example sparcv8/sparcv9, or a.out/elf).
138
139 In case you get errors about the following symbols, use the config
140 option "no-asm", as described in INSTALL:
141
142  BF_cbc_encrypt, BF_decrypt, BF_encrypt, CAST_cbc_encrypt,
143  CAST_decrypt, CAST_encrypt, RC4, RC5_32_cbc_encrypt, RC5_32_decrypt,
144  RC5_32_encrypt, bn_add_words, bn_div_words, bn_mul_add_words,
145  bn_mul_comba4, bn_mul_comba8, bn_mul_words, bn_sqr_comba4,
146  bn_sqr_comba8, bn_sqr_words, bn_sub_words, des_decrypt3,
147  des_ede3_cbc_encrypt, des_encrypt, des_encrypt2, des_encrypt3,
148  des_ncbc_encrypt, md5_block_asm_host_order, sha1_block_asm_data_order
149
150 If none of these helps, you may want to try using the current snapshot.
151 If the problem persists, please submit a bug report.
152
153
154 * Where can I get a compiled version of OpenSSL?
155
156 Some applications that use OpenSSL are distributed in binary form.
157 When using such an application, you don't need to install OpenSSL
158 yourself; the application will include the required parts (e.g. DLLs).
159
160 If you want to install OpenSSL on a Windows system and you don't have
161 a C compiler, read the "Mingw32" section of INSTALL.W32 for information
162 on how to obtain and install the free GNU C compiler.
163
164 A number of Linux and *BSD distributions include OpenSSL.
165
166
167 * I've compiled a program under Windows and it crashes: why?
168
169 This is usually because you've missed the comment in INSTALL.W32. You
170 must link with the multithreaded DLL version of the VC++ runtime library
171 otherwise the conflict will cause a program to crash: typically on the
172 first BIO related read or write operation.
173
174
175 * Why do I get errors about unknown algorithms?
176
177 This can happen under several circumstances such as reading in an
178 encrypted private key or attempting to decrypt a PKCS#12 file. The cause
179 is forgetting to load OpenSSL's table of algorithms with
180 OpenSSL_add_all_algorithms(). See the manual page for more information.
181
182
183 * How do I create certificates or certificate requests?
184
185 Check out the CA.pl(1) manual page. This provides a simple wrapper round
186 the 'req', 'verify', 'ca' and 'pkcs12' utilities. For finer control check
187 out the manual pages for the individual utilities and the certificate
188 extensions documentation (currently in doc/openssl.txt).
189
190
191 * Why can't I create certificate requests?
192
193 You typically get the error:
194
195         unable to find 'distinguished_name' in config
196         problems making Certificate Request
197
198 This is because it can't find the configuration file. Check out the
199 DIAGNOSTICS section of req(1) for more information.
200
201
202 * Why does <SSL program> fail with a certificate verify error?
203
204 This problem is usually indicated by log messages saying something like
205 "unable to get local issuer certificate" or "self signed certificate".
206 When a certificate is verified its root CA must be "trusted" by OpenSSL
207 this typically means that the CA certificate must be placed in a directory
208 or file and the relevant program configured to read it. The OpenSSL program
209 'verify' behaves in a similar way and issues similar error messages: check
210 the verify(1) program manual page for more information.
211
212
213 * How can I create DSA certificates?
214
215 Check the CA.pl(1) manual page for a DSA certificate example.
216
217
218 * Why can't I make an SSL connection to a server using a DSA certificate?
219
220 Typically you'll see a message saying there are no shared ciphers when
221 the same setup works fine with an RSA certificate. There are two possible
222 causes. The client may not support connections to DSA servers most web
223 browsers only support connections to servers supporting RSA cipher suites.
224 The other cause is that a set of DH parameters has not been supplied to
225 the server. DH parameters can be created with the dhparam(1) command and
226 loaded using the SSL_CTX_set_tmp_dh() for example: check the source to
227 s_server in apps/s_server.c for an example.
228
229
230 * Why can't the OpenSSH configure script detect OpenSSL?
231
232 There is a problem with OpenSSH 1.2.2p1, in that the configure script
233 can't find the installed OpenSSL libraries.  The problem is actually
234 a small glitch that is easily solved with the following patch to be
235 applied to the OpenSSH distribution:
236
237 ----- snip:start -----
238 --- openssh-1.2.2p1/configure.in.orig   Thu Mar 23 18:56:58 2000
239 +++ openssh-1.2.2p1/configure.in        Thu Mar 23 18:55:05 2000
240 @@ -152,10 +152,10 @@
241  AC_MSG_CHECKING([for OpenSSL/SSLeay directory])
242  for ssldir in "" $tryssldir /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do
243         if test ! -z "$ssldir" ; then
244 -               LIBS="$saved_LIBS -L$ssldir"
245 +               LIBS="$saved_LIBS -L$ssldir/lib"
246                 CFLAGS="$CFLAGS -I$ssldir/include"
247                 if test "x$need_dash_r" = "x1" ; then
248 -                       LIBS="$LIBS -R$ssldir"
249 +                       LIBS="$LIBS -R$ssldir/lib"
250                 fi
251         fi
252         LIBS="$LIBS -lcrypto"
253 --- openssh-1.2.2p1/configure.orig      Thu Mar 23 18:55:02 2000
254 +++ openssh-1.2.2p1/configure   Thu Mar 23 18:57:08 2000
255 @@ -1890,10 +1890,10 @@
256  echo "configure:1891: checking for OpenSSL/SSLeay directory" >&5
257  for ssldir in "" $tryssldir /usr /usr/local/openssl /usr/lib/openssl /usr/local/ssl /usr/lib/ssl /usr/local /usr/pkg /opt /opt/openssl ; do
258         if test ! -z "$ssldir" ; then
259 -               LIBS="$saved_LIBS -L$ssldir"
260 +               LIBS="$saved_LIBS -L$ssldir/lib"
261                 CFLAGS="$CFLAGS -I$ssldir/include"
262                 if test "x$need_dash_r" = "x1" ; then
263 -                       LIBS="$LIBS -R$ssldir"
264 +                       LIBS="$LIBS -R$ssldir/lib"
265                 fi
266         fi
267         LIBS="$LIBS -lcrypto"
268 ----- snip:end -----