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: 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 * Why does the OpenSSL compilation fail with "ar: command not found"?
30 * Which is the current version of OpenSSL?
32 The current version is available from <URL: http://www.openssl.org>.
33 OpenSSL 0.9.5a was released on April 1st, 2000.
35 In addition to the current stable release, you can also access daily
36 snapshots of the OpenSSL development version at <URL:
37 ftp://ftp.openssl.org/snapshot/>, or get it by anonymous CVS access.
40 * Where is the documentation?
42 OpenSSL is a library that provides cryptographic functionality to
43 applications such as secure web servers. Be sure to read the
44 documentation of the application you want to use. The INSTALL file
45 explains how to install this library.
47 OpenSSL includes a command line utility that can be used to perform a
48 variety of cryptographic functions. It is described in the openssl(1)
49 manpage. Documentation for developers is currently being written. A
50 few manual pages already are available; overviews over libcrypto and
51 libssl are given in the crypto(3) and ssl(3) manpages.
53 The OpenSSL manpages are installed in /usr/local/ssl/man/ (or a
54 different directory if you specified one as described in INSTALL).
55 In addition, you can read the most current versions at
56 <URL: http://www.openssl.org/docs/>.
58 For information on parts of libcrypto that are not yet documented, you
59 might want to read Ariel Glenn's documentation on SSLeay 0.9, OpenSSL's
60 predecessor, at <URL: http://www.columbia.edu/~ariel/ssleay/>. Much
61 of this still applies to OpenSSL.
63 There is some documentation about certificate extensions and PKCS#12
66 The original SSLeay documentation is included in OpenSSL as
67 doc/ssleay.txt. It may be useful when none of the other resources
68 help, but please note that it reflects the obsolete version SSLeay
72 * How can I contact the OpenSSL developers?
74 The README file describes how to submit bug reports and patches to
75 OpenSSL. Information on the OpenSSL mailing lists is available from
76 <URL: http://www.openssl.org>.
79 * Do I need patent licenses to use OpenSSL?
81 The patents section of the README file lists patents that may apply to
82 you if you want to use OpenSSL. For information on intellectual
83 property rights, please consult a lawyer. The OpenSSL team does not
86 You can configure OpenSSL so as not to use RC5 and IDEA by using
87 ./config no-rc5 no-idea
90 * Is OpenSSL thread-safe?
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
98 Multi-threaded applications must provide two callback functions to
99 OpenSSL. This is described in the threads(3) manpage.
102 * Why do I get a "PRNG not seeded" error message?
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.
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.
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.
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.
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.]
131 For Solaris 2.6, Tim Nibbe <tnibbe@sprint.net> and others have suggested
132 installing the SUNski package from Sun patch 105710-01 (Sparc) which
133 adds a /dev/random device and make sure it gets used, usually through
134 $RANDFILE. There are probably similar patches for the other Solaris
135 versions. However, be warned that /dev/random is usually a blocking
136 device, which may have som effects on OpenSSL.
139 * Why does the linker complain about undefined symbols?
141 Maybe the compilation was interrupted, and make doesn't notice that
142 something is missing. Run "make clean; make".
144 If you used ./Configure instead of ./config, make sure that you
145 selected the right target. File formats may differ slightly between
146 OS versions (for example sparcv8/sparcv9, or a.out/elf).
148 In case you get errors about the following symbols, use the config
149 option "no-asm", as described in INSTALL:
151 BF_cbc_encrypt, BF_decrypt, BF_encrypt, CAST_cbc_encrypt,
152 CAST_decrypt, CAST_encrypt, RC4, RC5_32_cbc_encrypt, RC5_32_decrypt,
153 RC5_32_encrypt, bn_add_words, bn_div_words, bn_mul_add_words,
154 bn_mul_comba4, bn_mul_comba8, bn_mul_words, bn_sqr_comba4,
155 bn_sqr_comba8, bn_sqr_words, bn_sub_words, des_decrypt3,
156 des_ede3_cbc_encrypt, des_encrypt, des_encrypt2, des_encrypt3,
157 des_ncbc_encrypt, md5_block_asm_host_order, sha1_block_asm_data_order
159 If none of these helps, you may want to try using the current snapshot.
160 If the problem persists, please submit a bug report.
163 * Where can I get a compiled version of OpenSSL?
165 Some applications that use OpenSSL are distributed in binary form.
166 When using such an application, you don't need to install OpenSSL
167 yourself; the application will include the required parts (e.g. DLLs).
169 If you want to install OpenSSL on a Windows system and you don't have
170 a C compiler, read the "Mingw32" section of INSTALL.W32 for information
171 on how to obtain and install the free GNU C compiler.
173 A number of Linux and *BSD distributions include OpenSSL.
176 * I've compiled a program under Windows and it crashes: why?
178 This is usually because you've missed the comment in INSTALL.W32. You
179 must link with the multithreaded DLL version of the VC++ runtime library
180 otherwise the conflict will cause a program to crash: typically on the
181 first BIO related read or write operation.
184 * I've called <some function> and it fails, why?
186 Before submitting a report or asking in one of the mailing lists, you
187 should try to determine the cause. In particular, you should call
188 ERR_print_errors() or ERR_print_errors_fp() after the failed call
189 and see if the message helps. Note that the problem may occur earlier
190 than you think -- you should check for errors after every call where
191 it is possible, otherwise the actual problem may be hidden because
192 some OpenSSL functions clear the error state.
195 * I just get a load of numbers for the error output, what do they mean?
197 The actual format is described in the ERR_print_errors() manual page.
198 You should call the function ERR_load_crypto_strings() before hand and
199 the message will be output in text form. If you can't do this (for example
200 it is a pre-compiled binary) you can use the errstr utility on the error
201 code itself (the hex digits after the second colon).
204 * Why do I get errors about unknown algorithms?
206 This can happen under several circumstances such as reading in an
207 encrypted private key or attempting to decrypt a PKCS#12 file. The cause
208 is forgetting to load OpenSSL's table of algorithms with
209 OpenSSL_add_all_algorithms(). See the manual page for more information.
212 * How do I create certificates or certificate requests?
214 Check out the CA.pl(1) manual page. This provides a simple wrapper round
215 the 'req', 'verify', 'ca' and 'pkcs12' utilities. For finer control check
216 out the manual pages for the individual utilities and the certificate
217 extensions documentation (currently in doc/openssl.txt).
220 * Why can't I create certificate requests?
222 You typically get the error:
224 unable to find 'distinguished_name' in config
225 problems making Certificate Request
227 This is because it can't find the configuration file. Check out the
228 DIAGNOSTICS section of req(1) for more information.
231 * Why does <SSL program> fail with a certificate verify error?
233 This problem is usually indicated by log messages saying something like
234 "unable to get local issuer certificate" or "self signed certificate".
235 When a certificate is verified its root CA must be "trusted" by OpenSSL
236 this typically means that the CA certificate must be placed in a directory
237 or file and the relevant program configured to read it. The OpenSSL program
238 'verify' behaves in a similar way and issues similar error messages: check
239 the verify(1) program manual page for more information.
242 * Why can I only use weak ciphers when I connect to a server using OpenSSL?
244 This is almost certainly because you are using an old "export grade" browser
245 which only supports weak encryption. Upgrade your browser to support 128 bit
249 * How can I create DSA certificates?
251 Check the CA.pl(1) manual page for a DSA certificate example.
254 * Why can't I make an SSL connection to a server using a DSA certificate?
256 Typically you'll see a message saying there are no shared ciphers when
257 the same setup works fine with an RSA certificate. There are two possible
258 causes. The client may not support connections to DSA servers most web
259 browsers (including Netscape and MSIE) only support connections to servers
260 supporting RSA cipher suites. The other cause is that a set of DH parameters
261 has not been supplied to the server. DH parameters can be created with the
262 dhparam(1) command and loaded using the SSL_CTX_set_tmp_dh() for example:
263 check the source to s_server in apps/s_server.c for an example.
266 * How can I remove the passphrase on a private key?
268 Firstly you should be really *really* sure you want to do this. Leaving
269 a private key unencrypted is a major security risk. If you decide that
270 you do have to do this check the EXAMPLES sections of the rsa(1) and
274 * Why can't the OpenSSH configure script detect OpenSSL?
276 There is a problem with OpenSSH 1.2.2p1, in that the configure script
277 can't find the installed OpenSSL libraries. The problem is actually
278 a small glitch that is easily solved with the following patch to be
279 applied to the OpenSSH distribution:
281 ----- snip:start -----
282 --- openssh-1.2.2p1/configure.in.orig Thu Mar 23 18:56:58 2000
283 +++ openssh-1.2.2p1/configure.in Thu Mar 23 18:55:05 2000
284 @@ -152,10 +152,10 @@
285 AC_MSG_CHECKING([for OpenSSL/SSLeay directory])
286 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
287 if test ! -z "$ssldir" ; then
288 - LIBS="$saved_LIBS -L$ssldir"
289 + LIBS="$saved_LIBS -L$ssldir/lib"
290 CFLAGS="$CFLAGS -I$ssldir/include"
291 if test "x$need_dash_r" = "x1" ; then
292 - LIBS="$LIBS -R$ssldir"
293 + LIBS="$LIBS -R$ssldir/lib"
296 LIBS="$LIBS -lcrypto"
297 --- openssh-1.2.2p1/configure.orig Thu Mar 23 18:55:02 2000
298 +++ openssh-1.2.2p1/configure Thu Mar 23 18:57:08 2000
299 @@ -1890,10 +1890,10 @@
300 echo "configure:1891: checking for OpenSSL/SSLeay directory" >&5
301 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
302 if test ! -z "$ssldir" ; then
303 - LIBS="$saved_LIBS -L$ssldir"
304 + LIBS="$saved_LIBS -L$ssldir/lib"
305 CFLAGS="$CFLAGS -I$ssldir/include"
306 if test "x$need_dash_r" = "x1" ; then
307 - LIBS="$LIBS -R$ssldir"
308 + LIBS="$LIBS -R$ssldir/lib"
311 LIBS="$LIBS -lcrypto"
315 * Why does the OpenSSL test fail with "bc: command not found"?
317 You didn't install "bc", the Unix calculator. If you want to run the
318 tests, get GNU bc from ftp://ftp.gnu.org or from your OS distributor.
321 * Why does the OpenSSL test fail with "bc: 1 no implemented"?
323 On some SCO installations or versions, bc has a bug that gets triggered when
324 you run the test suite (using "make test"). The message returned is "bc:
325 1 not implemented". The best way to deal with this is to find another
326 implementation of bc and compile/install it. For example, GNU bc (see
327 http://www.gnu.org/software/software.html for download instructions) can
331 * Why does the OpenSSL compilation fail on Alpha True64 Unix?
333 On some Alpha installations running True64 Unix and Compaq C, the compilation
334 of crypto/sha/sha_dgst.c fails with the message 'Fatal: Insufficient virtual
335 memory to continue compilation.' As far as the tests have shown, this may be
336 a compiler bug. What happens is that it eats up a lot of resident memory
337 to build something, probably a table. The problem is clearly in the
338 optimization code, because if one eliminates optimization completely (-O0),
339 the compilation goes through (and the compiler consumes about 2MB of resident
340 memory instead of 240MB or whatever one's limit is currently).
342 There are three options to solve this problem:
344 1. set your current data segment size soft limit higher. Experience shows
345 that about 241000 kbytes seems to be enough on an AlphaServer DS10. You do
346 this with the command 'ulimit -Sd nnnnnn', where 'nnnnnn' is the number of
347 kbytes to set the limit to.
349 2. If you have a hard limit that is lower than what you need and you can't
350 get it changed, you can compile all of OpenSSL with -O0 as optimization
351 level. This is however not a very nice thing to do for those who expect to
352 get the best result from OpenSSL. A bit more complicated solution is the
355 ----- snip:start -----
356 make DIRS=crypto SDIRS=sha "`grep '^CFLAG=' Makefile.ssl | \
357 sed -e 's/ -O[0-9] / -O0 /'`"
358 rm `ls crypto/*.o crypto/sha/*.o | grep -v 'sha_dgst\.o'`
362 This will only compile sha_dgst.c with -O0, the rest with the optimization
363 level chosen by the configuration process. When the above is done, do the
364 test and installation and you're set.
367 * Why does the OpenSSL compilation fail with "ar: command not found"?
369 Getting this message is quite usual on Solaris 2, because Sun has hidden
370 away 'ar' and other development commands in directories that aren't in
371 $PATH by default. One of those directories is '/usr/ccs/bin'. The
372 quickest way to fix this is to do the following (it assumes you use sh
373 or any sh-compatible shell):
375 ----- snip:start -----
376 PATH=${PATH}:/usr/ccs/bin; export PATH
379 and then redo the compilation. What you should really do is make sure
380 '/usr/ccs/bin' is permanently in your $PATH, for example through your
381 '.profile' (again, assuming you use a sh-compatible shell).