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