Various changes to make this stuff compile under Win32 and VC++ with and
authorDr. Stephen Henson <steve@openssl.org>
Mon, 22 Feb 1999 01:26:40 +0000 (01:26 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Mon, 22 Feb 1999 01:26:40 +0000 (01:26 +0000)
without -debug option to mk1mf.pl. Change _export to is_export (_export is
a reserved word under VC++). Add yucky function prototype function pointer
casts. Sanitise the included files in crypto/x509v3.

Also changed ssleay.exe target to openssl.exe

23 files changed:
crypto/rsa/rsa_oaep_test.c
crypto/x509v3/v3_akey.c
crypto/x509v3/v3_alt.c
crypto/x509v3/v3_bcons.c
crypto/x509v3/v3_bitst.c
crypto/x509v3/v3_conf.c
crypto/x509v3/v3_enum.c
crypto/x509v3/v3_extku.c
crypto/x509v3/v3_genn.c
crypto/x509v3/v3_ia5.c
crypto/x509v3/v3_int.c
crypto/x509v3/v3_lib.c
crypto/x509v3/v3_pku.c
crypto/x509v3/v3_prn.c
crypto/x509v3/v3_skey.c
crypto/x509v3/v3_utl.c
crypto/x509v3/v3conf.c
crypto/x509v3/v3prin.c
crypto/x509v3/x509v3.h
ssl/s3_lib.c
ssl/ssl_ciph.c
util/libeay.num
util/mk1mf.pl

index 2e4384584d630e8cf94e0b2cc936075825cfb64e..681b5a7380235b6a83071c1699a52b378dc78d20 100644 (file)
@@ -1,7 +1,8 @@
 /* test vectors from p1ovect1.txt */
 
 #include <stdio.h>
-#include <rsa.h>
+#include "e_os.h"
+#include "rsa.h"
 
 #define SetKey \
   key->n = BN_bin2bn(n, sizeof(n)-1, key->n); \
index bef9b77943199c9f39eb92685e8d0a9adffae1f7..ab488f936d9ff416b34adb0d3ffbf09f2ca34886 100644 (file)
  */
 
 #include <stdio.h>
-#include <stdlib.h>
-#include <pem.h>
-#include <asn1_mac.h>
-#include <err.h>
-#include <objects.h>
-#include <conf.h>
+#include "cryptlib.h"
+#include "conf.h"
+#include "asn1.h"
+#include "asn1_mac.h"
 #include "x509v3.h"
 
 #ifndef NOPROTO
index 76f1b633c53a0485d568e3502d3b2af86b14bd2b..7f02dfc6b43cd7e8f2f2b3eb160baa1da17c6920 100644 (file)
  */
 
 #include <stdio.h>
-#include <stdlib.h>
-#include <pem.h>
-#include <asn1_mac.h>
-#include <err.h>
-#include <objects.h>
-#include <conf.h>
+#include "cryptlib.h"
+#include "conf.h"
 #include "x509v3.h"
 
 #ifndef NOPROTO
-STACK *v2i_subject_alt(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, STACK *nval);
-STACK *v2i_issuer_alt(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, STACK *nval);
+static STACK *v2i_subject_alt(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, STACK *nval);
+static STACK *v2i_issuer_alt(X509V3_EXT_METHOD *method, X509V3_CTX *ctx, STACK *nval);
 static int copy_email(X509V3_CTX *ctx, STACK *gens);
 static int copy_issuer(X509V3_CTX *ctx, STACK *gens);
 #else
-STACK *v2i_issuer_alt();
-STACK *v2i_subject_alt();
+static STACK *v2i_issuer_alt();
+static STACK *v2i_subject_alt();
 static int copy_email();
 static int copy_issuer();
 #endif
@@ -170,7 +166,7 @@ STACK *ret;
        return ret;
 }
 
-STACK *v2i_issuer_alt(method, ctx, nval)
+static STACK *v2i_issuer_alt(method, ctx, nval)
 X509V3_EXT_METHOD *method;
 X509V3_CTX *ctx;
 STACK *nval;
@@ -239,7 +235,7 @@ STACK *gens;
        
 }
 
-STACK *v2i_subject_alt(method, ctx, nval)
+static STACK *v2i_subject_alt(method, ctx, nval)
 X509V3_EXT_METHOD *method;
 X509V3_CTX *ctx;
 STACK *nval;
index 87e5d008c871acc938ee529b044089416fc7126c..1a33778e010eb1ad316e9f16f930b410d609e413 100644 (file)
  *
  */
 
+
 #include <stdio.h>
