Avoid including cryptlib.h, it's not really needed.
authorRichard Levitte <levitte@openssl.org>
Sat, 27 Dec 2003 16:10:30 +0000 (16:10 +0000)
committerRichard Levitte <levitte@openssl.org>
Sat, 27 Dec 2003 16:10:30 +0000 (16:10 +0000)
Check if IDEA is being built or not.
This is part of a large change submitted by Markus Friedl <markus@openbsd.org>

13 files changed:
ssl/s2_clnt.c
ssl/s2_enc.c
ssl/s2_lib.c
ssl/s2_pkt.c
ssl/s2_srvr.c
ssl/s3_clnt.c
ssl/s3_lib.c
ssl/s3_srvr.c
ssl/ssl_asn1.c
ssl/ssl_ciph.c
ssl/ssl_lib.c
ssl/ssl_sess.c
ssl/ssltest.c

index 62e83afb3534c20f55e368307db444cdbcc45441..da88460259fb20d9d2c11bc62132cf9d3a7873f0 100644 (file)
 #include <openssl/buffer.h>
 #include <openssl/objects.h>
 #include <openssl/evp.h>
-#include "cryptlib.h"
 
 static SSL_METHOD *ssl2_get_client_method(int ver);
 static int get_server_finished(SSL *s);
index 12e17bf66880939e639b335e19d0514603963ae4..18882bf70487f56bf73abff5b6b3a36ccaf849b4 100644 (file)
@@ -59,7 +59,6 @@
 #include "ssl_locl.h"
 #ifndef OPENSSL_NO_SSL2
 #include <stdio.h>
