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