Rename SSLeay_add_all_algorithms() et al to
authorDr. Stephen Henson <steve@openssl.org>
Fri, 4 Feb 2000 14:01:38 +0000 (14:01 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Fri, 4 Feb 2000 14:01:38 +0000 (14:01 +0000)
OpenSSL_add_all_algorithms(). Move these into
separate files so they work properly.

20 files changed:
CHANGES
apps/ciphers.c
apps/pkcs8.c
apps/s_client.c
apps/s_server.c
apps/s_time.c
crypto/evp/Makefile.ssl
crypto/evp/c_all.c
crypto/evp/c_allc.c [new file with mode: 0644]
crypto/evp/c_alld.c [new file with mode: 0644]
crypto/evp/evp.h
crypto/pkcs7/dec.c
crypto/pkcs7/enc.c
crypto/threads/mttest.c
demos/bio/saccept.c
demos/bio/sconnect.c
mt/mttest.c
ssl/ssl.h
ssl/ssl_task.c
util/libeay.num

diff --git a/CHANGES b/CHANGES
index d49e01bdb4b7f0e814a23e6449d2c50d99702f06..eab6eca939f17bb0909570709cb8f1acf4027de7 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,15 @@
 
  Changes between 0.9.4 and 0.9.5  [xx XXX 2000]
 
+  *) Change the SSLeay_add_all_*() functions to OpenSSL_add_all_*() and
+     include a #define from the old name to the new. The original intent
+     was that statically linked binaries could for example just call
+     SSLeay_add_all_ciphers() to just add ciphers to the table and not
+     link with digests. This never worked becayse SSLeay_add_all_digests()
+     and SSLeay_add_all_ciphers() were in the same source file so calling
+     one would link with the other. They are now in separate source files.
+     [Steve Henson]
+
   *) Add a new -notext option to 'ca' and a -pubkey option to 'spkac'.
      [Steve Henson]
 
index f473f4c3dcec26c1af0a8fa689fa4f24bd5b224f..4baa0c3c8ebef8b7fe1e60adb167e9447fef3990 100644 (file)
@@ -141,7 +141,7 @@ int MAIN(int argc, char **argv)
                goto end;
                }
 
-       SSLeay_add_ssl_algorithms();
+       OpenSSL_add_ssl_algorithms();
 
        ctx=SSL_CTX_new(meth);
        if (ctx == NULL) goto err;
index a9583335178b7d781ac3a0f9c9400b14b0c4bd25..ccd7b44d1c083a380229a9729376aeea765857b7 100644 (file)
@@ -87,7 +87,7 @@ int MAIN(int argc, char **argv)
        informat=FORMAT_PEM;
        outformat=FORMAT_PEM;
        ERR_load_crypto_strings();
-       SSLeay_add_all_algorithms();
+       OpenSSL_add_all_algorithms();
        args = argv + 1;
        while (!badarg && *args && *args[0] == '-') {
                if (!strcmp(*args,"-v2")) {
index b70777ea3a6ce747c260c7fa85fb34d4d4c64a1e..fc3e398cb4fdd352da3577475bc602e939050d2c 100644 (file)
@@ -337,7 +337,7 @@ bad:
                        }
                }
 
-       SSLeay_add_ssl_algorithms();
+       OpenSSL_add_ssl_algorithms();
        SSL_load_error_strings();
        ctx=SSL_CTX_new(meth);
        if (ctx == NULL)
index f723e559fd0706ac4d92815d8b3a80f8a55ac837..044d4c448d2c4396503e20275b8a60450b763893 100644 (file)
@@ -605,7 +605,7 @@ bad:
                }
 
        SSL_load_error_strings();
-       SSLeay_add_ssl_algorithms();
+       OpenSSL_add_ssl_algorithms();
 
        ctx=SSL_CTX_new(meth);
        if (ctx == NULL)
index 5c3c251631afeed863efeaef2ec58f5b11280835..4f42681febdaa0389c22b4cfe65f26ee6bd5a244 100644 (file)
@@ -416,7 +416,7 @@ int MAIN(int argc, char **argv)
        if( parseArgs( argc, argv ) < 0 )
                goto end;
 
-       SSLeay_add_ssl_algorithms();
+       OpenSSL_add_ssl_algorithms();
        if ((tm_ctx=SSL_CTX_new(s_time_meth)) == NULL) return(1);
 
        SSL_CTX_set_quiet_shutdown(tm_ctx,1);