-#include <stdlib.h>
-#include <pem.h>
-#include <asn1_mac.h>
-#include <err.h>
-#include <objects.h>
-#include <conf.h>
+#include "cryptlib.h"
+#include "asn1.h"
+#include "asn1_mac.h"
+#include "conf.h"
 #include "x509v3.h"
 
 #ifndef NOPROTO
index 2b2cc592b42edc3785996421d61549569de0e8c2..67d865f180e5b87d171f41bd82c70edf573c03b7 100644 (file)
  */
 
 #include <stdio.h>
-#include <stdlib.h>
-#include <pem.h>
-#include <asn1_mac.h>
-#include <err.h>
-#include <objects.h>
-#include <conf.h>
+#include "cryptlib.h"
+#include "conf.h"
 #include "x509v3.h"
 
 #ifndef NOPROTO
index 22ad348dee2c0fcf2874e3bf6958b63ed8d8d6d9..78dd9954aed87a062aa83be15ace9d22b9acd684 100644 (file)
  */
 /* extension creation utilities */
 
-#include <stdlib.h>
+
+
+#include <stdio.h>
 #include <ctype.h>
-#include <string.h>
-#include <pem.h>
-#include <conf.h>
-#include <err.h>
+#include "cryptlib.h"
+#include "conf.h"
+#include "x509.h"
 #include "x509v3.h"
 
 #ifndef NOPROTO
index 017f6f3607afc5c10471cd4ccdb19b191cbdf265..3ce97cd560bd2806eb75f7869dac23e451a81398 100644 (file)
@@ -57,9 +57,7 @@
  */
 
 #include <stdio.h>
-#include <stdlib.h>
-#include <pem.h>
-#include <err.h>
+#include "cryptlib.h"
 #include "x509v3.h"
 
 static ASN1_ENUMERATED *asn1_enumerated_new();
index 1c2d93f1c8ca7a2409ead69d077f7464740979ae..7a6bbf69c297aa7a035dae9839ee6590fde0dde9 100644 (file)
  *
  */
 
+
 #include <stdio.h>
-#include <stdlib.h>
-#include <pem.h>
-#include <asn1_mac.h>
-#include <err.h>
-#include <objects.h>
-#include <conf.h>
+#include "cryptlib.h"
+#include "asn1.h"
+#include "conf.h"
 #include "x509v3.h"
 
 #ifndef NOPROTO
index bd35eacc1de04246cfb1a04256a101e704853371..e7918d6b3cda16cf74dab7fe43b53a1276eb8a25 100644 (file)
  *
  */
 
+
 #include <stdio.h>
-#include <stdlib.h>
-#include <pem.h>
-#include <asn1_mac.h>
-#include <err.h>
-#include <objects.h>
-#include <conf.h>
+#include "cryptlib.h"
+#include "asn1.h"
+#include "asn1_mac.h"
+#include "conf.h"
 #include "x509v3.h"
 
 /*
index 13a1137288e4d6fdc6a5463dfef7ce83648642f0..1030d8ea69a60a44dc49c1a6b2db5c410fcd9b4b 100644 (file)
  *
  */
 
+
 #include <stdio.h>
-#include <stdlib.h>
-#include <pem.h>
-#include <asn1_mac.h>
-#include <err.h>
-#include <objects.h>
-#include <conf.h>
+#include "cryptlib.h"
+#include "asn1.h"
+#include "conf.h"
 #include "x509v3.h"
 
 #ifndef NOPROTO
index 6c966b3265c4ddb58f18742634d1d5c939040fd1..199ba104c87b0fa9afe2846004141556640491ce 100644 (file)
@@ -57,9 +57,7 @@
  */
 
 #include <stdio.h>
-#include <stdlib.h>
-#include <pem.h>
-#include <err.h>
+#include "cryptlib.h"
 #include "x509v3.h"
 
 static ASN1_INTEGER *asn1_integer_new();
index b40df76850e821540732d4cd10fe074d944688d5..0500ef5a355a1d2f1cd0c40750cddac047876f58 100644 (file)
  */
 /* X509 v3 extension utilities */
 
-#include <stdlib.h>
-#include <pem.h>
-#include <conf.h>
-#include <err.h>
+#include <stdio.h>
+#include "cryptlib.h"
+#include "conf.h"
 #include "x509v3.h"
 
 static STACK *ext_list = NULL;
index e0921eca54a7c1258467dc953fef52296063fcdc..c3808cce7a017a59ad1f5c1b02c560c3caf5f9a7 100644 (file)
  */
 
 #include <stdio.h>
