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