-#include "cryptlib.h"
 
 int ssl2_enc_init(SSL *s, int client)
        {
index a0edfb89602eebb6ffa3843fac51253da4acd79a..4a86ac2dd6a7152baf70240080685378d1cfe44d 100644 (file)
@@ -63,7 +63,6 @@
 #include <openssl/objects.h>
 #include <openssl/evp.h>
 #include <openssl/md5.h>
-#include "cryptlib.h"
 
 static long ssl2_default_timeout(void );
 const char *ssl2_version_str="SSLv2" OPENSSL_VERSION_PTEXT;
@@ -139,6 +138,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl2_ciphers[]={
        SSL_ALL_STRENGTHS,
        },
 /* IDEA_128_CBC_WITH_MD5 */
+#ifndef OPENSSL_NO_IDEA
        {
        1,
        SSL2_TXT_IDEA_128_CBC_WITH_MD5,
@@ -151,6 +151,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl2_ciphers[]={
        SSL_ALL_CIPHERS,
        SSL_ALL_STRENGTHS,
        },
+#endif
 /* DES_64_CBC_WITH_MD5 */
        {
        1,
index d82f1376135eef80810cb989da6e01d89b578a7a..a10929a757f9f865021b983766a472d6c59011b7 100644 (file)
 #ifndef OPENSSL_NO_SSL2
 #include <stdio.h>
 #include <errno.h>
-#include "cryptlib.h"
 #define USE_SOCKETS
 
 static int read_n(SSL *s,unsigned int n,unsigned int max,unsigned int extend);
index 62859a2d950e2b7c2dccc67d3f1d786c714cc4ff..5da2a54af37f40f1041b2df8de34020428081305 100644 (file)
 #include <openssl/rand.h>
 #include <openssl/objects.h>
 #include <openssl/evp.h>
-#include "cryptlib.h"
 
 static SSL_METHOD *ssl2_get_server_method(int ver);
 static int get_client_master_key(SSL *s);
index 96631db23042e1476549c6fe11ed438f4606876a..cd70bb1fb9e034395b01157428679851287621cf 100644 (file)
 #include <openssl/objects.h>
 #include <openssl/evp.h>
 #include <openssl/md5.h>
-#include "cryptlib.h"
 
 static SSL_METHOD *ssl3_get_client_method(int ver);
 static int ssl3_client_hello(SSL *s);
index 6c208ccfc1c3687703cfe1ed294d773f62811bca..1ff9e3093ba86aba6ecaeb4419f11d438ac8da40 100644 (file)
@@ -284,6 +284,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={
        SSL_ALL_STRENGTHS,
        },
 /* Cipher 07 */
+#ifndef OPENSSL_NO_IDEA
        {
        1,
        SSL3_TXT_RSA_IDEA_128_SHA,
@@ -296,6 +297,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={
        SSL_ALL_CIPHERS,
        SSL_ALL_STRENGTHS,
        },
+#endif
 /* Cipher 08 */
        {
        1,
index abb03ca585fa2f1312c32d851af9199648a2af3c..c426cd444b54de274bd48618b9236100ebe00f51 100644 (file)
 #include <openssl/objects.h>
 #include <openssl/evp.h>
 #include <openssl/x509.h>
+#ifndef OPENSSL_NO_KRB5
 #include <openssl/krb5_asn.h>
+#endif
 #include <openssl/md5.h>
-#include "cryptlib.h"
 
 static SSL_METHOD *ssl3_get_server_method(int ver);
 static int ssl3_get_client_hello(SSL *s);
index f5d3c135bbb5ffc2453e222f819b1a1d377f3743..9edc447b298a63fd47a671f33316daf5879e1a56 100644 (file)
@@ -62,7 +62,6 @@
 #include <openssl/asn1_mac.h>
 #include <openssl/objects.h>
 #include <openssl/x509.h>
-#include "cryptlib.h"
 
 typedef struct ssl_session_asn1_st
        {
index 4d0a646615f0a3aa2a35ca76cbfa4f96be6b724e..c31927706a52ac6f9a2135fc2c8dfecdea266e1c 100644 (file)
@@ -135,7 +135,9 @@ static const SSL_CIPHER cipher_aliases[]={
        {0,SSL_TXT_3DES,0,SSL_3DES,  0,0,0,0,SSL_ENC_MASK,0},
        {0,SSL_TXT_RC4, 0,SSL_RC4,   0,0,0,0,SSL_ENC_MASK,0},
        {0,SSL_TXT_RC2, 0,SSL_RC2,   0,0,0,0,SSL_ENC_MASK,0},
+#ifndef OPENSSL_NO_IDEA
        {0,SSL_TXT_IDEA,0,SSL_IDEA,  0,0,0,0,SSL_ENC_MASK,0},
+#endif
        {0,SSL_TXT_eNULL,0,SSL_eNULL,0,0,0,0,SSL_ENC_MASK,0},
        {0,SSL_TXT_eFZA,0,SSL_eFZA,  0,0,0,0,SSL_ENC_MASK,0},
        {0,SSL_TXT_AES, 0,SSL_AES,   0,0,0,0,SSL_ENC_MASK,0},
@@ -176,8 +178,12 @@ static void load_ciphers(void)
                EVP_get_cipherbyname(SN_rc4);
        ssl_cipher_methods[SSL_ENC_RC2_IDX]= 
                EVP_get_cipherbyname(SN_rc2_cbc);
+#ifndef OPENSSL_NO_IDEA
        ssl_cipher_methods[SSL_ENC_IDEA_IDX]= 
                EVP_get_cipherbyname(SN_idea_cbc);
+#else
+       ssl_cipher_methods[SSL_ENC_IDEA_IDX]= NULL;
+#endif
        ssl_cipher_methods[SSL_ENC_AES128_IDX]=
          EVP_get_cipherbyname(SN_aes_128_cbc);
        ssl_cipher_methods[SSL_ENC_AES256_IDX]=
index bf7d7ba561100d1ed9bbb8d83d9a674401206457..b7b2e4086a250fc65da73476600035d14c92e6a0 100644 (file)
 #include <openssl/objects.h>
 #include <openssl/lhash.h>
 #include <openssl/x509v3.h>
-#include "cryptlib.h"
 
 const char *SSL_version_str=OPENSSL_VERSION_TEXT;
 
index 5cf79d274a289ae807f56e0cbd390205bf95190c..85581d43ca40ba11fb75aac1ffb7abb23f0258e9 100644 (file)
@@ -60,7 +60,6 @@
 #include <openssl/lhash.h>
 #include <openssl/rand.h>
 #include "ssl_locl.h"
-#include "cryptlib.h"
 
 static void SSL_SESSION_list_remove(SSL_CTX *ctx, SSL_SESSION *s);
 static void SSL_SESSION_list_add(SSL_CTX *ctx,SSL_SESSION *s);
index 68eb6545725e25e576fe1761684c432242585621..63641df6c3d20113bf9a5c21079143c4e7323173 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 #include <time.h>
+#include <inttypes.h>
 
 #define USE_SOCKETS
 #include "e_os.h"
@@ -1593,7 +1594,7 @@ static int MS_CALLBACK app_verify_callback(X509_STORE_CTX *ctx, void *arg)
        fprintf(stderr, "In app_verify_callback, allowing cert. ");
        fprintf(stderr, "Arg is: %s\n", (char *)arg);
        fprintf(stderr, "Finished printing do we have a context? 0x%x a cert? 0x%x\n",
-                       (unsigned int)ctx, (unsigned int)ctx->cert);
+                       (uintptr_t)ctx, (uintptr_t)ctx->cert);
        if (ctx->cert)
                s=X509_NAME_oneline(X509_get_subject_name(ctx->cert),buf,256);
        if (s != NULL)