Avoid including cryptlib.h, it's not really needed.
authorRichard Levitte <levitte@openssl.org>
Sat, 27 Dec 2003 16:09:59 +0000 (16:09 +0000)
committerRichard Levitte <levitte@openssl.org>
Sat, 27 Dec 2003 16:09:59 +0000 (16:09 +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 1d24dedc918b261552f0b9376079dbd124fa2c43..43b32eb4159f1a3252bcea178a0deccc7544750a 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 d3b144f1c52cbd6a11b24684ce5f0b93ff5afd3f..21a06f76cb07acdec6f98d6dd370c666b6b841cd 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 910b9fe097d457fb9fdd7b793bf76f76bd4c3aff..edcef4dda2915027783fb98ff3ccc8eb1cb3edd2 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 91bc095fe73a356a9dbea3dcc427fc13cf74a439..26ce0cb9639d064a0d4b9f75ad52144423580e70 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 896b12fc4f38fcd6afee2f092b18f43bd4ce0267..d04096016ce31a1ac7d17f8e92df039b2994ba8c 100644 (file)
@@ -271,6 +271,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={
        SSL_ALL_STRENGTHS,
        },
 /* Cipher 07 */
+#ifndef OPENSSL_NO_IDEA
        {
        1,
        SSL3_TXT_RSA_IDEA_128_SHA,
@@ -283,6 +284,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={
        SSL_ALL_CIPHERS,
        SSL_ALL_STRENGTHS,
        },
+#endif
 /* Cipher 08 */
        {
        1,
index 881f68b998912af2c90086ff2ddd140d9a33224c..57f1d3f52a89fd49391d8b9c8e490b53dd2c2685 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 16bc11b559b151e5640937ac9b8da26b8bb0fd9b..d8ff8fc4a3dc655d71880335c1945653211c5366 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 8fc0d3e1b885cb43ef4d8b659005d0cab1b7519c..44c503eb048ea65744165ea301114af40cf563be 100644 (file)
@@ -125,7 +125,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},
@@ -166,8 +168,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]=
@@ -906,7 +912,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
 char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int len)
        {
        int is_export,pkl,kl;
-       char *ver,*exp;
+       char *ver,*exp_str;
        char *kx,*au,*enc,*mac;
        unsigned long alg,alg2,alg_s;
 #ifdef KSSL_DEBUG
@@ -922,7 +928,7 @@ char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int len)
        is_export=SSL_C_IS_EXPORT(cipher);
        pkl=SSL_C_EXPORT_PKEYLENGTH(cipher);
        kl=SSL_C_EXPORT_KEYLENGTH(cipher);
-       exp=is_export?" export":"";
+       exp_str=is_export?" export":"";
 
        if (alg & SSL_SSLV2)
                ver="SSLv2";
@@ -1041,9 +1047,9 @@ char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int len)
                return("Buffer too small");
 
 #ifdef KSSL_DEBUG
-       BIO_snprintf(buf,len,format,cipher->name,ver,kx,au,enc,mac,exp,alg);
+       BIO_snprintf(buf,len,format,cipher->name,ver,kx,au,enc,mac,exp_str,alg);
 #else
-       BIO_snprintf(buf,len,format,cipher->name,ver,kx,au,enc,mac,exp);
+       BIO_snprintf(buf,len,format,cipher->name,ver,kx,au,enc,mac,exp_str);
 #endif /* KSSL_DEBUG */
        return(buf);
        }
index 6d698906884a1226d3126db58b5f24db6c2d98ee..ee9a82d5860d7fce5baa18bb64a8e7cade1c093d 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 fabcdefa6ed6a1cfc926856ecf6396ac46188ae9..7016c87d3b2d4dcf10cecb26bf0f9851a98f9276 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 28095148e740c5694a03264d008b20ccab4079cf..7e76c2381abcbf6705772287fbcb3a7498487951 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 #include <time.h>
+#include <inttypes.h>
 
 #define USE_SOCKETS
 #include "e_os.h"
@@ -1508,7 +1509,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)