Document the change.
[oweals/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 * I've called <some function> and it fails, why?
14 * I just get a load of numbers for the error output, what do they mean?
15 * Why do I get errors about unknown algorithms?
16 * How do I create certificates or certificate requests?
17 * Why can't I create certificate requests?
18 * Why does <SSL program> fail with a certificate verify error?
19 * Why can I only use weak ciphers when I connect to a server using OpenSSL?
20 * How can I create DSA certificates?
21 * Why can't I make an SSL connection using a DSA certificate?
22 * How can I remove the passphrase on a private key?
23 * Why can't the OpenSSH configure script detect OpenSSL?
24 * Why does the OpenSSL test fail with "bc: command not found"?
25 * Why does the OpenSSL test fail with "bc: 1 no implemented"?
26 * Why does the OpenSSL compilation fail on Alpha True64 Unix?
27
28
29 * Which is the current version of OpenSSL?
30
31 The current version is available from <URL: http://www.openssl.org>.
32 OpenSSL 0.9.5a was released on April 1st, 2000.
33
34 In addition to the current stable release, you can also access daily
35 snapshots of the OpenSSL development version at <URL:
36 ftp://ftp.openssl.org/snapshot/>, or get it by anonymous CVS access.
37
38
39 * Where is the documentation?
40
41 OpenSSL is a library that provides cryptographic functionality to
42 applications such as secure web servers.  Be sure to read the
43 documentation of the application you want to use.  The INSTALL file
44 explains how to install this library.
45
46 OpenSSL includes a command line utility that can be used to perform a
47 variety of cryptographic functions.  It is described in the openssl(1)
48 manpage.  Documentation for developers is currently being written.  A
49 few manual pages already are available; overviews over libcrypto and
50 libssl are given in the crypto(3) and ssl(3) manpages.
51
52 The OpenSSL manpages are installed in /usr/local/ssl/man/ (or a
53 different directory if you specified one as described in INSTALL).
54 In addition, you can read the most current versions at
55 <URL: http://www.openssl.org/docs/>.
56
57 For information on parts of libcrypto that are not yet documented, you
58 might want to read Ariel Glenn's documentation on SSLeay 0.9, OpenSSL's
59 predecessor, at <URL: http://www.columbia.edu/~ariel/ssleay/>.  Much
60 of this still applies to OpenSSL.
61
62 There is some documentation about certificate extensions and PKCS#12
63 in doc/openssl.txt
64
65 The original SSLeay documentation is included in OpenSSL as
66 doc/ssleay.txt.  It may be useful when none of the other resources
67 help, but please note that it reflects the obsolete version SSLeay
68 0.6.6.
69
70
71 * How can I contact the OpenSSL developers?
72
73 The README file describes how to submit bug reports and patches to
74 OpenSSL.  Information on the OpenSSL mailing lists is available from
75 <URL: http://www.openssl.org>.
76
77
78 * Do I need patent licenses to use OpenSSL?
79
80 The patents section of the README file lists patents that may apply to
81 you if you want to use OpenSSL.  For information on intellectual
82 property rights, please consult a lawyer.  The OpenSSL team does not
83 offer legal advice.
84
85 You can configure OpenSSL so as not to use RC5 and IDEA by using
86  ./config no-rc5 no-idea
87
88 Until the RSA patent expires, U.S. users may want to use
89  ./config no-rc5 no-idea no-rsa
90
91 Please note that you will *not* be able to communicate with most of
92 the popular web browsers without RSA support.
93
94
95 * Is OpenSSL thread-safe?
96
97 Yes (with limitations: an SSL connection may not concurrently be used
98 by multiple threads).  On Windows and many Unix systems, OpenSSL
99 automatically uses the multi-threaded versions of the standard
100 libraries.  If your platform is not one of these, consult the INSTALL
101 file.
102
103 Multi-threaded applications must provide two callback functions to
104 OpenSSL.  This is described in the threads(3) manpage.
105
106
107 * Why do I get a "PRNG not seeded" error message?
108
109 Cryptographic software needs a source of unpredictable data to work
110 correctly.  Many open source operating systems provide a "randomness
111 device" that serves this purpose.  On other systems, applications have
112 to call the RAND_add() or RAND_seed() function with appropriate data
113 before generating keys or performing public key encryption.
114
115 Some broken applications do not do this.  As of version 0.9.5, the
116 OpenSSL functions that need randomness report an error if the random
117 number generator has not been seeded with at least 128 bits of
118 randomness.  If this error occurs, please contact the author of the
119 application you are using.  It is likely that it never worked
120 correctly.  OpenSSL 0.9.5 and later make the error visible by refusing
121 to perform potentially insecure encryption.
122
123 On systems without /dev/urandom, it is a good idea to use the Entropy
124 Gathering Demon; see the RAND_egd() manpage for details.
125
126 Most components of the openssl command line tool try to use the
127 file $HOME/.rnd (or $RANDFILE, if this environment variable is set)
128 for seeding the PRNG.  If this file does not exist or is too short,
129 the "PRNG not seeded" error message may occur.
130
131 [Note to OpenSSL 0.9.5 users: The command "openssl rsa" in version
132 0.9.5 does not do this and will fail on systems without /dev/urandom
133 when trying to password-encrypt an RSA key!  This is a bug in the
134 library; try a later version instead.]
135
136
137 * Why does the linker complain about undefined symbols?
138
139 Maybe the compilation was interrupted, and make doesn't notice that
140 something is missing.  Run "make clean; make".
141
142 If you used ./Configure instead of ./config, make sure that you
143 selected the right target.  File formats may differ slightly between
144 OS versions (for example sparcv8/sparcv9, or a.out/elf).
145
146 In case you get errors about the following symbols, use the config
147 option "no-asm", as described in INSTALL:
148
149  BF_cbc_encrypt, BF_decrypt, BF_encrypt, CAST_cbc_encrypt,
150  CAST_decrypt, CAST_encrypt, RC4, RC5_32_cbc_encrypt, RC5_32_decrypt,
151  RC5_32_encrypt, bn_add_words, bn_div_words, bn_mul_add_words,
152  bn_mul_comba4, bn_mul_comba8, bn_mul_words, bn_sqr_comba4,
153  bn_sqr_comba8, bn_sqr_words, bn_sub_words, des_decrypt3,
154  des_ede3_cbc_encrypt, des_encrypt, des_encrypt2, des_encrypt3,
155  des_ncbc_encrypt, md5_block_asm_host_order, sha1_block_asm_data_order
156
157 If none of these helps, you may want to try using the current snapshot.
158 If the problem persists, please submit a bug report.
159
160
161 * Where can I get a compiled version of OpenSSL?
162
163 Some applications that use OpenSSL are distributed in binary form.
164 When using such an application, you don't need to install OpenSSL
165 yourself; the application will include the required parts (e.g. DLLs).
166
167 If you want to install OpenSSL on a Windows system and you don't have
168 a C compiler, read the "Mingw32" section of INSTALL.W32 for information
169 on how to obtain and install the free GNU C compiler.
170
171 A number of Linux and *BSD distributions include OpenSSL.
172
173
174 * I've compiled a program under Windows and it crashes: why?
175
176 This is usually because you've missed the comment in INSTALL.W32. You
177 must link with the multithreaded DLL version of the VC++ runtime library
178 otherwise the conflict will cause a program to crash: typically on the
179 first BIO related read or write operation.
180
181
182 * I've called <some function> and it fails, why?
183
184 Before submitting a report or asking in one of the mailing lists, you
185 should try to determine the cause. In particular, you should call
186 ERR_print_errors() or ERR_print_errors_fp() after the failed call
187 and see if the message helps. Note that the problem may occur earlier
188 than you think -- you should check for errors after every call where
189 it is possible, otherwise the actual problem may be hidden because
190 some OpenSSL functions clear the error state.
191
192
193 * I just get a load of numbers for the error output, what do they mean?
194
195 The actual format is described in the ERR_print_errors() manual page.
196 You should call the function ERR_load_crypto_strings() before hand and
197 the message will be output in text form. If you can't do this (for example
198 it is a pre-compiled binary) you can use the errstr utility on the error
199 code itself (the hex digits after the second colon).
200
201
202 * Why do I get errors about unknown algorithms?
203
204 This can happen under several circumstances such as reading in an
205 encrypted private key or attempting to decrypt a PKCS#12 file. The cause
206 is forgetting to load OpenSSL's table of algorithms with
207 OpenSSL_add_all_algorithms(). See the manual page for more information.
208
209
210 * How do I create certificates or certificate requests?
211
212 Check out the CA.pl(1) manual page. This provides a simple wrapper round
213 the 'req', 'verify', 'ca' and 'pkcs12' utilities. For finer control check
214 out the manual pages for the individual utilities and the certificate
215 extensions documentation (currently in doc/openssl.txt).
216
217
218 * Why can't I create certificate requests?
219
220 You typically get the error:
221
222         unable to find 'distinguished_name' in config
223         problems making Certificate Request
224
225 This is because it can't find the configuration file. Check out the
226 DIAGNOSTICS section of req(1) for more information.
227
228
229 * Why does <SSL program> fail with a certificate verify error?
230
231 This problem is usually indicated by log messages saying something like
232 "unable to get local issuer certificate" or "self signed certificate".
233 When a certificate is verified its root CA must be "trusted" by OpenSSL
234 this typically means that the CA certificate must be placed in a directory
235 or file and the relevant program configured to read it. The OpenSSL program
236 'verify' behaves in a similar way and issues similar error messages: check
237 the verify(1) program manual page for more information.
238
239
240 * Why can I only use weak ciphers when I connect to a server using OpenSSL?
241
242 This is almost certainly because you are using an old "export grade" browser
243 which only supports weak encryption. Upgrade your browser to support 128 bit
244 ciphers.
245
246
247 * How can I create DSA certificates?
248
249 Check the CA.pl(1) manual page for a DSA certificate example.
250
251
252 * Why can't I make an SSL connection to a server using a DSA certificate?
253
254 Typically you'll see a message saying there are no shared ciphers when
255 the same setup works fine with an RSA certificate. There are two possible
256 causes. The client may not support connections to DSA servers most web
257 browsers (including Netscape and MSIE) only support connections to servers
258 supporting RSA cipher suites. The other cause is that a set of DH parameters
259 has not been supplied to the server. DH parameters can be created with the
260 dhparam(1) command and loaded using the SSL_CTX_set_tmp_dh() for example:
261 check the source to s_server in apps/s_server.c for an example.
262
263
264 * How can I remove the passphrase on a private key?
265
266 Firstly you should be really *really* sure you want to do this. Leaving
267 a private key unencrypted is a major security risk. If you decide that
268 you do have to do this check the EXAMPLES sections of the rsa(1) and
269 dsa(1) manual pages.
270
271
272 * Why can't the OpenSSH configure script detect OpenSSL?
273
274 There is a problem with OpenSSH 1.2.2p1, in that the configure script
275 can't find the installed OpenSSL libraries.  The problem is actually
276 a small glitch that is easily solved with the following patch to be
277 applied to the OpenSSH distribution:
278
279 ----- snip:start -----
280 --- openssh-1.2.2p1/configure.in.orig   Thu Mar 23 18:56:58 2000
281 +++ openssh-1.2.2p1/configure.in        Thu Mar 23 18:55:05 2000
282 @@ -152,10 +152,10 @@
283  AC_MSG_CHECKING([for OpenSSL/SSLeay directory])
284  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
285         if test ! -z "$ssldir" ; then
286 -               LIBS="$saved_LIBS -L$ssldir"
287 +               LIBS="$saved_LIBS -L$ssldir/lib"
288                 CFLAGS="$CFLAGS -I$ssldir/include"
289                 if test "x$need_dash_r" = "x1" ; then
290 -                       LIBS="$LIBS -R$ssldir"
291 +                       LIBS="$LIBS -R$ssldir/lib"
292                 fi
293         fi
294         LIBS="$LIBS -lcrypto"
295 --- openssh-1.2.2p1/configure.orig      Thu Mar 23 18:55:02 2000
296 +++ openssh-1.2.2p1/configure   Thu Mar 23 18:57:08 2000
297 @@ -1890,10 +1890,10 @@
298  echo "configure:1891: checking for OpenSSL/SSLeay directory" >&5
299  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
300         if test ! -z "$ssldir" ; then
301 -               LIBS="$saved_LIBS -L$ssldir"
302 +               LIBS="$saved_LIBS -L$ssldir/lib"
303                 CFLAGS="$CFLAGS -I$ssldir/include"
304                 if test "x$need_dash_r" = "x1" ; then
305 -                       LIBS="$LIBS -R$ssldir"
306 +                       LIBS="$LIBS -R$ssldir/lib"
307                 fi
308         fi
309         LIBS="$LIBS -lcrypto"
310 ----- snip:end -----
311
312
313 * Why does the OpenSSL test fail with "bc: command not found"?
314
315 You didn't install "bc", the Unix calculator.  If you want to run the
316 tests, get GNU bc from ftp://ftp.gnu.org or from your OS distributor.
317
318
319 * Why does the OpenSSL test fail with "bc: 1 no implemented"?
320
321 On some SCO installations or versions, bc has a bug that gets triggered when
322 you run the test suite (using "make test").  The message returned is "bc:
323 1 not implemented".  The best way to deal with this is to find another
324 implementation of bc and compile/install it.  For example, GNU bc (see
325 http://www.gnu.org/software/software.html for download instructions) can
326 be safely used.
327
328
329 * Why does the OpenSSL compilation fail on Alpha True64 Unix?
330
331 On some Alpha installations running True64 Unix and Compaq C, the compilation
332 of crypto/sha/sha_dgst.c fails with the message 'Fatal:  Insufficient virtual
333 memory to continue compilation.'  It's currently unknown why this happens,
334 except that it has to do with optimization.  The very quick solution would
335 be to compile everything with -O0 as optimization level, but that's not a very
336 nice thing to do for those who expect to get the best result from OpenSSL.
337 A bit more complicated solution is the following:
338
339 ----- snip:start -----
340   make DIRS=crypto SDIRS=sha "`grep '^CFLAG=' Makefile.ssl | \
341        sed -e 's/ -O[0-9] / -O0 /'`"
342   rm `ls crypto/*.o crypto/sha/*.o | grep -v 'sha_dgst\.o'`
343   make
344 ----- snip:end -----
345
346 This will only compile sha_dgst.c with -O0, the rest with the optimization
347 level chosen by the configuration process.  When the above is done, do the
348 test and installation and you're set.
349