From: Dr. Stephen Henson Date: Fri, 4 Feb 2000 14:01:38 +0000 (+0000) Subject: Rename SSLeay_add_all_algorithms() et al to X-Git-Tag: OpenSSL_0_9_5beta1~116 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=af57d843124672a9053a4da60ad7f9b6d4324a5a;p=oweals%2Fopenssl.git Rename SSLeay_add_all_algorithms() et al to OpenSSL_add_all_algorithms(). Move these into separate files so they work properly. --- diff --git a/CHANGES b/CHANGES index d49e01bdb4..eab6eca939 100644 --- 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] diff --git a/apps/ciphers.c b/apps/ciphers.c index f473f4c3dc..4baa0c3c8e 100644 --- a/apps/ciphers.c +++ b/apps/ciphers.c @@ -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; diff --git a/apps/pkcs8.c b/apps/pkcs8.c index a958333517..ccd7b44d1c 100644 --- a/apps/pkcs8.c +++ b/apps/pkcs8.c @@ -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")) { diff --git a/apps/s_client.c b/apps/s_client.c index b70777ea3a..fc3e398cb4 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -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) diff --git a/apps/s_server.c b/apps/s_server.c index f723e559fd..044d4c448d 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -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) diff --git a/apps/s_time.c b/apps/s_time.c index 5c3c251631..4f42681feb 100644 --- a/apps/s_time.c +++ b/apps/s_time.c @@ -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); diff --git a/crypto/evp/Makefile.ssl b/crypto/evp/Makefile.ssl index dda2586ed1..e64902cb07 100644 --- a/crypto/evp/Makefile.ssl +++ b/crypto/evp/Makefile.ssl @@ -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) diff --git a/crypto/evp/c_all.c b/crypto/evp/c_all.c index a4d3b43fb9..1e185830a3 100644 --- a/crypto/evp/c_all.c +++ b/crypto/evp/c_all.c @@ -59,135 +59,9 @@ #include #include "cryptlib.h" #include -#include -#include -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 index 0000000000..22c02d2bba --- /dev/null +++ b/crypto/evp/c_allc.c @@ -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 +#include "cryptlib.h" +#include +#include +#include + +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 index 0000000000..6c722847ea --- /dev/null +++ b/crypto/evp/c_alld.c @@ -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 +#include "cryptlib.h" +#include +#include +#include + +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(); + } diff --git a/crypto/evp/evp.h b/crypto/evp/evp.h index 47323de16a..bc99e87578 100644 --- a/crypto/evp/evp.h +++ b/crypto/evp/evp.h @@ -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); diff --git a/crypto/pkcs7/dec.c b/crypto/pkcs7/dec.c index accd5811f1..6752ec568a 100644 --- a/crypto/pkcs7/dec.c +++ b/crypto/pkcs7/dec.c @@ -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()); diff --git a/crypto/pkcs7/enc.c b/crypto/pkcs7/enc.c index 31845fc5e4..2b56c2eff3 100644 --- a/crypto/pkcs7/enc.c +++ b/crypto/pkcs7/enc.c @@ -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) diff --git a/crypto/threads/mttest.c b/crypto/threads/mttest.c index 142623edda..3e4d231f25 100644 --- a/crypto/threads/mttest.c +++ b/crypto/threads/mttest.c @@ -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); diff --git a/demos/bio/saccept.c b/demos/bio/saccept.c index 2f2dc985fe..933d6699ee 100644 --- a/demos/bio/saccept.c +++ b/demos/bio/saccept.c @@ -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)) diff --git a/demos/bio/sconnect.c b/demos/bio/sconnect.c index 59fab1985e..87b380b258 100644 --- a/demos/bio/sconnect.c +++ b/demos/bio/sconnect.c @@ -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 */ diff --git a/mt/mttest.c b/mt/mttest.c index b2f332602d..8b3777d89d 100644 --- a/mt/mttest.c +++ b/mt/mttest.c @@ -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); diff --git a/ssl/ssl.h b/ssl/ssl.h index 712ec3a6dc..261dcf8a48 100644 --- 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 */ diff --git a/ssl/ssl_task.c b/ssl/ssl_task.c index 321e35c83b..cac701a798 100644 --- a/ssl/ssl_task.c +++ b/ssl/ssl_task.c @@ -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()); diff --git a/util/libeay.num b/util/libeay.num index 9c688eff5c..6e8777d48b 100755 --- a/util/libeay.num +++ b/util/libeay.num @@ -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