index dda2586ed1d846c88b1502509961936a4506e7f2..e64902cb07bcff21b49202ab7ad892836e298c82 100644 (file)
@@ -35,7 +35,8 @@ LIBSRC= encode.c digest.c evp_enc.c evp_key.c \
        m_ripemd.c \
        p_open.c p_seal.c p_sign.c p_verify.c p_lib.c p_enc.c p_dec.c \
        bio_md.c bio_b64.c bio_enc.c evp_err.c e_null.c \
-       c_all.c evp_lib.c bio_ok.c evp_pkey.c evp_pbe.c p5_crpt.c p5_crpt2.c
+       c_all.c c_allc.c c_alld.c evp_lib.c bio_ok.c \
+       evp_pkey.c evp_pbe.c p5_crpt.c p5_crpt2.c
 
 LIBOBJ=        encode.o digest.o evp_enc.o evp_key.o \
        e_ecb_d.o e_cbc_d.o e_cfb_d.o e_ofb_d.o \
@@ -50,7 +51,8 @@ LIBOBJ=       encode.o digest.o evp_enc.o evp_key.o \
        m_ripemd.o \
        p_open.o p_seal.o p_sign.o p_verify.o p_lib.o p_enc.o p_dec.o \
        bio_md.o bio_b64.o bio_enc.o evp_err.o e_null.o \
-       c_all.o evp_lib.o bio_ok.o evp_pkey.o evp_pbe.o p5_crpt.o p5_crpt2.o
+       c_all.o c_allc.o c_alld.o evp_lib.o bio_ok.o \
+       evp_pkey.o evp_pbe.o p5_crpt.o p5_crpt2.o
 
 SRC= $(LIBSRC)
 
index a4d3b43fb9d45d47661a918f4d08f0e0fc0222cf..1e185830a35764ce601862bb4dd9406624c6a6bf 100644 (file)
 #include <stdio.h>
 #include "cryptlib.h"
 #include <openssl/evp.h>
-#include <openssl/pkcs12.h>
-#include <openssl/objects.h>
 
