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
89 Until the RSA patent expires, U.S. users may want to use
90 ./config no-rc5 no-idea no-rsa
92 Please note that you will *not* be able to communicate with most of
93 the popular web browsers without RSA support.
96 * Is OpenSSL thread-safe?
98 Yes (with limitations: an SSL connection may not concurrently be used
99 by multiple threads). On Windows and many Unix systems, OpenSSL
100 automatically uses the multi-threaded versions of the standard
101 libraries. If your platform is not one of these, consult the INSTALL
104 Multi-threaded applications must provide two callback functions to
105 OpenSSL. This is described in the threads(3) manpage.
108 * Why do I get a "PRNG not seeded" error message?
110 Cryptographic software needs a source of unpredictable data to work
111 correctly. Many open source operating systems provide a "randomness
112 device" that serves this purpose. On other systems, applications have
113 to call the RAND_add() or RAND_seed() function with appropriate data
114 before generating keys or performing public key encryption.
116 Some broken applications do not do this. As of version 0.9.5, the
117 OpenSSL functions that need randomness report an error if the random
118 number generator has not been seeded with at least 128 bits of
119 randomness. If this error occurs, please contact the author of the
120 application you are using. It is likely that it never worked
121 correctly. OpenSSL 0.9.5 and later make the error visible by refusing
122 to perform potentially insecure encryption.
124 On systems without /dev/urandom, it is a good idea to use the Entropy
125 Gathering Demon; see the RAND_egd() manpage for details.
127 Most components of the openssl command line tool try to use the
128 file $HOME/.rnd (or $RANDFILE, if this environment variable is set)
129 for seeding the PRNG. If this file does not exist or is too short,
130 the "PRNG not seeded" error message may occur.
132 [Note to OpenSSL 0.9.5 users: The command "openssl rsa" in version
133 0.9.5 does not do this and will fail on systems without /dev/urandom
134 when trying to password-encrypt an RSA key! This is a bug in the
135 library; try a later version instead.]
137 For Solaris 2.6, Tim Nibbe <tnibbe@sprint.net> and others have suggested
138 installing the SUNski package from Sun patch 105710-01 (Sparc) which
139 adds a /dev/random device and make sure it gets used, usually through
140 $RANDFILE. There are probably similar patches for the other Solaris
141 versions. However, be warned that /dev/random is usually a blocking
142 device, which may have som effects on OpenSSL.
145 * Why does the linker complain about undefined symbols?
147 Maybe the compilation was interrupted, and make doesn't notice that
148 something is missing. Run "make clean; make".
150 If you used ./Configure instead of ./config, make sure that you
151 selected the right target. File formats may differ slightly between
152 OS versions (for example sparcv8/sparcv9, or a.out/elf).
154 In case you get errors about the following symbols, use the config
155 option "no-asm", as described in INSTALL:
157 BF_cbc_encrypt, BF_decrypt, BF_encrypt, CAST_cbc_encrypt,
158 CAST_decrypt, CAST_encrypt, RC4, RC5_32_cbc_encrypt, RC5_32_decrypt,
159 RC5_32_encrypt, bn_add_words, bn_div_words, bn_mul_add_words,
160 bn_mul_comba4, bn_mul_comba8, bn_mul_words, bn_sqr_comba4,
161 bn_sqr_comba8, bn_sqr_words, bn_sub_words, des_decrypt3,
162 des_ede3_cbc_encrypt, des_encrypt, des_encrypt2, des_encrypt3,
163 des_ncbc_encrypt, md5_block_asm_host_order, sha1_block_asm_data_order
165 If none of these helps, you may want to try using the current snapshot.
166 If the problem persists, please submit a bug report.
169 * Where can I get a compiled version of OpenSSL?
171 Some applications that use OpenSSL are distributed in binary form.
172 When using such an application, you don't need to install OpenSSL
173 yourself; the application will include the required parts (e.g. DLLs).
175 If you want to install OpenSSL on a Windows system and you don't have
176 a C compiler, read the "Mingw32" section of INSTALL.W32 for information
177 on how to obtain and install the free GNU C compiler.
179 A number of Linux and *BSD distributions include OpenSSL.
182 * I've compiled a program under Windows and it crashes: why?
184 This is usually because you've missed the comment in INSTALL.W32. You
185 must link with the multithreaded DLL version of the VC++ runtime library
186 otherwise the conflict will cause a program to crash: typically on the
187 first BIO related read or write operation.
190 * I've called <some function> and it fails, why?
192 Before submitting a report or asking in one of the mailing lists, you
193 should try to determine the cause. In particular, you should call
194 ERR_print_errors() or ERR_print_errors_fp() after the failed call
195 and see if the message helps. Note that the problem may occur earlier
196 than you think -- you should check for errors after every call where
197 it is possible, otherwise the actual problem may be hidden because
198 some OpenSSL functions clear the error state.
201 * I just get a load of numbers for the error output, what do they mean?
203 The actual format is described in the ERR_print_errors() manual page.
204 You should call the function ERR_load_crypto_strings() before hand and
205 the message will be output in text form. If you can't do this (for example
206 it is a pre-compiled binary) you can use the errstr utility on the error
207 code itself (the hex digits after the second colon).
210 * Why do I get errors about unknown algorithms?
212 This can happen under several circumstances such as reading in an
213 encrypted private key or attempting to decrypt a PKCS#12 file. The cause
214 is forgetting to load OpenSSL's table of algorithms with
215 OpenSSL_add_all_algorithms(). See the manual page for more information.
218 * How do I create certificates or certificate requests?
220 Check out the CA.pl(1) manual page. This provides a simple wrapper round
221 the 'req', 'verify', 'ca' and 'pkcs12' utilities. For finer control check
222 out the manual pages for the individual utilities and the certificate
223 extensions documentation (currently in doc/openssl.txt).
226 * Why can't I create certificate requests?
228 You typically get the error:
230 unable to find 'distinguished_name' in config
231 problems making Certificate Request
233 This is because it can't find the configuration file. Check out the
234 DIAGNOSTICS section of req(1) for more information.
237 * Why does <SSL program> fail with a certificate verify error?
239 This problem is usually indicated by log messages saying something like
240 "unable to get local issuer certificate" or "self signed certificate".
241 When a certificate is verified its root CA must be "trusted" by OpenSSL
242 this typically means that the CA certificate must be placed in a directory
243 or file and the relevant program configured to read it. The OpenSSL program
244 'verify' behaves in a similar way and issues similar error messages: check
245 the verify(1) program manual page for more information.
248 * Why can I only use weak ciphers when I connect to a server using OpenSSL?
250 This is almost certainly because you are using an old "export grade" browser
251 which only supports weak encryption. Upgrade your browser to support 128 bit
255 * How can I create DSA certificates?
257 Check the CA.pl(1) manual page for a DSA certificate example.
260 * Why can't I make an SSL connection to a server using a DSA certificate?
262 Typically you'll see a message saying there are no shared ciphers when
263 the same setup works fine with an RSA certificate. There are two possible
264 causes. The client may not support connections to DSA servers most web
265 browsers (including Netscape and MSIE) only support connections to servers
266 supporting RSA cipher suites. The other cause is that a set of DH parameters
267 has not been supplied to the server. DH parameters can be created with the
268 dhparam(1) command and loaded using the SSL_CTX_set_tmp_dh() for example:
269 check the source to s_server in apps/s_server.c for an example.
272 * How can I remove the passphrase on a private key?
274 Firstly you should be really *really* sure you want to do this. Leaving
275 a private key unencrypted is a major security risk. If you decide that
276 you do have to do this check the EXAMPLES sections of the rsa(1) and
280 * Why can't the OpenSSH configure script detect OpenSSL?
282 There is a problem with OpenSSH 1.2.2p1, in that the configure script
283 can't find the installed OpenSSL libraries. The problem is actually
284 a small glitch that is easily solved with the following patch to be
285 applied to the OpenSSH distribution:
287 ----- snip:start -----
288 --- openssh-1.2.2p1/configure.in.orig Thu Mar 23 18:56:58 2000
289 +++ openssh-1.2.2p1/configure.in Thu Mar 23 18:55:05 2000
290 @@ -152,10 +152,10 @@
291 AC_MSG_CHECKING([for OpenSSL/SSLeay directory])
292 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
293 if test ! -z "$ssldir" ; then
294 - LIBS="$saved_LIBS -L$ssldir"
295 + LIBS="$saved_LIBS -L$ssldir/lib"
296 CFLAGS="$CFLAGS -I$ssldir/include"
297 if test "x$need_dash_r" = "x1" ; then
298 - LIBS="$LIBS -R$ssldir"
299 + LIBS="$LIBS -R$ssldir/lib"
302 LIBS="$LIBS -lcrypto"
303 --- openssh-1.2.2p1/configure.orig Thu Mar 23 18:55:02 2000
304 +++ openssh-1.2.2p1/configure Thu Mar 23 18:57:08 2000
305 @@ -1890,10 +1890,10 @@
306 echo "configure:1891: checking for OpenSSL/SSLeay directory" >&5
307 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
308 if test ! -z "$ssldir" ; then
309 - LIBS="$saved_LIBS -L$ssldir"
310 + LIBS="$saved_LIBS -L$ssldir/lib"
311 CFLAGS="$CFLAGS -I$ssldir/include"
312 if test "x$need_dash_r" = "x1" ; then
313 - LIBS="$LIBS -R$ssldir"
314 + LIBS="$LIBS -R$ssldir/lib"
317 LIBS="$LIBS -lcrypto"
321 * Why does the OpenSSL test fail with "bc: command not found"?
323 You didn't install "bc", the Unix calculator. If you want to run the
324 tests, get GNU bc from ftp://ftp.gnu.org or from your OS distributor.
327 * Why does the OpenSSL test fail with "bc: 1 no implemented"?
329 On some SCO installations or versions, bc has a bug that gets triggered when
330 you run the test suite (using "make test"). The message returned is "bc:
331 1 not implemented". The best way to deal with this is to find another
332 implementation of bc and compile/install it. For example, GNU bc (see
333 http://www.gnu.org/software/software.html for download instructions) can
337 * Why does the OpenSSL compilation fail on Alpha True64 Unix?
339 On some Alpha installations running True64 Unix and Compaq C, the compilation
340 of crypto/sha/sha_dgst.c fails with the message 'Fatal: Insufficient virtual
341 memory to continue compilation.' As far as the tests have shown, this may be
342 a compiler bug. What happens is that it eats up a lot of resident memory
343 to build something, probably a table. The problem is clearly in the
344 optimization code, because if one eliminates optimization completely (-O0),
345 the compilation goes through (and the compiler consumes about 2MB of resident
346 memory instead of 240MB or whatever one's limit is currently).
348 There are three options to solve this problem:
350 1. set your current data segment size soft limit higher. Experience shows
351 that about 241000 kbytes seems to be enough on an AlphaServer DS10. You do
352 this with the command 'ulimit -Sd nnnnnn', where 'nnnnnn' is the number of
353 kbytes to set the limit to.
355 2. If you have a hard limit that is lower than what you need and you can't
356 get it changed, you can compile all of OpenSSL with -O0 as optimization
357 level. This is however not a very nice thing to do for those who expect to
358 get the best result from OpenSSL. A bit more complicated solution is the
361 ----- snip:start -----
362 make DIRS=crypto SDIRS=sha "`grep '^CFLAG=' Makefile.ssl | \
363 sed -e 's/ -O[0-9] / -O0 /'`"
364 rm `ls crypto/*.o crypto/sha/*.o | grep -v 'sha_dgst\.o'`
368 This will only compile sha_dgst.c with -O0, the rest with the optimization
369 level chosen by the configuration process. When the above is done, do the
370 test and installation and you're set.
373 * Why does the OpenSSL compilation fail with "ar: command not found"?
375 Getting this message is quite usual on Solaris 2, because Sun has hidden
376 away 'ar' and other development commands in directories that aren't in
377 $PATH by default. One of those directories is '/usr/ccs/bin'. The
378 quickest way to fix this is to do the following (it assumes you use sh
379 or any sh-compatible shell):
381 ----- snip:start -----
382 PATH=${PATH}:/usr/ccs/bin; export PATH
385 and then redo the compilation. What you should really do is make sure
386 '/usr/ccs/bin' is permanently in your $PATH, for example through your
387 '.profile' (again, assuming you use a sh-compatible shell).