-#include <stdlib.h>
-#include <pem.h>
-#include <asn1_mac.h>
-#include <err.h>
-#include <objects.h>
-#include <conf.h>
+#include "cryptlib.h"
+#include "asn1.h"
+#include "asn1_mac.h"
 #include "x509v3.h"
 
 #ifndef NOPROTO
index 7da7056293b45e2a8c7f6c983ba52f08b571a489..f3cca7a8d640d39c632bbc1a262cd45995682669 100644 (file)
  */
 /* X509 v3 extension utilities */
 
-#include <stdlib.h>
-#include <pem.h>
-#include <conf.h>
-#include <err.h>
+#include <stdio.h>
+#include "cryptlib.h"
+#include "conf.h"
 #include "x509v3.h"
 
 /* Extension printing routines */
index 3994c79d670e9e79d5819d0b3099228389fa74d5..c9402e6ccaeb6f45484cde6e8fb150d30d73c49c 100644 (file)
  *
  */
 
+
 #include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <pem.h>
-#include <asn1_mac.h>
-#include <err.h>
-#include <objects.h>
-#include <conf.h>
+#include "cryptlib.h"
 #include "x509v3.h"
 
 #ifndef NOPROTO
index dc43fcb7bd2576e60bd998433c53957aa61d4d37..0d2ae9dac3b7eebc487d21526e8d0eac3bc257fd 100644 (file)
  */
 /* X509 v3 extension utilities */
 
-#include <stdlib.h>
-#include <string.h>
+
+#include <stdio.h>
 #include <ctype.h>
-#include <pem.h>
-#include <conf.h>
-#include <err.h>
+#include "cryptlib.h"
+#include "conf.h"
 #include "x509v3.h"
 
 static char *strip_spaces(char *name);
index e0b097b335d0518e7724bde12f292c53d6a55621..64a5561b53a3d80dd99c40c26b7334bef8f9de17 100644 (file)
  * Hudson (tjh@cryptsoft.com).
  *
  */
+
+
 #include <stdio.h>
-#include <pem.h>
-#include <objects.h>
-#include <conf.h>
-#include <err.h>
+#include "cryptlib.h"
+#include "asn1.h"
+#include "asn1_mac.h"
+#include "conf.h"
+#include "x509.h"
 #include "x509v3.h"
 
 /* Test application to add extensions from a config file */
index 75e0cfb5a4c8f00b8bc543a3fbd06b5a0431ed59..3a8ce931411fee3a2aaf03b00603388be607e726 100644 (file)
  * Hudson (tjh@cryptsoft.com).
  *
  */
-#include <pem.h>
-#include <objects.h>
-#include <conf.h>
-#include <err.h>
+
+
+
+#include <stdio.h>
+#include "cryptlib.h"
+#include "asn1.h"
+#include "asn1_mac.h"
+#include "conf.h"
+#include "x509.h"
 #include "x509v3.h"
 
 int main(argc, argv)
index b4aeaf68cfb0164dfbb59cc30624ef39fa3e157e..f40bb027f35e951161708e154896de75d3f8e91e 100644 (file)
@@ -334,7 +334,7 @@ X509V3_EXT_METHOD *X509V3_EXT_get();
 X509V3_EXT_METHOD *X509V3_EXT_get_nid();
 int X509V3_add_standard_extensions();
 STACK *X509V3_parse_list();
-char *X509V3_EXT_get_d2i();
+char *X509V3_EXT_d2i();
 
 char *hex_to_string();
 unsigned char *string_to_hex();
index b6f5d82f218b91d88e65ed895d0dfcba9b42e255..b7bcf86476ae4e8b79b513e3f69ebe8d6c08d304 100644 (file)
@@ -623,7 +623,11 @@ char *parg;
                }
                /* break; */
        case SSL_CTRL_SET_TMP_RSA_CB:
+#ifndef NOPROTO
+               cert->rsa_tmp_cb=(RSA *(*)(SSL *, int, int))parg;
+#else
                cert->rsa_tmp_cb=(RSA *(*)())parg;
+#endif
                break;
 #endif
 #ifndef NO_DH
@@ -650,7 +654,11 @@ char *parg;
                }
                /*break; */
        case SSL_CTRL_SET_TMP_DH_CB:
+#ifndef NOPROTO
+               cert->dh_tmp_cb=(DH *(*)(SSL *, int, int))parg;
+#else
                cert->dh_tmp_cb=(DH *(*)())parg;
+#endif
                break;
 #endif
        /* A Thawte special :-) */