-void SSLeay_add_all_algorithms(void)
-       {
-       SSLeay_add_all_ciphers();
-       SSLeay_add_all_digests();
-       }
-
-void SSLeay_add_all_ciphers(void)
-       {
-#ifndef NO_DES
-       EVP_add_cipher(EVP_des_cfb());
-       EVP_add_cipher(EVP_des_ede_cfb());
-       EVP_add_cipher(EVP_des_ede3_cfb());
-
-       EVP_add_cipher(EVP_des_ofb());
-       EVP_add_cipher(EVP_des_ede_ofb());
-       EVP_add_cipher(EVP_des_ede3_ofb());
-
-       EVP_add_cipher(EVP_desx_cbc());
-       EVP_add_cipher_alias(SN_desx_cbc,"DESX");
-       EVP_add_cipher_alias(SN_desx_cbc,"desx");
-
-       EVP_add_cipher(EVP_des_cbc());
-       EVP_add_cipher_alias(SN_des_cbc,"DES");
-       EVP_add_cipher_alias(SN_des_cbc,"des");
-       EVP_add_cipher(EVP_des_ede_cbc());
-       EVP_add_cipher(EVP_des_ede3_cbc());
-       EVP_add_cipher_alias(SN_des_ede3_cbc,"DES3");
-       EVP_add_cipher_alias(SN_des_ede3_cbc,"des3");
-
-       EVP_add_cipher(EVP_des_ecb());
-       EVP_add_cipher(EVP_des_ede());
-       EVP_add_cipher(EVP_des_ede3());
-#endif
-
-#ifndef NO_RC4
-       EVP_add_cipher(EVP_rc4());
-       EVP_add_cipher(EVP_rc4_40());
-#endif
-
-#ifndef NO_IDEA
-       EVP_add_cipher(EVP_idea_ecb());
-       EVP_add_cipher(EVP_idea_cfb());
-       EVP_add_cipher(EVP_idea_ofb());
-       EVP_add_cipher(EVP_idea_cbc());
-       EVP_add_cipher_alias(SN_idea_cbc,"IDEA");
-       EVP_add_cipher_alias(SN_idea_cbc,"idea");
-#endif
-
-#ifndef NO_RC2
-       EVP_add_cipher(EVP_rc2_ecb());
-       EVP_add_cipher(EVP_rc2_cfb());
-       EVP_add_cipher(EVP_rc2_ofb());
-       EVP_add_cipher(EVP_rc2_cbc());
-       EVP_add_cipher(EVP_rc2_40_cbc());
-       EVP_add_cipher(EVP_rc2_64_cbc());
-       EVP_add_cipher_alias(SN_rc2_cbc,"RC2");
-       EVP_add_cipher_alias(SN_rc2_cbc,"rc2");
-#endif
-
-#ifndef NO_BF
-       EVP_add_cipher(EVP_bf_ecb());
-       EVP_add_cipher(EVP_bf_cfb());
-       EVP_add_cipher(EVP_bf_ofb());
-       EVP_add_cipher(EVP_bf_cbc());
-       EVP_add_cipher_alias(SN_bf_cbc,"BF");
-       EVP_add_cipher_alias(SN_bf_cbc,"bf");
-       EVP_add_cipher_alias(SN_bf_cbc,"blowfish");
-#endif
-
-#ifndef NO_CAST
-       EVP_add_cipher(EVP_cast5_ecb());
-       EVP_add_cipher(EVP_cast5_cfb());
-       EVP_add_cipher(EVP_cast5_ofb());
-       EVP_add_cipher(EVP_cast5_cbc());
-       EVP_add_cipher_alias(SN_cast5_cbc,"CAST");
-       EVP_add_cipher_alias(SN_cast5_cbc,"cast");
-       EVP_add_cipher_alias(SN_cast5_cbc,"CAST-cbc");
-       EVP_add_cipher_alias(SN_cast5_cbc,"cast-cbc");
-#endif
-
-#ifndef NO_RC5
-       EVP_add_cipher(EVP_rc5_32_12_16_ecb());
-       EVP_add_cipher(EVP_rc5_32_12_16_cfb());
-       EVP_add_cipher(EVP_rc5_32_12_16_ofb());
-       EVP_add_cipher(EVP_rc5_32_12_16_cbc());
-       EVP_add_cipher_alias(SN_rc5_cbc,"rc5");
-       EVP_add_cipher_alias(SN_rc5_cbc,"RC5");
-#endif
-       }
-
-
-void SSLeay_add_all_digests(void)
-       {
-#ifndef NO_MD2
-       EVP_add_digest(EVP_md2());
-#endif
-#ifndef NO_MD5
-       EVP_add_digest(EVP_md5());
-       EVP_add_digest_alias(SN_md5,"ssl2-md5");
-       EVP_add_digest_alias(SN_md5,"ssl3-md5");
-#endif
-#ifndef NO_SHA
-       EVP_add_digest(EVP_sha());
-#ifndef NO_DSA
-       EVP_add_digest(EVP_dss());
-#endif
-#endif
-#ifndef NO_SHA
-       EVP_add_digest(EVP_sha1());
-       EVP_add_digest_alias(SN_sha1,"ssl3-sha1");
-       EVP_add_digest_alias(SN_sha1WithRSAEncryption,SN_sha1WithRSA);
-#ifndef NO_DSA
-       EVP_add_digest(EVP_dss1());
-       EVP_add_digest_alias(SN_dsaWithSHA1,SN_dsaWithSHA1_2);
-       EVP_add_digest_alias(SN_dsaWithSHA1,"DSS1");
-       EVP_add_digest_alias(SN_dsaWithSHA1,"dss1");
-#endif
-#endif
-#if !defined(NO_MDC2) && !defined(NO_DES)
-       EVP_add_digest(EVP_mdc2());
-#endif
-#ifndef NO_RIPEMD
-       EVP_add_digest(EVP_ripemd160());
-       EVP_add_digest_alias(SN_ripemd160,"ripemd");
-       EVP_add_digest_alias(SN_ripemd160,"rmd160");
-#endif
-       PKCS12_PBE_add();
-       PKCS5_PBE_add();
-       }
+void OpenSSL_add_all_algorithms(void)
+{
+       OpenSSL_add_all_ciphers();
+       OpenSSL_add_all_digests();
+}
diff --git a/crypto/evp/c_allc.c b/crypto/evp/c_allc.c
new file mode 100644 (file)
index 0000000..22c02d2
--- /dev/null
@@ -0,0 +1,147 @@
+/* crypto/evp/c_all.c */
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@cryptsoft.com).
+ * The implementation was written so as to conform with Netscapes SSL.
+ * 
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to.  The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@cryptsoft.com).
+ * 
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *    "This product includes cryptographic software written by
+ *     Eric Young (eay@cryptsoft.com)"
+ *    The word 'cryptographic' can be left out if the rouines from the library
+ *    being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from 
+ *    the apps directory (application code) you must include an acknowledgement:
+ *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
+ * 
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * 
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed.  i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+
+#include <stdio.h>
+#include "cryptlib.h"
+#include <openssl/evp.h>
+#include <openssl/pkcs12.h>
+#include <openssl/objects.h>
+
+void OpenSSL_add_all_ciphers(void)
+       {
+#ifndef NO_DES
+       EVP_add_cipher(EVP_des_cfb());
+       EVP_add_cipher(EVP_des_ede_cfb());
+       EVP_add_cipher(EVP_des_ede3_cfb());
+
+       EVP_add_cipher(EVP_des_ofb());
+       EVP_add_cipher(EVP_des_ede_ofb());
+       EVP_add_cipher(EVP_des_ede3_ofb());
+
+       EVP_add_cipher(EVP_desx_cbc());
+       EVP_add_cipher_alias(SN_desx_cbc,"DESX");
+       EVP_add_cipher_alias(SN_desx_cbc,"desx");
+
+       EVP_add_cipher(EVP_des_cbc());
+       EVP_add_cipher_alias(SN_des_cbc,"DES");
+       EVP_add_cipher_alias(SN_des_cbc,"des");
+       EVP_add_cipher(EVP_des_ede_cbc());
+       EVP_add_cipher(EVP_des_ede3_cbc());
+       EVP_add_cipher_alias(SN_des_ede3_cbc,"DES3");
+       EVP_add_cipher_alias(SN_des_ede3_cbc,"des3");
+
+       EVP_add_cipher(EVP_des_ecb());
+       EVP_add_cipher(EVP_des_ede());
+       EVP_add_cipher(EVP_des_ede3());
+#endif
+
+#ifndef NO_RC4
+       EVP_add_cipher(EVP_rc4());
+       EVP_add_cipher(EVP_rc4_40());
+#endif
+
+#ifndef NO_IDEA
+       EVP_add_cipher(EVP_idea_ecb());
+       EVP_add_cipher(EVP_idea_cfb());
+       EVP_add_cipher(EVP_idea_ofb());
+       EVP_add_cipher(EVP_idea_cbc());
+       EVP_add_cipher_alias(SN_idea_cbc,"IDEA");
+       EVP_add_cipher_alias(SN_idea_cbc,"idea");
+#endif
+
+#ifndef NO_RC2
+       EVP_add_cipher(EVP_rc2_ecb());
+       EVP_add_cipher(EVP_rc2_cfb());
+       EVP_add_cipher(EVP_rc2_ofb());
+       EVP_add_cipher(EVP_rc2_cbc());
+       EVP_add_cipher(EVP_rc2_40_cbc());
+       EVP_add_cipher(EVP_rc2_64_cbc());
+       EVP_add_cipher_alias(SN_rc2_cbc,"RC2");
+       EVP_add_cipher_alias(SN_rc2_cbc,"rc2");
+#endif
+
+#ifndef NO_BF
+       EVP_add_cipher(EVP_bf_ecb());
+       EVP_add_cipher(EVP_bf_cfb());
+       EVP_add_cipher(EVP_bf_ofb());
+       EVP_add_cipher(EVP_bf_cbc());
+       EVP_add_cipher_alias(SN_bf_cbc,"BF");
+       EVP_add_cipher_alias(SN_bf_cbc,"bf");
+       EVP_add_cipher_alias(SN_bf_cbc,"blowfish");
+#endif
+
+#ifndef NO_CAST
+       EVP_add_cipher(EVP_cast5_ecb());
+       EVP_add_cipher(EVP_cast5_cfb());
+       EVP_add_cipher(EVP_cast5_ofb());
+       EVP_add_cipher(EVP_cast5_cbc());
+       EVP_add_cipher_alias(SN_cast5_cbc,"CAST");
+       EVP_add_cipher_alias(SN_cast5_cbc,"cast");
+       EVP_add_cipher_alias(SN_cast5_cbc,"CAST-cbc");
+       EVP_add_cipher_alias(SN_cast5_cbc,"cast-cbc");
+#endif
+
+#ifndef NO_RC5
+       EVP_add_cipher(EVP_rc5_32_12_16_ecb());
+       EVP_add_cipher(EVP_rc5_32_12_16_cfb());
+       EVP_add_cipher(EVP_rc5_32_12_16_ofb());
+       EVP_add_cipher(EVP_rc5_32_12_16_cbc());
+       EVP_add_cipher_alias(SN_rc5_cbc,"rc5");
+       EVP_add_cipher_alias(SN_rc5_cbc,"RC5");
+#endif
+       }
diff --git a/crypto/evp/c_alld.c b/crypto/evp/c_alld.c
new file mode 100644 (file)
index 0000000..6c72284
--- /dev/null
@@ -0,0 +1,102 @@
+/* crypto/evp/c_all.c */
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@cryptsoft.com).
+ * The implementation was written so as to conform with Netscapes SSL.
+ * 
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to.  The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@cryptsoft.com).
+ * 
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ * 
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *    "This product includes cryptographic software written by
+ *     Eric Young (eay@cryptsoft.com)"
+ *    The word 'cryptographic' can be left out if the rouines from the library
+ *    being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from 
+ *    the apps directory (application code) you must include an acknowledgement:
+ *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
+ * 
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * 
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed.  i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+
+#include <stdio.h>
+#include "cryptlib.h"
+#include <openssl/evp.h>
+#include <openssl/pkcs12.h>
+#include <openssl/objects.h>
+
+void OpenSSL_add_all_digests(void)
+       {
+#ifndef NO_MD2
+       EVP_add_digest(EVP_md2());
+#endif
+#ifndef NO_MD5
+       EVP_add_digest(EVP_md5());
+       EVP_add_digest_alias(SN_md5,"ssl2-md5");
+       EVP_add_digest_alias(SN_md5,"ssl3-md5");
+#endif
+#ifndef NO_SHA
+       EVP_add_digest(EVP_sha());
+#ifndef NO_DSA
+       EVP_add_digest(EVP_dss());
+#endif
+#endif
+#ifndef NO_SHA
+       EVP_add_digest(EVP_sha1());
+       EVP_add_digest_alias(SN_sha1,"ssl3-sha1");
+       EVP_add_digest_alias(SN_sha1WithRSAEncryption,SN_sha1WithRSA);
+#ifndef NO_DSA
+       EVP_add_digest(EVP_dss1());
+       EVP_add_digest_alias(SN_dsaWithSHA1,SN_dsaWithSHA1_2);
+       EVP_add_digest_alias(SN_dsaWithSHA1,"DSS1");
+       EVP_add_digest_alias(SN_dsaWithSHA1,"dss1");
+#endif
+#endif
+#if !defined(NO_MDC2) && !defined(NO_DES)
+       EVP_add_digest(EVP_mdc2());
+#endif
+#ifndef NO_RIPEMD
+       EVP_add_digest(EVP_ripemd160());
+       EVP_add_digest_alias(SN_ripemd160,"ripemd");
+       EVP_add_digest_alias(SN_ripemd160,"rmd160");
+#endif
+       PKCS12_PBE_add();
+       PKCS5_PBE_add();
+       }
index 47323de16a3eb1c3e2ba64520e4f43b36bb3007f..bc99e8757841f41e1891fc3b94ae221ee17f38ae 100644 (file)
@@ -593,9 +593,12 @@ EVP_CIPHER *EVP_rc5_32_12_16_ecb(void);
 EVP_CIPHER *EVP_rc5_32_12_16_cfb(void);
 EVP_CIPHER *EVP_rc5_32_12_16_ofb(void);
 
