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