diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/ssl_algs.c | 49 |
1 files changed, 29 insertions, 20 deletions
diff --git a/src/lib/libssl/ssl_algs.c b/src/lib/libssl/ssl_algs.c index 65f3a59386..3d1299ee7b 100644 --- a/src/lib/libssl/ssl_algs.c +++ b/src/lib/libssl/ssl_algs.c | |||
| @@ -57,46 +57,55 @@ | |||
| 57 | */ | 57 | */ |
| 58 | 58 | ||
| 59 | #include <stdio.h> | 59 | #include <stdio.h> |
| 60 | #include "objects.h" | 60 | #include <openssl/objects.h> |
| 61 | #include "lhash.h" | 61 | #include <openssl/lhash.h> |
| 62 | #include "ssl_locl.h" | 62 | #include "ssl_locl.h" |
| 63 | 63 | ||
| 64 | void SSLeay_add_ssl_algorithms() | 64 | int SSL_library_init(void) |
| 65 | { | 65 | { |
| 66 | #ifndef NO_DES | 66 | |
| 67 | #ifndef OPENSSL_NO_DES | ||
| 67 | EVP_add_cipher(EVP_des_cbc()); | 68 | EVP_add_cipher(EVP_des_cbc()); |
| 68 | EVP_add_cipher(EVP_des_ede3_cbc()); | 69 | EVP_add_cipher(EVP_des_ede3_cbc()); |
| 69 | #endif | 70 | #endif |
| 70 | #ifndef NO_IDEA | 71 | #ifndef OPENSSL_NO_IDEA |
| 71 | EVP_add_cipher(EVP_idea_cbc()); | 72 | EVP_add_cipher(EVP_idea_cbc()); |
| 72 | #endif | 73 | #endif |
| 73 | #ifndef NO_RC4 | 74 | #ifndef OPENSSL_NO_RC4 |
| 74 | EVP_add_cipher(EVP_rc4()); | 75 | EVP_add_cipher(EVP_rc4()); |
| 75 | #endif | ||
| 76 | #ifndef NO_RC2 | ||
| 77 | EVP_add_cipher(EVP_rc2_cbc()); | ||
| 78 | #endif | 76 | #endif |
| 79 | 77 | #ifndef OPENSSL_NO_RC2 | |
| 80 | #ifndef NO_MD2 | 78 | EVP_add_cipher(EVP_rc2_cbc()); |
| 81 | EVP_add_digest(EVP_md2()); | ||
| 82 | #endif | 79 | #endif |
| 83 | #ifndef NO_MD5 | 80 | #ifndef OPENSSL_NO_AES |
| 81 | EVP_add_cipher(EVP_aes_128_cbc()); | ||
| 82 | EVP_add_cipher(EVP_aes_192_cbc()); | ||
| 83 | EVP_add_cipher(EVP_aes_256_cbc()); | ||
| 84 | #endif | ||
| 85 | #ifndef OPENSSL_NO_MD2 | ||
| 86 | EVP_add_digest(EVP_md2()); | ||
| 87 | #endif | ||
| 88 | #ifndef OPENSSL_NO_MD5 | ||
| 84 | EVP_add_digest(EVP_md5()); | 89 | EVP_add_digest(EVP_md5()); |
| 85 | EVP_add_alias(SN_md5,"ssl2-md5"); | 90 | EVP_add_digest_alias(SN_md5,"ssl2-md5"); |
| 86 | EVP_add_alias(SN_md5,"ssl3-md5"); | 91 | EVP_add_digest_alias(SN_md5,"ssl3-md5"); |
| 87 | #endif | 92 | #endif |
| 88 | #ifndef NO_SHA1 | 93 | #ifndef OPENSSL_NO_SHA |
| 89 | EVP_add_digest(EVP_sha1()); /* RSA with sha1 */ | 94 | EVP_add_digest(EVP_sha1()); /* RSA with sha1 */ |
| 90 | EVP_add_alias(SN_sha1,"ssl3-sha1"); | 95 | EVP_add_digest_alias(SN_sha1,"ssl3-sha1"); |
| 96 | EVP_add_digest_alias(SN_sha1WithRSAEncryption,SN_sha1WithRSA); | ||
| 91 | #endif | 97 | #endif |
| 92 | #if !defined(NO_SHA1) && !defined(NO_DSA) | 98 | #if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_DSA) |
| 93 | EVP_add_digest(EVP_dss1()); /* DSA with sha1 */ | 99 | EVP_add_digest(EVP_dss1()); /* DSA with sha1 */ |
| 100 | EVP_add_digest_alias(SN_dsaWithSHA1,SN_dsaWithSHA1_2); | ||
| 101 | EVP_add_digest_alias(SN_dsaWithSHA1,"DSS1"); | ||
| 102 | EVP_add_digest_alias(SN_dsaWithSHA1,"dss1"); | ||
| 94 | #endif | 103 | #endif |
| 95 | |||
| 96 | /* If you want support for phased out ciphers, add the following */ | 104 | /* If you want support for phased out ciphers, add the following */ |
| 97 | #if 0 | 105 | #if 0 |
| 98 | EVP_add_digest(EVP_sha()); | 106 | EVP_add_digest(EVP_sha()); |
| 99 | EVP_add_digest(EVP_dss()); | 107 | EVP_add_digest(EVP_dss()); |
| 100 | #endif | 108 | #endif |
| 109 | return(1); | ||
| 101 | } | 110 | } |
| 102 | 111 | ||