-void SSLeay_add_all_algorithms(void);
-void SSLeay_add_all_ciphers(void);
-void SSLeay_add_all_digests(void);
+void OpenSSL_add_all_algorithms(void);
+void OpenSSL_add_all_ciphers(void);
+void OpenSSL_add_all_digests(void);
+#define SSLeay_add_all_algorithms() OpenSSL_add_all_algorithms()
+#define SSLeay_add_all_ciphers() OpenSSL_add_all_ciphers()
+#define SSLeay_add_all_digests() OpenSSL_add_all_digests()
 
 int EVP_add_cipher(EVP_CIPHER *cipher);
 int EVP_add_digest(EVP_MD *digest);
index accd5811f134a78db899205bbd36643a0eadab55..6752ec568a91ecc2a435685d84e562635271a984 100644 (file)
@@ -86,7 +86,7 @@ char *argv[];
        int i,printit=0;
        STACK_OF(PKCS7_SIGNER_INFO) *sk;
 
-       SSLeay_add_all_algorithms();
+       OpenSSL_add_all_algorithms();
        bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
 
        data=BIO_new(BIO_s_file());
index 31845fc5e4e7aded789ad4e33bb0d1ecd5c085b2..2b56c2eff33356bfbcb26a6296525aaae48c64ad 100644 (file)
@@ -77,7 +77,7 @@ char *argv[];
        const EVP_CIPHER *cipher=NULL;
        STACK_OF(X509) *recips=NULL;
 