index d558794c3319b486d4426887a7675b540299e4fb..0e9d97aaf09e920de218faf0902953a8815b6c3c 100644 (file)
@@ -616,7 +616,7 @@ SSL_CIPHER *cipher;
 char *buf;
 int len;
        {
-       int _export,pkl,kl;
+        int is_export,pkl,kl;\r
        char *ver,*exp;
        char *kx,*au,*enc,*mac;
        unsigned long alg,alg2;
@@ -625,10 +625,10 @@ int len;
        alg=cipher->algorithms;
        alg2=cipher->algorithm2;
 
-       _export=SSL_IS_EXPORT(alg);
+        is_export=SSL_IS_EXPORT(alg);\r
        pkl=SSL_EXPORT_PKEYLENGTH(alg);
        kl=SSL_EXPORT_KEYLENGTH(alg);
-       exp=_export?" export":"";
+        exp=is_export?" export":"";\r
 
        if (alg & SSL_SSLV2)
                ver="SSLv2";
@@ -640,7 +640,7 @@ int len;
        switch (alg&SSL_MKEY_MASK)
                {
        case SSL_kRSA:
-               kx=_export?(pkl == 512 ? "RSA(512)" : "RSA(1024)"):"RSA";
+                kx=is_export?(pkl == 512 ? "RSA(512)" : "RSA(1024)"):"RSA";\r
                break;
        case SSL_kDHr:
                kx="DH/RSA";
@@ -652,7 +652,7 @@ int len;
                kx="Fortezza";
                break;
        case SSL_kEDH:
-               kx=_export?(pkl == 512 ? "DH(512)" : "DH(1024)"):"DH";
+                kx=is_export?(pkl == 512 ? "DH(512)" : "DH(1024)"):"DH";\r
                break;
        default:
                kx="unknown";
@@ -681,17 +681,17 @@ int len;
        switch (alg&SSL_ENC_MASK)
                {
        case SSL_DES:
-               enc=(_export && kl == 5)?"DES(40)":"DES(56)";
+                enc=(is_export && kl == 5)?"DES(40)":"DES(56)";\r
                break;
        case SSL_3DES:
                enc="3DES(168)";
                break;
        case SSL_RC4:
-               enc=_export?(kl == 5 ? "RC4(40)" : "RC4(56)")
+                enc=is_export?(kl == 5 ? "RC4(40)" : "RC4(56)")\r
                  :((alg2&SSL2_CF_8_BYTE_ENC)?"RC4(64)":"RC4(128)");
                break;
        case SSL_RC2:
-               enc=_export?(kl == 5 ? "RC2(40)" : "RC2(56)"):"RC2(128)";
+                enc=is_export?(kl == 5 ? "RC2(40)" : "RC2(56)"):"RC2(128)";\r
                break;
        case SSL_IDEA:
                enc="IDEA(128)";
index 54778768bbeba91ee911584a9c76731cb44617f4..e7da890357c1e3486021649cd5497db53de253fa 100755 (executable)
@@ -1209,7 +1209,7 @@ PKEY_USAGE_PERIOD_new                   1234
 PKEY_USAGE_PERIOD_free                  1235
 v2i_GENERAL_NAMES                       1236
 i2s_ASN1_INTEGER                        1237
-X509V3_EXT_get_d2i                      1238
+X509V3_EXT_d2i                          1238
 name_cmp                                1239
 str_dup                                 1240
 i2s_ASN1_ENUMERATED                     1241
index 11e9c16a1e4d2d8cace30e0c337822fd718319d7..8da22ccb1220e7fc14bd477aa2222871a7cebbcc 100755 (executable)
@@ -249,8 +249,8 @@ $link="$bin_dir$link" if ($link !~ /^\$/);
 $INSTALLTOP =~ s|/|$o|g;
 
 $defs= <<"EOF";
-# This makefile has been automatically generated from the SSLeay distribution.
-# This single makefile will build the complete SSLeay distribution and
+# This makefile has been automatically generated from the OpenSSL distribution.
+# This single makefile will build the complete OpenSSL distribution and
 # by default leave the 'intertesting' output files in .${o}out and the stuff
 # that needs deleting in .${o}tmp.
 # The file was generated by running 'make makefile.one', which
@@ -277,7 +277,7 @@ SHLIB_EX_OBJ=$shlib_ex_obj
 # be added
 EX_LIBS=$ex_libs
 
-# The SSLeay directory
+# The OpenSSL directory
 SRC_D=$src_dir
 
 LINK=$link
@@ -321,7 +321,7 @@ ASM=$bin_dir$asm
 # You should not need to touch anything below this point
 ######################################################
 
-E_EXE=ssleay
+E_EXE=openssl
 SSL=$ssl
 CRYPTO=$crypto
 RSAGLUE=$RSAglue