/* crypto/evp/c_all.c */
-/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
* This package is an SSL implementation written
#include <stdio.h>
#include "cryptlib.h"
-#include "evp.h"
-#include "objects.h"
-
-void SSLeay_add_all_algorithms()
- {
- SSLeay_add_all_ciphers();
- SSLeay_add_all_digests();
- }
-
-void SSLeay_add_all_ciphers()
- {
-#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_alias(SN_desx_cbc,"DESX");
- EVP_add_alias(SN_desx_cbc,"desx");
-
- EVP_add_cipher(EVP_des_cbc());
- EVP_add_alias(SN_des_cbc,"DES");
- EVP_add_alias(SN_des_cbc,"des");
- EVP_add_cipher(EVP_des_ede_cbc());
- EVP_add_cipher(EVP_des_ede3_cbc());
- EVP_add_alias(SN_des_ede3_cbc,"DES3");
- EVP_add_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());
-#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_alias(SN_idea_cbc,"IDEA");
- EVP_add_alias(SN_idea_cbc,"idea");
+#include <openssl/evp.h>
+#ifndef OPENSSL_NO_ENGINE
+#include <openssl/engine.h>
#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_alias(SN_rc2_cbc,"RC2");
- EVP_add_alias(SN_rc2_cbc,"rc2");
-#endif
+#if 0
+#undef OpenSSL_add_all_algorithms
-#ifndef NO_BLOWFISH
- 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_alias(SN_bf_cbc,"BF");
- EVP_add_alias(SN_bf_cbc,"bf");
- EVP_add_alias(SN_bf_cbc,"blowfish");
-#endif
+void OpenSSL_add_all_algorithms(void)
+ {
+ OPENSSL_add_all_algorithms_noconf();
}
+#endif
-
-void SSLeay_add_all_digests()
+void OPENSSL_add_all_algorithms_noconf(void)
{
-#ifndef NO_MD2
- EVP_add_digest(EVP_md2());
-#endif
-#ifndef NO_MD2
- EVP_add_digest(EVP_md5());
-#endif
-#ifndef NO_SHA
- EVP_add_digest(EVP_sha());
-#ifndef NO_DSA
- EVP_add_digest(EVP_dss());
-#endif
-#endif
-#ifndef NO_SHA1
- EVP_add_digest(EVP_sha1());
-#ifndef NO_DSA
- EVP_add_digest(EVP_dss1());
-#endif
-#endif
-#if !defined(NO_MDC2) && !defined(NO_DES)
- EVP_add_digest(EVP_mdc2());
+ /*
+ * For the moment OPENSSL_cpuid_setup does something
+ * only on IA-32, but we reserve the option for all
+ * platforms...
+ */
+ OPENSSL_cpuid_setup();
+ OpenSSL_add_all_ciphers();
+ OpenSSL_add_all_digests();
+#ifndef OPENSSL_NO_ENGINE
+# if defined(__OpenBSD__) || defined(__FreeBSD__)
+ ENGINE_setup_bsd_cryptodev();
+# endif
#endif
}