-       SSLeay_add_all_algorithms();
+       OpenSSL_add_all_algorithms();
 
        data=BIO_new(BIO_s_file());
        while(argc > 1)
index 142623eddab6b225be8ccba09ea3bc5e32104a44..3e4d231f25975bc7da160ea5927aa69c5b000ff2 100644 (file)
@@ -244,7 +244,7 @@ bad:
        if (cipher == NULL) cipher=getenv("SSL_CIPHER");
 
        SSL_load_error_strings();
-       SSLeay_add_ssl_algorithms();
+       OpenSSL_add_ssl_algorithms();
 
        c_ctx=SSL_CTX_new(ssl_method);
        s_ctx=SSL_CTX_new(ssl_method);
index 2f2dc985fe78548ad8fa2ed61c98c9c3fc862fdf..933d6699ee344940c68cdbc6fa6cc39dc14efac4 100644 (file)
@@ -46,7 +46,7 @@ char *argv[];
        SSL_load_error_strings();
 
        /* Add ciphers and message digests */
-       SSLeay_add_ssl_algorithms();
+       OpenSSL_add_ssl_algorithms();
 
        ctx=SSL_CTX_new(SSLv23_server_method());
        if (!SSL_CTX_use_certificate_file(ctx,CERT_FILE,SSL_FILETYPE_PEM))
