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