index 59fab1985e451c814966a8cb77ccde86cbc034b6..87b380b258cb8f5b0c3574ec5aa07ac37a3fde0b 100644 (file)
@@ -36,7 +36,7 @@ char *argv[];
        SSL_load_error_strings();
 
        /* Setup all the global SSL stuff */
-       SSLeay_add_ssl_algorithms();
+       OpenSSL_add_ssl_algorithms();
        ssl_ctx=SSL_CTX_new(SSLv23_client_method());
 
        /* Lets make a SSL structure */
index b2f332602dac1efd21c3340edacac457ee0e1cdb..8b3777d89d386c6a12d27b3c9ec7234c4fde2819 100644 (file)
@@ -248,7 +248,7 @@ bad:
        if (cipher == NULL) cipher=getenv("SSL_CIPHER");
 
        SSL_load_error_strings();
-       SSLeay_add_ssl_algorithms();
+       OpenSSL_add_ssl_algorithms();
 
        c_ctx=SSL_CTX_new(ssl_method);
        s_ctx=SSL_CTX_new(ssl_method);
index 712ec3a6dc4334221bc1f9902d0972625ddfd614..261dcf8a48f06f40c1b66018d48dfb548f7fd862 100644 (file)
--- a/ssl/ssl.h
+++ b/ssl/ssl.h
@@ -728,6 +728,7 @@ size_t SSL_get_peer_finished(SSL *s, void *buf, size_t count);
 #define SSL_VERIFY_FAIL_IF_NO_PEER_CERT        0x02
 #define SSL_VERIFY_CLIENT_ONCE         0x04
 
+#define OpenSSL_add_ssl_algorithms()   SSL_library_init()
 #define SSLeay_add_ssl_algorithms()    SSL_library_init()
 
 /* this is for backward compatibility */
index 321e35c83ba62d0d8b6a0897014a6b76a4e38993..cac701a798b40160e6c576579ee40bbc5e781882 100644 (file)
@@ -226,7 +226,7 @@ int main ( int argc, char **argv )
        printf("cipher list: %s\n", cipher ? cipher : "{undefined}" );
 
        SSL_load_error_strings();
-       SSLeay_add_all_algorithms();
+       OpenSSL_add_all_algorithms();
 
 /* DRM, this was the original, but there is no such thing as SSLv2()
        s_ctx=SSL_CTX_new(SSLv2());
index 9c688eff5c524f5c284d15a5f4f0e43c6510a52b..6e8777d48b6a1aad41cdbe175f47d6f5720e174f 100755 (executable)
@@ -499,9 +499,9 @@ SHA1_Update                         504
 SHA_Final                              505
 SHA_Init                               506
 SHA_Update                             507
-SSLeay_add_all_algorithms              508
-SSLeay_add_all_ciphers                 509
-SSLeay_add_all_digests                 510
+OpenSSL_add_all_algorithms             508
+OpenSSL_add_all_ciphers                        509
+OpenSSL_add_all_digests                        510
 TXT_DB_create_index                    511
 TXT_DB_free                            512
 TXT_DB_get_by_index                    513