Use new-style system-id macros everywhere possible. I hope I haven't
authorRichard Levitte <levitte@openssl.org>
Tue, 20 Feb 2001 08:13:47 +0000 (08:13 +0000)
committerRichard Levitte <levitte@openssl.org>
Tue, 20 Feb 2001 08:13:47 +0000 (08:13 +0000)
missed any.

This compiles and runs on Linux, and external applications have no
problems with it.  The definite test will be to build this on VMS.

118 files changed:
Configure
apps/app_rand.c
apps/apps.c
apps/asn1pars.c
apps/ca.c
apps/ciphers.c
apps/crl.c
apps/crl2p7.c
apps/dgst.c
apps/dh.c
apps/dhparam.c
apps/dsa.c
apps/dsaparam.c
apps/enc.c
apps/engine.c
apps/errstr.c
apps/gendh.c
apps/gendsa.c
apps/genrsa.c
apps/nseq.c
apps/openssl.c
apps/passwd.c
apps/pkcs12.c
apps/pkcs7.c
apps/pkcs8.c
apps/rand.c
apps/req.c
apps/rsa.c
apps/rsautl.c
apps/s_apps.h
apps/s_client.c
apps/s_server.c
apps/s_socket.c
apps/s_time.c
apps/sess_id.c
apps/smime.c
apps/speed.c
apps/spkac.c
apps/x509.c
crypto/asn1/a_gentm.c
crypto/asn1/a_time.c
crypto/asn1/a_utctm.c
crypto/bf/bf_opts.c
crypto/bf/bfspeed.c
crypto/bio/b_sock.c
crypto/bio/bio_cb.c
crypto/bio/bss_acpt.c
crypto/bio/bss_conn.c
crypto/bio/bss_fd.c
crypto/bio/bss_file.c
crypto/bio/bss_log.c
crypto/bio/bss_sock.c
crypto/bn/bnspeed.c
crypto/bn/bntest.c
crypto/bn/expspeed.c
crypto/bn/exptest.c
crypto/bn/vms-helper.c
crypto/cast/cast_spd.c
crypto/cast/castopts.c
crypto/comp/c_zlib.c
crypto/conf/conf_def.c
crypto/conf/conf_lib.c
crypto/cryptlib.c
crypto/cryptlib.h
crypto/des/des.c
crypto/des/des_locl.h
crypto/des/des_opts.c
crypto/des/destest.c
crypto/des/read_pwd.c
crypto/des/speed.c
crypto/dh/dhtest.c
crypto/dsa/dsatest.c
crypto/dso/dso_vms.c
crypto/dso/dso_win32.c
crypto/err/err.c
crypto/idea/idea_spd.c
crypto/rand/md_rand.c
crypto/rand/rand_egd.c
crypto/rand/rand_unix.c
crypto/rand/rand_vms.c
crypto/rand/rand_win.c
crypto/rand/randfile.c
crypto/rc2/rc2speed.c
crypto/rc4/rc4.c
crypto/rc4/rc4speed.c
crypto/rc5/rc5speed.c
crypto/rsa/rsa_sign.c
crypto/symhacks.h
crypto/threads/mttest.c
crypto/threads/th-lock.c
crypto/tmdiff.c
crypto/txt_db/txt_db.c
ssl/kssl.c
ssl/s23_clnt.c
ssl/s23_lib.c
ssl/s23_srvr.c
ssl/s2_clnt.c
ssl/s2_enc.c
ssl/s2_lib.c
ssl/s2_meth.c
ssl/s2_pkt.c
ssl/s2_srvr.c
ssl/s3_both.c
ssl/s3_clnt.c
ssl/s3_lib.c
ssl/s3_pkt.c
ssl/s3_srvr.c
ssl/ssl_algs.c
ssl/ssl_cert.c
ssl/ssl_ciph.c
ssl/ssl_err.c
ssl/ssl_err2.c
ssl/ssl_lib.c
ssl/ssl_locl.h
ssl/ssl_rsa.c
ssl/ssl_stat.c
ssl/ssl_txt.c
ssl/ssltest.c

index ada01f82360dec0791cf00ed0120ca52ba29e0d8..4bab7e6518c1d67a79faa05a9d8ad9fd268d5925 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -693,7 +693,6 @@ if ($no_krb5
        $cflags="-DOPENSSL_NO_KRB5 $cflags";
        $options.=" no-krb5" unless $no_krb5;
        $openssl_algorithm_defines .= "#define OPENSSL_NO_KRB5\n";
-       $openssl_algorithm_defines .= "#define NO_KRB5\n";
        }
 else
        {
index 9d6d5fbf6f84ef7d4a15ea32d679b10e79dddf72..b7b6128c1eb901a383f5e0bfb07c32ba52d130ed 100644 (file)
@@ -124,7 +124,7 @@ int app_RAND_load_file(const char *file, BIO *bio_e, int dont_warn)
        int consider_randfile = (file == NULL);
        char buffer[200];
        
-#ifdef WINDOWS
+#ifdef OPENSSL_SYS_WINDOWS
        BIO_printf(bio_e,"Loading 'screen' into random state -");
        BIO_flush(bio_e);
        RAND_screen();
index a1397a36d8f60c2bd97ca04c5a20aa9832b03541..2ecb6618f5921e28124f941ca417d021cf35b4b6 100644 (file)
@@ -70,7 +70,7 @@
 #include <openssl/pkcs12.h>
 #include <openssl/safestack.h>
 
-#ifdef WINDOWS
+#ifdef OPENSSL_SYS_WINDOWS
 #  include "bss_file.c"
 #endif
 
@@ -184,7 +184,7 @@ int str2fmt(char *s)
                return(FORMAT_UNDEF);
        }
 
-#if defined(MSDOS) || defined(WIN32) || defined(WIN16)
+#if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN16)
 void program_name(char *in, char *out, int size)
        {
        int i,n;
@@ -222,7 +222,7 @@ void program_name(char *in, char *out, int size)
        out[n]='\0';
        }
 #else
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
 void program_name(char *in, char *out, int size)
        {
        char *p=in, *q;
@@ -258,10 +258,10 @@ void program_name(char *in, char *out, int size)
 #endif
 #endif
 
-#ifdef WIN32
+#ifdef OPENSSL_SYS_WIN32
 int WIN32_rename(char *from, char *to)
        {
-#ifdef WINNT
+#ifdef OPENSSL_SYS_WINNT
        int ret;
 /* Note: MoveFileEx() doesn't work under Win95, Win98 */
 
index f25c9f84e81c23ee920803c1807eb59a724c48b1..108ed7daa0bde85b639f03ba494be8dcec119e2e 100644 (file)
@@ -206,7 +206,7 @@ bad:
                goto end;
                }
        BIO_set_fp(out,stdout,BIO_NOCLOSE|BIO_FP_TEXT);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
        {
        BIO *tmpbio = BIO_new(BIO_f_linebuffer());
        out = BIO_push(tmpbio, out);
index 584a2f561f4cb0b0343f93e4e061007d0eee8b91..a72aaef18438c123908971bbf4f6ccb95732b30c 100644 (file)
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -79,7 +79,7 @@
 #include <openssl/engine.h>
 
 #ifndef W_OK
-#  ifdef VMS
+#  ifdef OPENSSL_SYS_VMS
 #    if defined(__DECC)
 #      include <unistd.h>
 #    else
@@ -545,7 +545,7 @@ bad:
        if (configfile == NULL)
                {
                /* We will just use 'buf[0]' as a temporary buffer.  */
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                strncpy(buf[0],X509_get_default_cert_area(),
                        sizeof(buf[0])-1-sizeof(CONFIG_FILE));
 #else
@@ -755,7 +755,8 @@ bad:
                        BIO_printf(bio_err,"there needs to be defined a directory for new certificate to be placed in\n");
                        goto err;
                        }
-#ifndef VMS /* outdir is a directory spec, but access() for VMS demands a
+#ifndef OPENSSL_SYS_VMS
+           /* outdir is a directory spec, but access() for VMS demands a
               filename.  In any case, stat(), below, will catch the problem
               if outdir is not a directory spec, and the fopen() or open()
               will catch an error if there is no write access.
@@ -853,7 +854,7 @@ bad:
        if (verbose)
                {
                BIO_set_fp(out,stdout,BIO_NOCLOSE|BIO_FP_TEXT); /* cannot fail */
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                {
                BIO *tmpbio = BIO_new(BIO_f_linebuffer());
                out = BIO_push(tmpbio, out);
@@ -996,7 +997,7 @@ bad:
                else
                        {
                        BIO_set_fp(Sout,stdout,BIO_NOCLOSE|BIO_FP_TEXT);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                        {
                        BIO *tmpbio = BIO_new(BIO_f_linebuffer());
                        Sout = BIO_push(tmpbio, Sout);
@@ -1232,7 +1233,7 @@ bad:
 
                        strncpy(buf[0],serialfile,BSIZE-4);
 
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                        strcat(buf[0],"-new");
 #else
                        strcat(buf[0],".new");
@@ -1242,7 +1243,7 @@ bad:
 
                        strncpy(buf[1],dbfile,BSIZE-4);
 
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                        strcat(buf[1],"-new");
 #else
                        strcat(buf[1],".new");
@@ -1272,7 +1273,7 @@ bad:
                        
                        strncpy(buf[2],outdir,BSIZE-(j*2)-6);
 
-#ifndef VMS
+#ifndef OPENSSL_SYS_VMS
                        strcat(buf[2],"/");
 #endif
 
@@ -1309,7 +1310,7 @@ bad:
                        /* Rename the database and the serial file */
                        strncpy(buf[2],serialfile,BSIZE-4);
 
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                        strcat(buf[2],"-old");
 #else
                        strcat(buf[2],".old");
@@ -1337,7 +1338,7 @@ bad:
 
                        strncpy(buf[2],dbfile,BSIZE-4);
 
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                        strcat(buf[2],"-old");
 #else
                        strcat(buf[2],".old");
index 9ba1bffd37cbbb8d009379cddf3020314a2901c9..c3bd859d68c153cfc0a7ba404c993bb5909f365b 100644 (file)
@@ -108,7 +108,7 @@ int MAIN(int argc, char **argv)
        if (bio_err == NULL)
                bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
        STDout=BIO_new_fp(stdout,BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
        {
        BIO *tmpbio = BIO_new(BIO_f_linebuffer());
        STDout = BIO_push(tmpbio, STDout);
index 666a8576fbe73644aaa8560224880dc6ca262b84..fb36ed5d02bcb06834feef59bf782fbc4f0479c6 100644 (file)
@@ -124,7 +124,7 @@ int MAIN(int argc, char **argv)
                if ((bio_out=BIO_new(BIO_s_file())) != NULL)
                        {
                        BIO_set_fp(bio_out,stdout,BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                        {
                        BIO *tmpbio = BIO_new(BIO_f_linebuffer());
                        bio_out = BIO_push(tmpbio, bio_out);
@@ -324,7 +324,7 @@ bad:
        if (outfile == NULL)
                {
                BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                {
                BIO *tmpbio = BIO_new(BIO_f_linebuffer());
                out = BIO_push(tmpbio, out);
index 7f853b65ab2b13bb2cba055bbce53503965970ef..36d8afee6ff376eb0bdc3166acd1c2b3d6e44866 100644 (file)
@@ -241,7 +241,7 @@ bad:
        if (outfile == NULL)
                {
                BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                {
                BIO *tmpbio = BIO_new(BIO_f_linebuffer());
                out = BIO_push(tmpbio, out);
index 4f1660c2a61c542f129de4a91542443d819bf47a..a6b2e309c42d4772fb70816044aeb2f7d3ef7f0e 100644 (file)
@@ -272,7 +272,7 @@ int MAIN(int argc, char **argv)
                else    out = BIO_new_file(outfile, "w");
        } else {
                out = BIO_new_fp(stdout, BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                {
                BIO *tmpbio = BIO_new(BIO_f_linebuffer());
                out = BIO_push(tmpbio, out);
index 07f3873f6642373240b5d4dfcddc66c0b3e9f887..6162e442bae86d67353d4517ec9effa17b4f3e94 100644 (file)
--- a/apps/dh.c
+++ b/apps/dh.c
@@ -213,7 +213,7 @@ bad:
        if (outfile == NULL)
                {
                BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                {
                BIO *tmpbio = BIO_new(BIO_f_linebuffer());
                out = BIO_push(tmpbio, out);
index d7fa61249197270b08c8923e0a64eba131887551..bbc64d5eb08d76c0ca3737b128a1ac43f8c8c503 100644 (file)
@@ -419,7 +419,7 @@ bad:
        if (outfile == NULL)
                {
                BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                {
                BIO *tmpbio = BIO_new(BIO_f_linebuffer());
                out = BIO_push(tmpbio, out);
index d0caac4489955ca9a2f0603f847907d91fa9efce..6e9e6c7566068876d740f48ad68a8bde8e59d0b3 100644 (file)
@@ -262,7 +262,7 @@ bad:
        if (outfile == NULL)
                {
                BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                {
                BIO *tmpbio = BIO_new(BIO_f_linebuffer());
                out = BIO_push(tmpbio, out);
index 64cadeb3b8e58dae2cbf376a22772c56e585455d..e923f10dbb0e05b524d3f3ccbda8406e1677c121 100644 (file)
@@ -216,7 +216,7 @@ bad:
        if (outfile == NULL)
                {
                BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                {
                BIO *tmpbio = BIO_new(BIO_f_linebuffer());
                out = BIO_push(tmpbio, out);
index d062b61ec506b95b7ee8c7436dff3fdb27460260..332c2ba9dae4194954dd9b6da11c31d5c2a7ffe8 100644 (file)
@@ -407,7 +407,7 @@ bad:
        if (outf == NULL)
                {
                BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                {
                BIO *tmpbio = BIO_new(BIO_f_linebuffer());
                out = BIO_push(tmpbio, out);
index b320db6c8f9bfebcf753e4ce2c2dec145bab81ed..12a88f1957c8358db4533a21063283bc823b68d0 100644 (file)
@@ -133,7 +133,7 @@ int MAIN(int argc, char **argv)
        if (bio_err == NULL)
                bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
        bio_out=BIO_new_fp(stdout,BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
        {
        BIO *tmpbio = BIO_new(BIO_f_linebuffer());
        bio_out = BIO_push(tmpbio, bio_out);
index e392328f93d2656f84653e53c68de5f37495538f..c411effcd03d4499cff5fffb96f6fd384b5c2fec 100644 (file)
@@ -91,7 +91,7 @@ int MAIN(int argc, char **argv)
                out=BIO_new(BIO_s_file());
                if ((out != NULL) && BIO_set_fp(out,stdout,BIO_NOCLOSE))
                        {
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                        {
                        BIO *tmpbio = BIO_new(BIO_f_linebuffer());
                        out = BIO_push(tmpbio, out);
index 27da7cdd3153b2406e1fe7892f5092a0213d7bc4..0b47867c2036289cb5144b60f29d73bd331e436f 100644 (file)
@@ -171,7 +171,7 @@ bad:
        if (outfile == NULL)
                {
                BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                {
                BIO *tmpbio = BIO_new(BIO_f_linebuffer());
                out = BIO_push(tmpbio, out);
index f7c5f4791a0891e5d52c6146c30b8c398b49420d..47dbde67c7966fd769fcc019d01f5cdb2f57fbe6 100644 (file)
@@ -207,7 +207,7 @@ bad:
        if (outfile == NULL)
                {
                BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                {
                BIO *tmpbio = BIO_new(BIO_f_linebuffer());
                out = BIO_push(tmpbio, out);
index a2e7d989fd3c2f938efb170cec651a32bea05640..c263956c03e7c3f28fc5aa0e323d154a296dd22c 100644 (file)
@@ -197,7 +197,7 @@ bad:
        if (outfile == NULL)
                {
                BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                {
                BIO *tmpbio = BIO_new(BIO_f_linebuffer());
                out = BIO_push(tmpbio, out);
index 1d73d1ad5231e2e6cdfa5e0a991e0bd019c4276c..93adcdfef8d65754c4a52472060d4ed3b0586859 100644 (file)
@@ -121,7 +121,7 @@ int MAIN(int argc, char **argv)
                }
        } else {
                out = BIO_new_fp(stdout, BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                {
                BIO *tmpbio = BIO_new(BIO_f_linebuffer());
                out = BIO_push(tmpbio, out);
index 6c69a29bd66cb28b505853ebda7055d7eac79a0b..c7ee7533b4c475ccd1f5cb3d595b08bc10f339c5 100644 (file)
@@ -254,7 +254,7 @@ int main(int Argc, char *Argv[])
        if (p == NULL)
                {
                strcpy(config_name,X509_get_default_cert_area());
-#ifndef VMS
+#ifndef OPENSSL_SYS_VMS
                strcat(config_name,"/");
 #endif
                strcat(config_name,OPENSSL_CONF);
@@ -372,7 +372,7 @@ static int do_cmd(LHASH *prog, int argc, char *argv[])
        else if ((strncmp(argv[0],"no-",3)) == 0)
                {
                BIO *bio_stdout = BIO_new_fp(stdout,BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                {
                BIO *tmpbio = BIO_new(BIO_f_linebuffer());
                bio_stdout = BIO_push(tmpbio, bio_stdout);
@@ -409,7 +409,7 @@ static int do_cmd(LHASH *prog, int argc, char *argv[])
                else /* strcmp(argv[0],LIST_CIPHER_COMMANDS) == 0 */
                        list_type = FUNC_TYPE_CIPHER;
                bio_stdout = BIO_new_fp(stdout,BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                {
                BIO *tmpbio = BIO_new(BIO_f_linebuffer());
                bio_stdout = BIO_push(tmpbio, bio_stdout);
index 9cc3f4bf2d6f0575754a775171dfdbc20bb0b932..f190e16cb5b6257790cc862a6f6bc68c4b4a26eb 100644 (file)
@@ -83,7 +83,7 @@ int MAIN(int argc, char **argv)
        if (out == NULL)
                goto err;
        BIO_set_fp(out, stdout, BIO_NOCLOSE | BIO_FP_TEXT);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
        {
        BIO *tmpbio = BIO_new(BIO_f_linebuffer());
        out = BIO_push(tmpbio, out);
index 8b1586faf5a6ad97fb7441020b600b2e2502f442..17846cfba6e40b3ad4bb88bc50b598cf119119ee 100644 (file)
@@ -375,7 +375,7 @@ int MAIN(int argc, char **argv)
 
     if (!outfile) {
        out = BIO_new_fp(stdout, BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
        {
            BIO *tmpbio = BIO_new(BIO_f_linebuffer());
            out = BIO_push(tmpbio, out);
index b348da220383961650c6179e6b35696bd9ef3088..63ec8a5744d9e5964de959bfced9109aaffb3950 100644 (file)
@@ -225,7 +225,7 @@ bad:
        if (outfile == NULL)
                {
                BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                {
                BIO *tmpbio = BIO_new(BIO_f_linebuffer());
                out = BIO_push(tmpbio, out);
index 3633590874f2fb367093b012464459313cdc0f19..852a43558415265880de73160dc3322ad91af63d 100644 (file)
@@ -226,7 +226,7 @@ int MAIN(int argc, char **argv)
                }
        } else {
                out = BIO_new_fp (stdout, BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                {
                        BIO *tmpbio = BIO_new(BIO_f_linebuffer());
                        out = BIO_push(tmpbio, out);
index 855951db7634160c6efcd65e6525844350593219..8a216fbc75b2002fdf0b9195bf9003ff9ae88fa7 100644 (file)
@@ -132,7 +132,7 @@ int MAIN(int argc, char **argv)
        else
                {
                r = BIO_set_fp(out, stdout, BIO_NOCLOSE | BIO_FP_TEXT);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                {
                BIO *tmpbio = BIO_new(BIO_f_linebuffer());
                out = BIO_push(tmpbio, out);
index 296825cab28b9c98780943457b8ba772c9a876af..e75d7abf09b790ba7160adec04351a89fdf7ea76 100644 (file)
@@ -435,7 +435,7 @@ bad:
        if (p == NULL)
                {
                strcpy(config_name,X509_get_default_cert_area());
-#ifndef VMS
+#ifndef OPENSSL_SYS_VMS
                strcat(config_name,"/");
 #endif
                strcat(config_name,OPENSSL_CONF);
@@ -697,7 +697,7 @@ bad:
                        {
                        BIO_printf(bio_err,"writing new private key to stdout\n");
                        BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                        {
                        BIO *tmpbio = BIO_new(BIO_f_linebuffer());
                        out = BIO_push(tmpbio, out);
@@ -910,7 +910,7 @@ loop:
        if (outfile == NULL)
                {
                BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                {
                BIO *tmpbio = BIO_new(BIO_f_linebuffer());
                out = BIO_push(tmpbio, out);
index e395d54df2c45600697d351bc4a35168b4d55654..bdfe2189ba3656f676985fe33ec069d5468dd079 100644 (file)
@@ -307,7 +307,7 @@ bad:
        if (outfile == NULL)
                {
                BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                {
                BIO *tmpbio = BIO_new(BIO_f_linebuffer());
                out = BIO_push(tmpbio, out);
index ba31979618760acdde4232b7bad44cf865146bdb..662c11a70bdc1ad59524ad66932de6215f7888c6 100644 (file)
@@ -227,7 +227,7 @@ int MAIN(int argc, char **argv)
                }
        } else {
                out = BIO_new_fp(stdout, BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                {
                    BIO *tmpbio = BIO_new(BIO_f_linebuffer());
                    out = BIO_push(tmpbio, out);
index 57af7c0f8cf04f8cf915bf37c77be8b312d17bf5..235a1778e8b09677a300c9e3ef7e9eee95780656 100644 (file)
@@ -57,7 +57,9 @@
  */
 
 #include <sys/types.h>
-#if (defined(VMS) || defined(__VMS)) && !defined(FD_SET)
+#include <openssl/opensslconf.h>
+
+#if defined(OPENSSL_SYS_VMS) && !defined(FD_SET)
 /* VAX C does not defined fd_set and friends, but it's actually quite simple */
 /* These definitions are borrowed from SOCKETSHR.      /Richard Levitte */
 #define MAX_NOFILE     32
index bdb94dab44f06d1d853de19c409f1619c7732790..19c9a217dfd835db883b1ebd0ad8ff621443159d 100644 (file)
@@ -68,7 +68,7 @@
    recursive header file inclusion, resulting in the compiler complaining
    that u_int isn't defined, but only if _POSIX_C_SOURCE is defined, which
    is needed to have fileno() declared correctly...  So let's define u_int */
-#if defined(VMS) && defined(__DECC) && !defined(__U_INT)
+#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__U_INT)
 #define __U_INT
 typedef unsigned int u_int;
 #endif
@@ -82,12 +82,12 @@ typedef unsigned int u_int;
 #include <openssl/engine.h>
 #include "s_apps.h"
 
-#ifdef WINDOWS
+#ifdef OPENSSL_SYS_WINDOWS
 #include <conio.h>
 #endif
 
 
-#if (defined(VMS) && __VMS_VER < 70000000)
+#if (defined(OPENSSL_SYS_VMS) && __VMS_VER < 70000000)
 /* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */
 #undef FIONBIO
 #endif
@@ -186,7 +186,7 @@ int MAIN(int argc, char **argv)
        char *inrand=NULL;
        char *engine_id=NULL;
        ENGINE *e=NULL;
-#ifdef WINDOWS
+#ifdef OPENSSL_SYS_WINDOWS
        struct timeval tv;
 #endif
 
@@ -537,7 +537,7 @@ re_start:
 
                if (!ssl_pending)
                        {
-#ifndef WINDOWS
+#ifndef OPENSSL_SYS_WINDOWS
                        if (tty_on)
                                {
                                if (read_tty)  FD_SET(fileno(stdin),&readfds);
@@ -564,7 +564,7 @@ re_start:
                         * will choke the compiler: if you do have a cast then
                         * you can either go for (int *) or (void *).
                         */
-#ifdef WINDOWS
+#ifdef OPENSSL_SYS_WINDOWS
                        /* Under Windows we make the assumption that we can
                         * always write to the tty: therefore if we need to
                         * write to the tty we just fall through. Otherwise
@@ -663,7 +663,7 @@ re_start:
                                goto shut;
                                }
                        }
-#ifdef WINDOWS
+#ifdef OPENSSL_SYS_WINDOWS
                /* Assume Windows can always write */
                else if (!ssl_pending && write_tty)
 #else
@@ -744,7 +744,7 @@ printf("read=%d pending=%d peek=%d\n",k,SSL_pending(con),SSL_peek(con,zbuf,10240
                                }
                        }
 
-#ifdef WINDOWS
+#ifdef OPENSSL_SYS_WINDOWS
                else if ((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0)))
 #else
                else if (FD_ISSET(fileno(stdin),&readfds))
index c83337b828f5ffe6be58c943af6e862e40c7c1c4..3828d79e7d6ce5670e26fbf45f566e0668f09bdf 100644 (file)
@@ -70,7 +70,7 @@
    recursive header file inclusion, resulting in the compiler complaining
    that u_int isn't defined, but only if _POSIX_C_SOURCE is defined, which
    is needed to have fileno() declared correctly...  So let's define u_int */
-#if defined(VMS) && defined(__DECC) && !defined(__U_INT)
+#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__U_INT)
 #define __U_INT
 typedef unsigned int u_int;
 #endif
@@ -86,11 +86,11 @@ typedef unsigned int u_int;
 #include <openssl/engine.h>
 #include "s_apps.h"
 
-#ifdef WINDOWS
+#ifdef OPENSSL_SYS_WINDOWS
 #include <conio.h>
 #endif
 
-#if (defined(VMS) && __VMS_VER < 70000000)
+#if (defined(OPENSSL_SYS_VMS) && __VMS_VER < 70000000)
 /* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */
 #undef FIONBIO
 #endif
@@ -815,7 +815,7 @@ static int sv_body(char *hostname, int s, unsigned char *context)
        unsigned long l;
        SSL *con=NULL;
        BIO *sbio;
-#ifdef WINDOWS
+#ifdef OPENSSL_SYS_WINDOWS
        struct timeval tv;
 #endif
 
@@ -882,7 +882,7 @@ static int sv_body(char *hostname, int s, unsigned char *context)
                if (!read_from_sslcon)
                        {
                        FD_ZERO(&readfds);
-#ifndef WINDOWS
+#ifndef OPENSSL_SYS_WINDOWS
                        FD_SET(fileno(stdin),&readfds);
 #endif
                        FD_SET(s,&readfds);
@@ -892,7 +892,7 @@ static int sv_body(char *hostname, int s, unsigned char *context)
                         * the compiler: if you do have a cast then you can either
                         * go for (int *) or (void *).
                         */
-#ifdef WINDOWS
+#ifdef OPENSSL_SYS_WINDOWS
                        /* Under Windows we can't select on stdin: only
                         * on sockets. As a workaround we timeout the select every
                         * second and check for any keypress. In a proper Windows
@@ -1294,7 +1294,7 @@ static int www_body(char *hostname, int s, unsigned char *context)
                        else
                                {
                                BIO_printf(bio_s_out,"read R BLOCK\n");
-#ifndef MSDOS
+#ifndef OPENSSL_SYS_MSDOS
                                sleep(1);
 #endif
                                continue;
index a61e6455a506936e8dab7e4d610fcfc0babf2060..c261abb3612430c6ae5f34d895fe90d633548812 100644 (file)
@@ -66,7 +66,7 @@
    recursive header file inclusion, resulting in the compiler complaining
    that u_int isn't defined, but only if _POSIX_C_SOURCE is defined, which
    is needed to have fileno() declared correctly...  So let's define u_int */
-#if defined(VMS) && defined(__DECC) && !defined(__U_INT)
+#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__U_INT)
 #define __U_INT
 typedef unsigned int u_int;
 #endif
@@ -80,7 +80,7 @@ typedef unsigned int u_int;
 #include <openssl/ssl.h>
 
 static struct hostent *GetHostByName(char *name);
-#ifdef WINDOWS
+#ifdef OPENSSL_SYS_WINDOWS
 static void sock_cleanup(void);
 #endif
 static int sock_init(void);
@@ -90,17 +90,17 @@ static int init_server_long(int *sock, int port,char *ip);
 static int do_accept(int acc_sock, int *sock, char **host);
 static int host_ip(char *str, unsigned char ip[4]);
 
-#ifdef WIN16
+#ifdef OPENSSL_SYS_WIN16
 #define SOCKET_PROTOCOL        0 /* more microsoft stupidity */
 #else
 #define SOCKET_PROTOCOL        IPPROTO_TCP
 #endif
 
-#ifdef WINDOWS
+#ifdef OPENSSL_SYS_WINDOWS
 static struct WSAData wsa_state;
 static int wsa_init_done=0;
 
-#ifdef WIN16
+#ifdef OPENSSL_SYS_WIN16
 static HWND topWnd=0;
 static FARPROC lpTopWndProc=NULL;
 static FARPROC lpTopHookProc=NULL;
@@ -129,10 +129,10 @@ static BOOL CALLBACK enumproc(HWND hwnd,LPARAM lParam)
        return(FALSE);
        }
 
-#endif /* WIN32 */
-#endif /* WINDOWS */
+#endif /* OPENSSL_SYS_WIN32 */
+#endif /* OPENSSL_SYS_WINDOWS */
 
-#ifdef WINDOWS
+#ifdef OPENSSL_SYS_WINDOWS
 static void sock_cleanup(void)
        {
        if (wsa_init_done)
@@ -146,7 +146,7 @@ static void sock_cleanup(void)
 
 static int sock_init(void)
        {
-#ifdef WINDOWS
+#ifdef OPENSSL_SYS_WINDOWS
        if (!wsa_init_done)
                {
                int err;
@@ -163,15 +163,15 @@ static int sock_init(void)
                        return(0);
                        }
 
-#ifdef WIN16
+#ifdef OPENSSL_SYS_WIN16
                EnumTaskWindows(GetCurrentTask(),enumproc,0L);
                lpTopWndProc=(FARPROC)GetWindowLong(topWnd,GWL_WNDPROC);
                lpTopHookProc=MakeProcInstance((FARPROC)topHookProc,_hInstance);
 
                SetWindowLong(topWnd,GWL_WNDPROC,(LONG)lpTopHookProc);
-#endif /* WIN16 */
+#endif /* OPENSSL_SYS_WIN16 */
                }
-#endif /* WINDOWS */
+#endif /* OPENSSL_SYS_WINDOWS */
        return(1);
        }
 
@@ -285,7 +285,7 @@ static int init_server_long(int *sock, int port, char *ip)
 #endif
        if (bind(s,(struct sockaddr *)&server,sizeof(server)) == -1)
                {
-#ifndef WINDOWS
+#ifndef OPENSSL_SYS_WINDOWS
                perror("bind");
 #endif
                goto err;
@@ -318,7 +318,7 @@ static int do_accept(int acc_sock, int *sock, char **host)
 
        if (!sock_init()) return(0);
 
-#ifndef WINDOWS
+#ifndef OPENSSL_SYS_WINDOWS
 redoit:
 #endif
 
@@ -332,7 +332,7 @@ redoit:
        ret=accept(acc_sock,(struct sockaddr *)&from,(void *)&len);
        if (ret == INVALID_SOCKET)
                {
-#ifdef WINDOWS
+#ifdef OPENSSL_SYS_WINDOWS
                i=WSAGetLastError();
                BIO_printf(bio_err,"accept error %d\n",i);
 #else
index ce52b463fcbc18b255f7597055835d62632c3a17..5da9b12404847a9fa78d451ad3b5396767b2130a 100644 (file)
@@ -82,7 +82,7 @@
 #include "wintext.h"
 #endif
 
-#if !defined(MSDOS) && (!defined(VMS) || defined(__DECC))
+#if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC))
 #define TIMES
 #endif
 
@@ -98,7 +98,7 @@
    The __TMS macro will show if it was.  If it wasn't defined, we should
    undefine TIMES, since that tells the rest of the program how things
    should be handled.                          -- Richard Levitte */
-#if defined(VMS) && defined(__DECC) && !defined(__TMS)
+#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
 #undef TIMES
 #endif
 
@@ -174,7 +174,7 @@ static int perform=0;
 #ifdef FIONBIO
 static int t_nbio=0;
 #endif
-#ifdef WIN32
+#ifdef OPENSSL_SYS_WIN32
 static int exitNow = 0;                /* Set when it's time to exit main */
 #endif
 
@@ -198,7 +198,7 @@ static void s_time_init(void)
 #ifdef FIONBIO
        t_nbio=0;
 #endif
-#ifdef WIN32
+#ifdef OPENSSL_SYS_WIN32
        exitNow = 0;            /* Set when it's time to exit main */
 #endif
        }
index eb40aa63538103a805ac0c3d68696f13f58bd9df..7f5c55b90180816fb64d3d959b1eac1dc65b0cbf 100644 (file)
@@ -208,7 +208,7 @@ bad:
                if (outfile == NULL)
                        {
                        BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                        {
                        BIO *tmpbio = BIO_new(BIO_f_linebuffer());
                        out = BIO_push(tmpbio, out);
index eec40764d878392d98b36eb62fd01b6daf343983..b8f4f220353426ef9c5fa3dadd5ce4cd0c157b7f 100644 (file)
@@ -421,7 +421,7 @@ int MAIN(int argc, char **argv)
                }
        } else {
                out = BIO_new_fp(stdout, BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                {
                    BIO *tmpbio = BIO_new(BIO_f_linebuffer());
                    out = BIO_push(tmpbio, out);
index 90dcd4787e0e05dd139e354199311f7d5cd03356..99e72a97b9fd4b07562f25c01a4b8076789f68e9 100644 (file)
@@ -87,7 +87,7 @@
 
 #if defined(__FreeBSD__)
 # define USE_TOD
-#elif !defined(MSDOS) && (!defined(VMS) || defined(__DECC))
+#elif !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC))
 # define TIMES
 #endif
 #if !defined(_UNICOS) && !defined(__OpenBSD__) && !defined(sgi) && !defined(__FreeBSD__) && !(defined(__bsdi) || defined(__bsdi__)) && !defined(_AIX) && !defined(OPENSSL_SYS_MPE) && !defined(__NetBSD__) /* FIXME */
    The __TMS macro will show if it was.  If it wasn't defined, we should
    undefine TIMES, since that tells the rest of the program how things
    should be handled.                          -- Richard Levitte */
-#if defined(VMS) && defined(__DECC) && !defined(__TMS)
+#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
 #undef TIMES
 #endif
 
index d7e46782f79e238365af53d12f22be53a66f5508..5ac9b14c54b2035c56cb1989d240ff0272ea53b9 100644 (file)
@@ -221,7 +221,7 @@ bad:
                if (outfile) out = BIO_new_file(outfile, "w");
                else {
                        out = BIO_new_fp(stdout, BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                        {
                            BIO *tmpbio = BIO_new(BIO_f_linebuffer());
                            out = BIO_push(tmpbio, out);
@@ -278,7 +278,7 @@ bad:
        if (outfile) out = BIO_new_file(outfile, "w");
        else {
                out = BIO_new_fp(stdout, BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                {
                    BIO *tmpbio = BIO_new(BIO_f_linebuffer());
                    out = BIO_push(tmpbio, out);
index 2972b047a9b3e978a40b2a92b620b625de1ae66a..658afcef5ed1a7e4cf4e3a915f6f52235cb30beb 100644 (file)
@@ -193,7 +193,7 @@ int MAIN(int argc, char **argv)
        if (bio_err == NULL)
                bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
        STDout=BIO_new_fp(stdout,BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
        {
        BIO *tmpbio = BIO_new(BIO_f_linebuffer());
        STDout = BIO_push(tmpbio, STDout);
@@ -642,7 +642,7 @@ bad:
                if (outfile == NULL)
                        {
                        BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
                        {
                        BIO *tmpbio = BIO_new(BIO_f_linebuffer());
                        out = BIO_push(tmpbio, out);
index 000d346dd59d2ef6ee89a329d8e4951e8ecfc3af..185d16960038772b84e1ef1a9c6bd16880664ccb 100644 (file)
@@ -193,7 +193,7 @@ ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
        {
        char *p;
        struct tm *ts;
-#if defined(OPENSSL_THREADS) && !defined(WIN32)
+#if defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32)
        struct tm data;
 #endif
 
@@ -202,7 +202,7 @@ ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
        if (s == NULL)
                return(NULL);
 
-#if defined(OPENSSL_THREADS) && !defined(WIN32)
+#if defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32)
        gmtime_r(&t,&data); /* should return &data, but doesn't on some systems, so we don't even look at the return value */
        ts=&data;
 #else
index d50e6157e0d7de22a1bb2732bdd3f646f2eaa0cd..266614d14fd8cbcdbf183162d1e77cc240994e07 100644 (file)
@@ -100,7 +100,7 @@ int i2d_ASN1_TIME(ASN1_TIME *a, unsigned char **pp)
 ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t)
        {
        struct tm *ts;
-#if defined(OPENSSL_THREADS) && !defined(WIN32) && !defined(__CYGWIN32__)
+#if defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32) && !defined(__CYGWIN32__)
        struct tm data;
 
        gmtime_r(&t,&data);
index 77b88e67dbf0b49c8cf2dce96e6e06d41f0f1a01..0a5a8d27536034d86d67b0a83812a6d0b4371c4a 100644 (file)
@@ -58,7 +58,7 @@
 
 #include <stdio.h>
 #include <time.h>
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
 #include <descrip.h>
 #include <lnmdef.h>
 #include <starlet.h>
@@ -191,7 +191,7 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t)
        {
        char *p;
        struct tm *ts;
-#if defined(OPENSSL_THREADS) && !defined(WIN32) && !defined(__CYGWIN32__)
+#if defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32) && !defined(__CYGWIN32__)
 
        struct tm data;
 #endif
@@ -201,13 +201,13 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t)
        if (s == NULL)
                return(NULL);
 
-#if defined(OPENSSL_THREADS) && !defined(WIN32) && !defined(__CYGWIN32__)
+#if defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32) && !defined(__CYGWIN32__)
        gmtime_r(&t,&data); /* should return &data, but doesn't on some systems, so we don't even look at the return value */
        ts=&data;
 #else
        ts=gmtime(&t);
 #endif
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
        if (ts == NULL)
                {
                static $DESCRIPTOR(tabnam,"LNM$DCL_LOGICAL");
@@ -284,7 +284,7 @@ int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t)
 
        t -= offset*60; /* FIXME: may overflow in extreme cases */
 
-#if defined(OPENSSL_THREADS) && !defined(WIN32) && !defined(__CYGWIN32__)
+#if defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32) && !defined(__CYGWIN32__)
        { struct tm data; gmtime_r(&t, &data); tm = &data; }
 #else
        tm = gmtime(&t);
index bbe32b28c93e7139ac8a7549d99b444187b91dc6..99df5c303ee233a49494e1de61e1126953c47ae2 100644 (file)
@@ -59,7 +59,7 @@
 /* define PART1, PART2, PART3 or PART4 to build only with a few of the options.
  * This is for machines with 64k code segment size restrictions. */
 
-#if !defined(MSDOS) && (!defined(VMS) || defined(__DECC))
+#if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC))
 #define TIMES
 #endif
 
@@ -82,7 +82,7 @@ OPENSSL_DECLARE_EXIT
    The __TMS macro will show if it was.  If it wasn't defined, we should
    undefine TIMES, since that tells the rest of the program how things
    should be handled.                          -- Richard Levitte */
-#if defined(VMS) && defined(__DECC) && !defined(__TMS)
+#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
 #undef TIMES
 #endif
 
@@ -322,7 +322,7 @@ int main(int argc, char **argv)
                break;
                }
        exit(0);
-#if defined(LINT) || defined(MSDOS)
+#if defined(LINT) || defined(OPENSSL_SYS_MSDOS)
        return(0);
 #endif
        }
index ecc9dff4e42ed7249d765a2c401ae477874875fd..5b2077b6430a3571c6d749dc836bd97f4a0b7ce6 100644 (file)
@@ -59,7 +59,7 @@
 /* 11-Sep-92 Andrew Daviel   Support for Silicon Graphics IRIX added */
 /* 06-Apr-92 Luke Brennan    Support for VMS and add extra signal calls */
 
-#if !defined(MSDOS) && (!defined(VMS) || defined(__DECC))
+#if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC))
 #define TIMES
 #endif
 
@@ -82,7 +82,7 @@ OPENSSL_DECLARE_EXIT
    The __TMS macro will show if it was.  If it wasn't defined, we should
    undefine TIMES, since that tells the rest of the program how things
    should be handled.                          -- Richard Levitte */
-#if defined(VMS) && defined(__DECC) && !defined(__TMS)
+#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
 #undef TIMES
 #endif
 
@@ -268,7 +268,7 @@ int main(int argc, char **argv)
        printf("Blowfish raw ecb bytes per sec = %12.3f (%9.3fuS)\n",b,8.0e6/b);
        printf("Blowfish cbc     bytes per sec = %12.3f (%9.3fuS)\n",c,8.0e6/c);
        exit(0);
-#if defined(LINT) || defined(MSDOS)
+#if defined(LINT) || defined(OPENSSL_SYS_MSDOS)
        return(0);
 #endif
        }
index 35d2e5b6f33ef1f8827391b6c481aebb5a0be97e..d4b44b62bbaac55f55c488eb6ba16dd6e78229ba 100644 (file)
@@ -65,7 +65,7 @@
 #include "cryptlib.h"
 #include <openssl/bio.h>
 
-#ifdef WIN16
+#ifdef OPENSSL_SYS_WIN16
 #define SOCKET_PROTOCOL 0 /* more microsoft stupidity */
 #else
 #define SOCKET_PROTOCOL IPPROTO_TCP
@@ -79,7 +79,7 @@
 #define MAX_LISTEN  32
 #endif
 
-#ifdef WINDOWS
+#ifdef OPENSSL_SYS_WINDOWS
 static int wsa_init_done=0;
 #endif
 
@@ -429,7 +429,7 @@ end:
 
 int BIO_sock_init(void)
        {
-#ifdef WINDOWS
+#ifdef OPENSSL_SYS_WINDOWS
        static struct WSAData wsa_state;
 
        if (!wsa_init_done)
@@ -449,13 +449,13 @@ int BIO_sock_init(void)
                        return(-1);
                        }
                }
-#endif /* WINDOWS */
+#endif /* OPENSSL_SYS_WINDOWS */
        return(1);
        }
 
 void BIO_sock_cleanup(void)
        {
-#ifdef WINDOWS
+#ifdef OPENSSL_SYS_WINDOWS
        if (wsa_init_done)
                {
                wsa_init_done=0;
@@ -465,7 +465,7 @@ void BIO_sock_cleanup(void)
 #endif
        }
 
-#if !defined(VMS) || __VMS_VER >= 70000000
+#if !defined(OPENSSL_SYS_VMS) || __VMS_VER >= 70000000
 
 int BIO_socket_ioctl(int fd, long type, unsigned long *arg)
        {
index d6b8aa313a87d709a7ab41affcbe5e22f7da3f31..0ffa4d21367f58a7374842ebca64d60f871b64be 100644 (file)
@@ -125,7 +125,7 @@ long MS_CALLBACK BIO_debug_callback(BIO *bio, int cmd, const char *argp,
        b=(BIO *)bio->cb_arg;
        if (b != NULL)
                BIO_write(b,buf,strlen(buf));
-#if !defined(OPENSSL_NO_STDIO) && !defined(WIN16)
+#if !defined(OPENSSL_NO_STDIO) && !defined(OPENSSL_SYS_WIN16)
        else
                fputs(buf,stderr);
 #endif
index 9569c7ed8d0ae715f7b731bec748865b4cebea31..8ea1db158b8b02b2720e5e59c5cb8a3703bb3e22 100644 (file)
 #include "cryptlib.h"
 #include <openssl/bio.h>
 
-#ifdef WIN16
+#ifdef OPENSSL_SYS_WIN16
 #define SOCKET_PROTOCOL 0 /* more microsoft stupidity */
 #else
 #define SOCKET_PROTOCOL IPPROTO_TCP
 #endif
 
-#if (defined(VMS) && __VMS_VER < 70000000)
+#if (defined(OPENSSL_SYS_VMS) && __VMS_VER < 70000000)
 /* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */
 #undef FIONBIO
 #endif
index 9772bc8529017ef0cb4fd8ee28f15e8cca97fac4..c41ba3cc411ee9b1f0e6a219f9d606cf3f2118db 100644 (file)
 #include "cryptlib.h"
 #include <openssl/bio.h>
 
-#ifdef WIN16
+#ifdef OPENSSL_SYS_WIN16
 #define SOCKET_PROTOCOL 0 /* more microsoft stupidity */
 #else
 #define SOCKET_PROTOCOL IPPROTO_TCP
 #endif
 
-#if (defined(VMS) && __VMS_VER < 70000000)
+#if (defined(OPENSSL_SYS_VMS) && __VMS_VER < 70000000)
 /* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */
 #undef FIONBIO
 #endif
index 47f59c467d65da5ed335ee170734555433d14236..5e3e187de6892a8ffadc919d9a6228c3d698b6b5 100644 (file)
@@ -223,7 +223,7 @@ int BIO_fd_should_retry(int i)
                {
                err=get_last_sys_error();
 
-#if defined(WINDOWS) && 0 /* more microsoft stupidity? perhaps not? Ben 4/1/99 */
+#if defined(OPENSSL_SYS_WINDOWS) && 0 /* more microsoft stupidity? perhaps not? Ben 4/1/99 */
                if ((i == -1) && (err == 0))
                        return(1);
 #endif
index cbfe74a5eb1f556dbee32c992f7493b9369da584..f31e0a50ee170d97073a6d84493fbcc88972a0e7 100644 (file)
@@ -204,7 +204,7 @@ static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, void *ptr)
                b->shutdown=(int)num&BIO_CLOSE;
                b->ptr=(char *)ptr;
                b->init=1;
-#if defined(MSDOS) || defined(WINDOWS)
+#if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WINDOWS)
                /* Set correct text/binary mode */
                if (num & BIO_FP_TEXT)
                        _setmode(fileno((FILE *)ptr),_O_TEXT);
@@ -233,7 +233,7 @@ static long MS_CALLBACK file_ctrl(BIO *b, int cmd, long num, void *ptr)
                        ret=0;
                        break;
                        }
-#if defined(MSDOS) || defined(WINDOWS)
+#if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WINDOWS)
                if (!(num & BIO_FP_TEXT))
                        strcat(p,"b");
                else
index 1edf16a76fd807ae922b8360ee419e795158cb0f..b289c97d3cc43d92b5a34cfc081c66f8d7596049 100644 (file)
 #include <stdio.h>
 #include <errno.h>
 
-#if defined(WIN32)
+#include <openssl/opensslconf.h>
+
+#if defined(OPENSSL_SYS_WIN32)
 #  include <process.h>
-#elif defined(VMS) || defined(__VMS)
+#elif defined(OPENSSL_SYS_VMS)
 #  include <opcdef.h>
 #  include <descrip.h>
 #  include <lib$routines.h>
@@ -85,7 +87,7 @@
 
 #ifndef NO_SYSLOG
 
-#if defined(WIN32)
+#if defined(OPENSSL_SYS_WIN32)
 #define LOG_EMERG      0
 #define LOG_ALERT      1
 #define LOG_CRIT       2
@@ -96,7 +98,7 @@
 #define LOG_DEBUG      7
 
 #define LOG_DAEMON     (3<<3)
-#elif defined(VMS)
+#elif defined(OPENSSL_SYS_VMS)
 /* On VMS, we don't really care about these, but we need them to compile */
 #define LOG_EMERG      0
 #define LOG_ALERT      1
@@ -118,7 +120,7 @@ static int MS_CALLBACK slg_free(BIO *data);
 static void xopenlog(BIO* bp, char* name, int level);
 static void xsyslog(BIO* bp, int priority, const char* string);
 static void xcloselog(BIO* bp);
-#ifdef WIN32
+#ifdef OPENSSL_SYS_WIN32
 LONG   (WINAPI *go_for_advapi)()       = RegOpenKeyEx;
 HANDLE (WINAPI *register_event_source)()       = NULL;
 BOOL   (WINAPI *deregister_event_source)()     = NULL;
@@ -241,7 +243,7 @@ static int MS_CALLBACK slg_puts(BIO *bp, const char *str)
        return(ret);
        }
 
-#if defined(WIN32)
+#if defined(OPENSSL_SYS_WIN32)
 
 static void xopenlog(BIO* bp, char* name, int level)
 {
@@ -313,7 +315,7 @@ static void xcloselog(BIO* bp)
        bp->ptr= NULL;
 }
 
-#elif defined(VMS)
+#elif defined(OPENSSL_SYS_VMS)
 
 static int VMS_OPC_target = LOG_DAEMON;
 
index 727378ad934df9401c935699817006c9f66e65cb..fdabd16d7eaab7e97435ee4063b6fd72401a2a96 100644 (file)
@@ -228,7 +228,7 @@ int BIO_sock_should_retry(int i)
                {
                err=get_last_socket_error();
 
-#if defined(WINDOWS) && 0 /* more microsoft stupidity? perhaps not? Ben 4/1/99 */
+#if defined(OPENSSL_SYS_WINDOWS) && 0 /* more microsoft stupidity? perhaps not? Ben 4/1/99 */
                if ((i == -1) && (err == 0))
                        return(1);
 #endif
@@ -242,7 +242,7 @@ int BIO_sock_non_fatal_error(int err)
        {
        switch (err)
                {
-#if defined(WINDOWS)
+#if defined(OPENSSL_SYS_WINDOWS)
 # if defined(WSAEWOULDBLOCK)
        case WSAEWOULDBLOCK:
 # endif
index 20fc7e08ff8f02591edbcd122b5ad8bb70617626..2c816671542b115633b2eb59e6ac05115eceb7de 100644 (file)
@@ -71,7 +71,7 @@
 #include <openssl/crypto.h>
 #include <openssl/err.h>
 
-#if !defined(MSDOS) && (!defined(VMS) || defined(__DECC))
+#if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC))
 #define TIMES
 #endif
 
@@ -87,7 +87,7 @@
    The __TMS macro will show if it was.  If it wasn't defined, we should
    undefine TIMES, since that tells the rest of the program how things
    should be handled.                          -- Richard Levitte */
-#if defined(VMS) && defined(__DECC) && !defined(__TMS)
+#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
 #undef TIMES
 #endif
 
index 0487a2b9098ec65ee7c99487ea9044562c01884b..3228618b23bf74ce80cb400062d7b36793bb4c2d 100644 (file)
@@ -68,7 +68,7 @@
 #include <openssl/x509.h>
 #include <openssl/err.h>
 
-#ifdef WINDOWS
+#ifdef OPENSSL_SYS_WINDOWS
 #include "../bio/bss_file.c"
 #endif
 
index fead8e60366cd17f438a1914d888af4572461df8..91dc7ff9a7c7c4f85f1d8593a7fd2b9b2f30f0cd 100644 (file)
@@ -97,7 +97,7 @@ static void genprime_cb(int p, int n, void *arg);
 #include <openssl/err.h>
 #include <openssl/rand.h>
 
-#if !defined(MSDOS) && (!defined(VMS) || defined(__DECC))
+#if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC))
 #define TIMES
 #endif
 
@@ -113,7 +113,7 @@ static void genprime_cb(int p, int n, void *arg);
    The __TMS macro will show if it was.  If it wasn't defined, we should
    undefine TIMES, since that tells the rest of the program how things
    should be handled.                          -- Richard Levitte */
-#if defined(VMS) && defined(__DECC) && !defined(__TMS)
+#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
 #undef TIMES
 #endif
 
index 3e86f2ea0e0b3897a24e437b38a73824e1993110..5ca570d1a8a23daa3846ba16af5dc6c71cc9329c 100644 (file)
@@ -63,7 +63,7 @@
 #include <openssl/bn.h>
 #include <openssl/rand.h>
 #include <openssl/err.h>
-#ifdef WINDOWS
+#ifdef OPENSSL_SYS_WINDOWS
 #include "../bio/bss_file.c"
 #endif
 
index 3da4622b1335cd98eaec4fa20b07d1f868406ad8..4b63149bf3eb4b27f5665c50a892f2c54acd76c4 100644 (file)
@@ -60,7 +60,7 @@
 bn_div_words_abort(int i)
 {
 #ifdef BN_DEBUG
-#if !defined(OPENSSL_NO_STDIO) && !defined(WIN16)
+#if !defined(OPENSSL_NO_STDIO) && !defined(OPENSSL_SYS_WIN16)
        fprintf(stderr,"Division would overflow (%d)\n",i);
 #endif
        abort();
index 0af915cf206d8499f73abcf2fcd1206da311ba93..6e00b90f9d4141e8e7a35bf758cbc30d12c9adee 100644 (file)
@@ -59,7 +59,7 @@
 /* 11-Sep-92 Andrew Daviel   Support for Silicon Graphics IRIX added */
 /* 06-Apr-92 Luke Brennan    Support for VMS and add extra signal calls */
 
-#if !defined(MSDOS) && (!defined(VMS) || defined(__DECC))
+#if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC))
 #define TIMES
 #endif
 
@@ -82,7 +82,7 @@ OPENSSL_DECLARE_EXIT
    The __TMS macro will show if it was.  If it wasn't defined, we should
    undefine TIMES, since that tells the rest of the program how things
    should be handled.                          -- Richard Levitte */
-#if defined(VMS) && defined(__DECC) && !defined(__TMS)
+#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
 #undef TIMES
 #endif
 
@@ -268,7 +268,7 @@ int main(int argc, char **argv)
        printf("CAST raw ecb bytes per sec = %12.2f (%9.3fuS)\n",b,8.0e6/b);
        printf("CAST cbc     bytes per sec = %12.2f (%9.3fuS)\n",c,8.0e6/c);
        exit(0);
-#if defined(LINT) || defined(MSDOS)
+#if defined(LINT) || defined(OPENSSL_SYS_MSDOS)
        return(0);
 #endif
        }
index c7837966101dd145e08bb9f2b71f5067d45c88fa..1b858d153bb9643932b34a1c4aeb925bf9fc9874 100644 (file)
@@ -59,7 +59,7 @@
 /* define PART1, PART2, PART3 or PART4 to build only with a few of the options.
  * This is for machines with 64k code segment size restrictions. */
 
-#if !defined(MSDOS) && (!defined(VMS) || defined(__DECC))
+#if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC))
 #define TIMES
 #endif
 
@@ -82,7 +82,7 @@ OPENSSL_DECLARE_EXIT
    The __TMS macro will show if it was.  If it wasn't defined, we should
    undefine TIMES, since that tells the rest of the program how things
    should be handled.                          -- Richard Levitte */
-#if defined(VMS) && defined(__DECC) && !defined(__TMS)
+#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
 #undef TIMES
 #endif
 
@@ -332,7 +332,7 @@ int main(int argc, char **argv)
                break;
                }
        exit(0);
-#if defined(LINT) || defined(MSDOS)
+#if defined(LINT) || defined(OPENSSL_SYS_MSDOS)
        return(0);
 #endif
        }
index c2ff6c701120b80521d8bf41a313ffa02c17dd09..cd2f8a491b933154f17992eb2a17f2f07fb64517 100644 (file)
@@ -48,14 +48,14 @@ static COMP_METHOD zlib_method={
  * work.  Therefore, all ZLIB routines are loaded at run time
  * and we do not link to a .LIB file.
  */
-#if defined(WINDOWS) || defined(WIN32)
+#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32)
 # include <windows.h>
 
 # define Z_CALLCONV _stdcall
 # define ZLIB_SHARED
 #else
 # define Z_CALLCONV
-#endif /* !(WINDOWS || WIN32) */
+#endif /* !(OPENSSL_SYS_WINDOWS || OPENSSL_SYS_WIN32) */
 
 #ifdef ZLIB_SHARED
 #include <openssl/dso.h>
@@ -188,7 +188,7 @@ COMP_METHOD *COMP_zlib(void)
 #ifdef ZLIB_SHARED
        if (!zlib_loaded)
                {
-#if defined(WINDOWS) || defined(WIN32)
+#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32)
                zlib_dso = DSO_load(NULL, "ZLIB", NULL, 0);
 #else
                zlib_dso = DSO_load(NULL, "z", NULL, 0);
index 59f9476dc6c77209a9f06424d0cd43fdd0d184e5..87335a9daa1a34e860f5426184d7d8e709718dfd 100644 (file)
@@ -185,7 +185,7 @@ static int def_load(CONF *conf, const char *name, long *line)
        int ret;
        BIO *in=NULL;
 
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
        in=BIO_new_file(name, "r");
 #else
        in=BIO_new_file(name, "rb");
index 48803bc186364cbaf64c09721497c5f620ccfab2..8e4d673fb877c6a372a9105024b134e6f0762fea 100644 (file)
@@ -81,7 +81,7 @@ LHASH *CONF_load(LHASH *conf, const char *file, long *eline)
        LHASH *ltmp;
        BIO *in=NULL;
 
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
        in=BIO_new_file(file, "r");
 #else
        in=BIO_new_file(file, "rb");
index 8634c078d8f376a55b7b19c5ea1482bb5acb77f6..11ac630c225ad1d8dcad39acdc3ef9a4246ea8c4 100644 (file)
@@ -62,7 +62,7 @@
 #include <openssl/crypto.h>
 #include <openssl/safestack.h>
 
-#if defined(WIN32) || defined(WIN16)
+#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN16)
 static double SSLeay_MSVC5_hack=0.0; /* and for VC1.5 */
 #endif
 
@@ -133,7 +133,7 @@ int CRYPTO_get_new_lockid(char *name)
        char *str;
        int i;
 
-#if defined(WIN32) || defined(WIN16)
+#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN16)
        /* A hack to make Visual C++ 5.0 work correctly when linking as
         * a DLL using /MT. Without this, the application cannot use
         * and floating point printf's.
@@ -354,9 +354,9 @@ unsigned long CRYPTO_thread_id(void)
 
        if (id_callback == NULL)
                {
-#ifdef WIN16
+#ifdef OPENSSL_SYS_WIN16
                ret=(unsigned long)GetCurrentTask();
-#elif defined(WIN32)
+#elif defined(OPENSSL_SYS_WIN32)
                ret=(unsigned long)GetCurrentThreadId();
 #elif defined(GETPID_IS_MEANINGLESS)
                ret=1L;
@@ -464,7 +464,7 @@ const char *CRYPTO_get_lock_name(int type)
        }
 
 #ifdef _DLL
-#ifdef WIN32
+#ifdef OPENSSL_SYS_WIN32
 
 /* All we really need to do is remove the 'error' state when a thread
  * detaches */
index 5eff5d31412e53d3f6bea3f340cf3bed95e5b78b..ffca3c8c53bf9fd044e71307c7246730bbe6753d 100644 (file)
@@ -74,7 +74,7 @@
 extern "C" {
 #endif
 
-#ifndef VMS
+#ifndef OPENSSL_SYS_VMS
 #define X509_CERT_AREA         OPENSSLDIR
 #define X509_CERT_DIR          OPENSSLDIR "/certs"
 #define X509_CERT_FILE         OPENSSLDIR "/cert.pem"
index 215d7413c0766bd13ecbe7a02d02fe7a7cd0b5df..eebc3a71d61be660ef4a58d391cc7bcd4161cdba 100644 (file)
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#ifndef MSDOS
-#ifndef VMS
 #include <openssl/opensslconf.h>
+#ifndef OPENSSL_SYS_MSDOS
+#ifndef OPENSSL_SYS_VMS
 #include OPENSSL_UNISTD
-#else /* VMS */
+#else /* OPENSSL_SYS_VMS */
 #ifdef __DECC
 #include <unistd.h>
 #else /* not __DECC */
 #include <math.h>
 #endif /* __DECC */
-#endif /* VMS */
-#else /* MSDOS */
+#endif /* OPENSSL_SYS_VMS */
+#else /* OPENSSL_SYS_MSDOS */
 #include <io.h>
 #endif
 
 #include <time.h>
 #include "des_ver.h"
 
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
 #include <types.h>
 #include <stat.h>
 #else
@@ -99,7 +99,7 @@ int uudecode(unsigned char *in,int num,unsigned char *out);
 void des_3cbc_encrypt(des_cblock *input,des_cblock *output,long length,
        des_key_schedule sk1,des_key_schedule sk2,
        des_cblock *ivec1,des_cblock *ivec2,int enc);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
 #define EXIT(a) exit(a&0x10000000L)
 #else
 #define EXIT(a) exit(a)
@@ -258,12 +258,12 @@ int main(int argc, char **argv)
 #endif                 
        if (    (in != NULL) &&
                (out != NULL) &&
-#ifndef MSDOS
+#ifndef OPENSSL_SYS_MSDOS
                (stat(in,&ins) != -1) &&
                (stat(out,&outs) != -1) &&
                (ins.st_dev == outs.st_dev) &&
                (ins.st_ino == outs.st_ino))
-#else /* MSDOS */
+#else /* OPENSSL_SYS_MSDOS */
                (strcmp(in,out) == 0))
 #endif
                        {
@@ -298,7 +298,7 @@ int main(int argc, char **argv)
                EXIT(5);
                }
 
-#ifdef MSDOS
+#ifdef OPENSSL_SYS_MSDOS
        /* This should set the file to binary mode. */
        {
 #include <fcntl.h>
@@ -367,7 +367,7 @@ void doencryption(void)
        des_cblock kk,k2;
        FILE *O;
        int Exit=0;
-#ifndef MSDOS
+#ifndef OPENSSL_SYS_MSDOS
        static unsigned char buf[BUFSIZE+8],obuf[BUFSIZE+8];
 #else
        static unsigned char *buf=NULL,*obuf=NULL;
index c75bc52c7aa20e84284083246b08648cf0235eda..5a9ba36fb328a1372bec5d91331ec5b6781aa1a8 100644 (file)
@@ -60,8 +60,8 @@
 #define HEADER_DES_LOCL_H
 
 #if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN16)
-#ifndef MSDOS
-#define MSDOS
+#ifndef OPENSSL_SYS_MSDOS
+#define OPENSSL_SYS_MSDOS
 #endif
 #endif
 
@@ -70,8 +70,8 @@
 
 #include <openssl/opensslconf.h>
 
-#ifndef MSDOS
-#if !defined(VMS) || defined(__DECC)
+#ifndef OPENSSL_SYS_MSDOS
+#if !defined(OPENSSL_SYS_VMS) || defined(__DECC)
 #ifdef OPENSSL_UNISTD
 # include OPENSSL_UNISTD
 #else
 #endif
 #include <openssl/des.h>
 
-#ifdef MSDOS           /* Visual C++ 2.1 (Windows NT/95) */
+#ifdef OPENSSL_SYS_MSDOS               /* Visual C++ 2.1 (Windows NT/95) */
 #include <stdlib.h>
 #include <errno.h>
 #include <time.h>
 #include <io.h>
 #endif
 
-#if defined(__STDC__) || defined(VMS) || defined(M_XENIX) || defined(MSDOS)
+#if defined(__STDC__) || defined(OPENSSL_SYS_VMS) || defined(M_XENIX) || defined(OPENSSL_SYS_MSDOS)
 #include <string.h>
 #endif
 
index b2ca7ac31d6c08d3176c05724bfe7c1740851394..c1076757bb089f0f226aa7f87d5a8a63414df6d9 100644 (file)
 /* define PART1, PART2, PART3 or PART4 to build only with a few of the options.
  * This is for machines with 64k code segment size restrictions. */
 
-#if !defined(MSDOS) && (!defined(VMS) || defined(__DECC))
+#if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC))
 #define TIMES
 #endif
 
 #include <stdio.h>
-#ifndef MSDOS
+#ifndef OPENSSL_SYS_MSDOS
 #include <openssl/e_os2.h>
 #include OPENSSL_UNISTD
 #else
@@ -84,7 +84,7 @@ extern void exit();
    The __TMS macro will show if it was.  If it wasn't defined, we should
    undefine TIMES, since that tells the rest of the program how things
    should be handled.                          -- Richard Levitte */
-#if defined(VMS) && defined(__DECC) && !defined(__TMS)
+#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
 #undef TIMES
 #endif
 
@@ -598,7 +598,7 @@ int main(int argc, char **argv)
                break;
                }
        exit(0);
-#if defined(LINT) || defined(MSDOS)
+#if defined(LINT) || defined(OPENSSL_SYS_MSDOS)
        return(0);
 #endif
        }
index 2debef304a13953dd2a39fefa4d356cd73b1a382..6f60e080fffabab891ae5784b57b9e867b870458 100644 (file)
@@ -56,9 +56,9 @@
  * [including the GNU Public Licence.]
  */
 
-#if defined(WIN32) || defined(WIN16) || defined(WINDOWS)
-#ifndef MSDOS
-#define MSDOS
+#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN16) || defined(OPENSSL_SYS_WINDOWS)
+#ifndef OPENSSL_SYS_MSDOS
+#define OPENSSL_SYS_MSDOS
 #endif
 #endif
 
index b9d8029b8eac41664d77d9930e60936985b657b7..dc848f5af3b7f0bff3d6e23ca2f9fb516f159bed 100644 (file)
@@ -56,7 +56,7 @@
  * [including the GNU Public Licence.]
  */
 
-#if !defined(MSDOS) && !defined(VMS) && !defined(WIN32)
+#if !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_VMS) && !defined(OPENSSL_SYS_WIN32)
 #include <openssl/opensslconf.h>
 #ifdef OPENSSL_UNISTD
 # include OPENSSL_UNISTD
@@ -78,7 +78,7 @@
 /* #define SIGACTION */ /* Define this if you have sigaction() */
 
 #ifdef WIN16TTY
-#undef WIN16
+#undef OPENSSL_SYS_WIN16
 #undef _WINDOWS
 #include <graph.h>
 #endif
@@ -92,7 +92,7 @@
 #include <setjmp.h>
 #include <errno.h>
 
-#ifdef VMS                     /* prototypes for sys$whatever */
+#ifdef OPENSSL_SYS_VMS                 /* prototypes for sys$whatever */
 #include <starlet.h>
 #ifdef __DECC
 #pragma message disable DOLLARID
 #undef  SGTTY
 #endif
 
-#if !defined(TERMIO) && !defined(TERMIOS) && !defined(VMS) && !defined(MSDOS) && !defined(MAC_OS_pre_X) && !defined(MAC_OS_GUSI_SOURCE)
+#if !defined(TERMIO) && !defined(TERMIOS) && !defined(OPENSSL_SYS_VMS) && !defined(OPENSSL_SYS_MSDOS) && !defined(MAC_OS_pre_X) && !defined(MAC_OS_GUSI_SOURCE)
 #undef  TERMIOS
 #undef  TERMIO
 #define SGTTY
 #define TTY_set(tty,data)      ioctl(tty,TIOCSETP,data)
 #endif
 
-#if !defined(_LIBC) && !defined(MSDOS) && !defined(VMS) && !defined(MAC_OS_pre_X)
+#if !defined(_LIBC) && !defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_VMS) && !defined(MAC_OS_pre_X)
 #include <sys/ioctl.h>
 #endif
 
-#if defined(MSDOS) && !defined(__CYGWIN32__)
+#if defined(OPENSSL_SYS_MSDOS) && !defined(__CYGWIN32__)
 #include <conio.h>
 #define fgets(a,b,c) noecho_fgets(a,b,c)
 #endif
 
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
 #include <ssdef.h>
 #include <iodef.h>
 #include <ttdef.h>
@@ -195,7 +195,7 @@ static void read_till_nl(FILE *);
 static void recsig(int);
 static void pushsig(void);
 static void popsig(void);
-#if defined(MSDOS) && !defined(WIN16)
+#if defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_WIN16)
 static int noecho_fgets(char *buf, int size, FILE *tty);
 #endif
 #ifdef SIGACTION
@@ -216,7 +216,7 @@ int des_read_pw_string(char *buf, int length, const char *prompt,
        return(ret);
        }
 
-#ifndef WIN16
+#ifndef OPENSSL_SYS_WIN16
 
 static void read_till_nl(FILE *in)
        {
@@ -233,14 +233,14 @@ static void read_till_nl(FILE *in)
 int des_read_pw(char *buf, char *buff, int size, const char *prompt,
             int verify)
        {
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
        struct IOSB iosb;
        $DESCRIPTOR(terminal,"TT");
        long tty_orig[3], tty_new[3];
        long status;
        unsigned short channel = 0;
 #else
-#ifndef MSDOS
+#ifndef OPENSSL_SYS_MSDOS
        TTY_STRUCT tty_orig,tty_new;
 #endif
 #endif
@@ -265,7 +265,7 @@ int des_read_pw(char *buf, char *buff, int size, const char *prompt,
        is_a_tty=1;
        tty=NULL;
 
-#ifdef MSDOS
+#ifdef OPENSSL_SYS_MSDOS
        if ((tty=fopen("con","r")) == NULL)
                tty=stdin;
 #elif defined(MAC_OS_pre_X)
@@ -277,7 +277,7 @@ int des_read_pw(char *buf, char *buff, int size, const char *prompt,
                tty=stdin;
 #endif
 
-#if defined(TTY_get) && !defined(VMS)
+#if defined(TTY_get) && !defined(OPENSSL_SYS_VMS)
        if (TTY_get(fileno(tty),&tty_orig) == -1)
                {
 #ifdef ENOTTY
@@ -296,7 +296,7 @@ int des_read_pw(char *buf, char *buff, int size, const char *prompt,
                }
        memcpy(&(tty_new),&(tty_orig),sizeof(tty_orig));
 #endif
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
        status = sys$assign(&terminal,&channel,0,0);
        if (status != SS$_NORMAL)
                return(-1);
@@ -312,7 +312,7 @@ int des_read_pw(char *buf, char *buff, int size, const char *prompt,
        tty_new.TTY_FLAGS &= ~ECHO;
 #endif
 
-#if defined(TTY_set) && !defined(VMS)
+#if defined(TTY_set) && !defined(OPENSSL_SYS_VMS)
        if (is_a_tty && (TTY_set(fileno(tty),&tty_new) == -1))
 #ifdef OPENSSL_SYS_MPE 
                ; /* MPE lies -- echo really has been disabled */
@@ -320,7 +320,7 @@ int des_read_pw(char *buf, char *buff, int size, const char *prompt,
                return(-1);
 #endif
 #endif
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
        tty_new[0] = tty_orig[0];
        tty_new[1] = tty_orig[1] | TT$M_NOECHO;
        tty_new[2] = tty_orig[2];
@@ -370,10 +370,10 @@ error:
        perror("fgets(tty)");
 #endif
        /* What can we do if there is an error? */
-#if defined(TTY_set) && !defined(VMS)
+#if defined(TTY_set) && !defined(OPENSSL_SYS_VMS)
        if (ps >= 2) TTY_set(fileno(tty),&tty_orig);
 #endif
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
        if (ps >= 2)
                status = sys$qiow(0,channel,IO$_SETMODE,&iosb,0,0
                        ,tty_orig,12,0,0,0,0);
@@ -381,13 +381,13 @@ error:
        
        if (ps >= 1) popsig();
        if (stdin != tty) fclose(tty);
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
        status = sys$dassgn(channel);
 #endif
        return(!ok);
        }
 
-#else /* WIN16 */
+#else /* OPENSSL_SYS_WIN16 */
 
 int des_read_pw(char *buf, char *buff, int size, char *prompt, int verify)
        { 
@@ -460,7 +460,7 @@ static void recsig(int i)
 #endif
        }
 
-#if defined(MSDOS) && !defined(WIN16)
+#if defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_WIN16)
 static int noecho_fgets(char *buf, int size, FILE *tty)
        {
        int i;
index 814b86f4aee517cb4177bdce8d350f050d5d0d38..1c58b76d871aed78770265874b29d0a362c004ab 100644 (file)
@@ -59,7 +59,7 @@
 /* 11-Sep-92 Andrew Daviel   Support for Silicon Graphics IRIX added */
 /* 06-Apr-92 Luke Brennan    Support for VMS and add extra signal calls */
 
-#if !defined(MSDOS) && (!defined(VMS) || defined(__DECC))
+#if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC))
 #define TIMES
 #endif
 
@@ -82,7 +82,7 @@ OPENSSL_DECLARE_EXIT
    The __TMS macro will show if it was.  If it wasn't defined, we should
    undefine TIMES, since that tells the rest of the program how things
    should be handled.                          -- Richard Levitte */
-#if defined(VMS) && defined(__DECC) && !defined(__TMS)
+#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
 #undef TIMES
 #endif
 
@@ -304,7 +304,7 @@ int main(int argc, char **argv)
        printf("DES ede cbc bytes  per sec = %12.2f (%9.3fuS)\n",d,8.0e6/d);
        printf("crypt              per sec = %12.2f (%9.3fuS)\n",e,1.0e6/e);
        exit(0);
-#if defined(LINT) || defined(MSDOS)
+#if defined(LINT) || defined(OPENSSL_SYS_MSDOS)
        return(0);
 #endif
        }
index ebc3f44e8cfc66cd266288cc7d51c2cc3d13aa35..e90f255f6c890c5e7968da88e03a0357b43fca3e 100644 (file)
@@ -59,7 +59,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#ifdef WINDOWS
+#ifdef OPENSSL_SYS_WINDOWS
 #include "../bio/bss_file.c" 
 #endif
 #include <openssl/crypto.h>
@@ -76,7 +76,7 @@ int main(int argc, char *argv[])
 #else
 #include <openssl/dh.h>
 
-#ifdef WIN16
+#ifdef OPENSSL_SYS_WIN16
 #define MS_CALLBACK    _far _loadds
 #else
 #define MS_CALLBACK
@@ -99,7 +99,7 @@ int main(int argc, char *argv[])
        int i,alen,blen,aout,bout,ret=1;
        BIO *out;
 
-#ifdef WIN32
+#ifdef OPENSSL_SYS_WIN32
        CRYPTO_malloc_init();
 #endif
 
index c615e593214aff9dc853312c71a201dadc323a36..fdac63275fb7edce8b6a33f0de9e5545aa6485cd 100644 (file)
@@ -65,7 +65,7 @@
 #include <openssl/rand.h>
 #include <openssl/bio.h>
 #include <openssl/err.h>
-#ifdef WINDOWS
+#ifdef OPENSSL_SYS_WINDOWS
 #include "../bio/bss_file.c"
 #endif
 
@@ -78,7 +78,7 @@ int main(int argc, char *argv[])
 #else
 #include <openssl/dsa.h>
 
-#ifdef WIN16
+#ifdef OPENSSL_SYS_WIN16
 #define MS_CALLBACK     _far _loadds
 #else
 #define MS_CALLBACK
index b8fee7de3c1984de65d878b19ea432a40be0a804..f492202793ef804233579530a55aba2ebe9987d7 100644 (file)
@@ -59,7 +59,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <errno.h>
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
 #pragma message disable DOLLARID
 #include <lib$routines.h>
 #include <libfisdef.h>
@@ -70,7 +70,7 @@
 #include "cryptlib.h"
 #include <openssl/dso.h>
 
-#ifndef VMS
+#ifndef OPENSSL_SYS_VMS
 DSO_METHOD *DSO_METHOD_vms(void)
        {
        return NULL;
@@ -369,4 +369,4 @@ static char *vms_name_converter(DSO *dso, const char *filename)
        return(filename);
        }
 
-#endif /* VMS */
+#endif /* OPENSSL_SYS_VMS */
index e7d0a2be2835c8aba4eee35b04d5661423df3a55..1e9fd91e0c42f1a04d5bbf1ac4e79142b047a20c 100644 (file)
@@ -61,7 +61,7 @@
 #include "cryptlib.h"
 #include <openssl/dso.h>
 
-#ifndef WIN32
+#ifndef OPENSSL_SYS_WIN32
 DSO_METHOD *DSO_METHOD_win32(void)
        {
        return NULL;
@@ -273,4 +273,4 @@ static char *win32_name_converter(DSO *dso, const char *filename)
        return(translated);
        }
 
-#endif /* WIN32 */
+#endif /* OPENSSL_SYS_WIN32 */
index de74b47890ee3ed74d9357d2eac404671da38f99..4f7a2ce4ac7c5988407830b220aedaff5a4e695b 100644 (file)
@@ -177,7 +177,7 @@ static ERR_STRING_DATA ERR_str_functs[]=
        {ERR_PACK(0,SYS_F_BIND,0),              "bind"},
        {ERR_PACK(0,SYS_F_LISTEN,0),            "listen"},
        {ERR_PACK(0,SYS_F_ACCEPT,0),            "accept"},
-#ifdef WINDOWS
+#ifdef OPENSSL_SYS_WINDOWS
        {ERR_PACK(0,SYS_F_WSASTARTUP,0),        "WSAstartup"},
 #endif
        {ERR_PACK(0,SYS_F_OPENDIR,0),           "opendir"},
index 301946b19846c82d0d9a4c4a2aa4b1c2df74ce03..755c7d8b9bf651eb833d95bcaad5910c43ef4384 100644 (file)
@@ -59,7 +59,7 @@
 /* 11-Sep-92 Andrew Daviel   Support for Silicon Graphics IRIX added */
 /* 06-Apr-92 Luke Brennan    Support for VMS and add extra signal calls */
 
-#if !defined(MSDOS) && (!defined(VMS) || defined(__DECC))
+#if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC))
 #define TIMES
 #endif
 
@@ -82,7 +82,7 @@ OPENSSL_DECLARE_EXIT
    The __TMS macro will show if it was.  If it wasn't defined, we should
    undefine TIMES, since that tells the rest of the program how things
    should be handled.                          -- Richard Levitte */
-#if defined(VMS) && defined(__DECC) && !defined(__TMS)
+#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
 #undef TIMES
 #endif
 
@@ -289,7 +289,7 @@ int main(int argc, char **argv)
        printf("IDEA raw ecb bytes   per sec = %12.2f (%9.3fuS)\n",b,8.0e6/b);
        printf("IDEA cbc     bytes   per sec = %12.2f (%9.3fuS)\n",c,8.0e6/c);
        exit(0);
-#if defined(LINT) || defined(MSDOS)
+#if defined(LINT) || defined(OPENSSL_SYS_MSDOS)
        return(0);
 #endif
        }
index 378d59c4c8ec32e3e3a21e0b6e8970835b534e00..3900bfeec3c27f65dd14c06cae139c70f6515130 100644 (file)
@@ -294,7 +294,7 @@ static void ssleay_rand_add(const void *buf, int num, double add)
            entropy += add;
        if (!add_do_not_lock) CRYPTO_w_unlock(CRYPTO_LOCK_RAND);
        
-#if !defined(OPENSSL_THREADS) && !defined(WIN32)
+#if !defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32)
        assert(md_c[1] == md_count[1]);
 #endif
        }
index 38816f8e079bc3383378aa42150fab47fd7dfb88..c4b8bae2ed5558f8c0d62f8a07ad3dd14be39268 100644 (file)
@@ -93,7 +93,7 @@
  *   RAND_egd() is a wrapper for RAND_egd_bytes() with numbytes=255.
  */
 
-#if defined(WIN32) || defined(VMS) || defined(__VMS)
+#if defined(OPENSSL_SYS_WIN32) || defined(VMS) || defined(__VMS)
 int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes)
        {
        return(-1);
index 8e48561354e22fa038a460e9dc6fe97a712d266b..63b5efc32ca2d93c0610b72915f4644034681a99 100644 (file)
 #include <openssl/rand.h>
 #include "rand_lcl.h"
 
-#if !(defined(WINDOWS) || defined(WIN32) || defined(VMS))
+#if !(defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS))
 
 #include <sys/types.h>
 #include <sys/time.h>
index 9c1dea0870600833e1ecabcac6b9a6cd3eace43a..5e2e2b157bda7f4ae0642633375f3b49c1c37143 100644 (file)
@@ -59,7 +59,7 @@
 #include <openssl/rand.h>
 #include "rand_lcl.h"
 
-#if defined(VMS)
+#if defined(OPENSSL_SYS_VMS)
 
 /* For now, this does nothing.  I'm searching for a good random device,
    then we'll see. */
index 56558c4f154a865b487610200c2ad120899b4947..a688467e022e8b55a366aae996a3cf58624aeb94 100644 (file)
 #include <openssl/rand.h>
 #include "rand_lcl.h"
 
-#if defined(WINDOWS) || defined(WIN32)
+#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32)
 #include <windows.h>
 #ifndef _WIN32_WINNT
 # define _WIN32_WINNT 0x0400
index 0a4005bd4e3f5b1308d13e64bfccb360e0dd1023..9ccf4663cb0dc345d4ddc8766388a5afb5804498 100644 (file)
@@ -61,7 +61,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
 #include <unixio.h>
 #endif
 #ifndef NO_SYS_TYPES_H
@@ -136,7 +136,7 @@ int RAND_write_file(const char *file)
        FILE *out = NULL;
        int n;
        
-#if defined(O_CREAT) && !defined(WIN32)
+#if defined(O_CREAT) && !defined(OPENSSL_SYS_WIN32)
        /* For some reason Win32 can't write to files created this way */
        
        /* chmod(..., 0600) is too late to protect the file,
@@ -168,7 +168,7 @@ int RAND_write_file(const char *file)
                ret+=i;
                if (n <= 0) break;
                 }
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
        /* Try to delete older versions of the file, until there aren't
           any */
        {
@@ -186,7 +186,7 @@ int RAND_write_file(const char *file)
                                      some point... */
                }
        }
-#endif /* VMS */
+#endif /* OPENSSL_SYS_VMS */
 
        fclose(out);
        memset(buf,0,BUFSIZE);
@@ -214,7 +214,7 @@ const char *RAND_file_name(char *buf, int size)
                if (s != NULL && (strlen(s)+strlen(RFILE)+2 < size))
                        {
                        strcpy(buf,s);
-#ifndef VMS
+#ifndef OPENSSL_SYS_VMS
                        strcat(buf,"/");
 #endif
                        strcat(buf,RFILE);
index 9f7f5ccfa347a9d8fb2d6e7741d533a51c6a1af0..866251e68bc3849daf548ebdca3aa0217f4a1eab 100644 (file)
@@ -59,7 +59,7 @@
 /* 11-Sep-92 Andrew Daviel   Support for Silicon Graphics IRIX added */
 /* 06-Apr-92 Luke Brennan    Support for VMS and add extra signal calls */
 
-#if !defined(MSDOS) && (!defined(VMS) || defined(__DECC))
+#if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC))
 #define TIMES
 #endif
 
@@ -82,7 +82,7 @@ OPENSSL_DECLARE_EXIT
    The __TMS macro will show if it was.  If it wasn't defined, we should
    undefine TIMES, since that tells the rest of the program how things
    should be handled.                          -- Richard Levitte */
-#if defined(VMS) && defined(__DECC) && !defined(__TMS)
+#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
 #undef TIMES
 #endif
 
@@ -268,7 +268,7 @@ int main(int argc, char **argv)
        printf("RC2 raw ecb bytes per sec = %12.2f (%9.3fuS)\n",b,8.0e6/b);
        printf("RC2 cbc     bytes per sec = %12.2f (%9.3fuS)\n",c,8.0e6/c);
        exit(0);
-#if defined(LINT) || defined(MSDOS)
+#if defined(LINT) || defined(OPENSSL_SYS_MSDOS)
        return(0);
 #endif
        }
index bfb0a3c1f91f3938b979e8f3511a58b63b2464c2..75616c3179bb6894b45a64ae25269f8bfacc757a 100644 (file)
@@ -141,7 +141,7 @@ bad:
                        }
                }
                
-#ifdef MSDOS
+#ifdef OPENSSL_SYS_MSDOS
        /* This should set the file to binary mode. */
        {
 #include <fcntl.h>
index b448f4a5c6742f5ac748a2095db451b05856341e..cea385178bd0d907b58a9852332180451dcf3bb3 100644 (file)
@@ -59,7 +59,7 @@
 /* 11-Sep-92 Andrew Daviel   Support for Silicon Graphics IRIX added */
 /* 06-Apr-92 Luke Brennan    Support for VMS and add extra signal calls */
 
-#if !defined(MSDOS) && (!defined(VMS) || defined(__DECC))
+#if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC))
 #define TIMES
 #endif
 
@@ -82,7 +82,7 @@ OPENSSL_DECLARE_EXIT
    The __TMS macro will show if it was.  If it wasn't defined, we should
    undefine TIMES, since that tells the rest of the program how things
    should be handled.                          -- Richard Levitte */
-#if defined(VMS) && defined(__DECC) && !defined(__TMS)
+#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
 #undef TIMES
 #endif
 
@@ -243,7 +243,7 @@ int main(int argc, char **argv)
        printf("RC4 set_key per sec = %12.2f (%9.3fuS)\n",a,1.0e6/a);
        printf("RC4   bytes per sec = %12.2f (%9.3fuS)\n",c,8.0e6/c);
        exit(0);
-#if defined(LINT) || defined(MSDOS)
+#if defined(LINT) || defined(OPENSSL_SYS_MSDOS)
        return(0);
 #endif
        }
index 05f5e0fabe8da36f240d95dfcf57c503fb292814..c6b27255ae69094f4dfd4ef536bbe0f6df7894d6 100644 (file)
@@ -59,7 +59,7 @@
 /* 11-Sep-92 Andrew Daviel   Support for Silicon Graphics IRIX added */
 /* 06-Apr-92 Luke Brennan    Support for VMS and add extra signal calls */
 
-#if !defined(MSDOS) && (!defined(VMS) || defined(__DECC))
+#if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC))
 #define TIMES
 #endif
 
@@ -82,7 +82,7 @@ OPENSSL_DECLARE_EXIT
    The __TMS macro will show if it was.  If it wasn't defined, we should
    undefine TIMES, since that tells the rest of the program how things
    should be handled.                          -- Richard Levitte */
-#if defined(VMS) && defined(__DECC) && !defined(__TMS)
+#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
 #undef TIMES
 #endif
 
@@ -268,7 +268,7 @@ int main(int argc, char **argv)
        printf("RC5_32/12/16 raw ecb bytes per sec = %12.2f (%9.3fuS)\n",b,8.0e6/b);
        printf("RC5_32/12/16 cbc     bytes per sec = %12.2f (%9.3fuS)\n",c,8.0e6/c);
        exit(0);
-#if defined(LINT) || defined(MSDOS)
+#if defined(LINT) || defined(OPENSSL_SYS_MSDOS)
        return(0);
 #endif
        }
index 6283fc9f069c6f3755b043a62f445e9c0aadac14..009fba199e3dea6e4a0f94baea4045c7609813fa 100644 (file)
@@ -198,7 +198,7 @@ int RSA_verify(int dtype, const unsigned char *m, unsigned int m_len,
                                (sigtype == NID_md2WithRSAEncryption)))
                                {
                                /* ok, we will let it through */
-#if !defined(OPENSSL_NO_STDIO) && !defined(WIN16)
+#if !defined(OPENSSL_NO_STDIO) && !defined(OPENSSL_SYS_WIN16)
                                fprintf(stderr,"signature has problems, re-make with post SSLeay045\n");
 #endif
                                }
index 436f27d78c102df99a3fda31937fce3216432e82..86c0ee442f799a8b82554c57d3f7d839238afdb5 100644 (file)
 #undef ENGINE_set_default_BN_mod_exp_crt
 #define ENGINE_set_default_BN_mod_exp_crt      ENGINE_set_def_BN_mod_exp_crt
 
-#endif /* defined VMS */
+#endif /* defined OPENSSL_SYS_VMS */
 
 
 /* Case insensiteve linking causes problems.... */
index 3d47e9754539c1b9d82b44cb149e481d9cd9c428..7142e4edc77cf8086195ee49cd5d8853ae4d1576 100644 (file)
@@ -63,7 +63,7 @@
 #ifdef LINUX
 #include <typedefs.h>
 #endif
-#ifdef WIN32
+#ifdef OPENSSL_SYS_WIN32
 #include <windows.h>
 #endif
 #ifdef SOLARIS
@@ -691,7 +691,7 @@ int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx)
 
 #define THREAD_STACK_SIZE (16*1024)
 
-#ifdef WIN32
+#ifdef OPENSSL_SYS_WIN32
 
 static HANDLE *lock_cs;
 
@@ -782,7 +782,7 @@ void do_threads(SSL_CTX *s_ctx, SSL_CTX *c_ctx)
        printf("win32 threads done - %.3f seconds\n",ret);
        }
 
-#endif /* WIN32 */
+#endif /* OPENSSL_SYS_WIN32 */
 
 #ifdef SOLARIS
 
index 553d2218de76ebec8bbf8c4441316a463bb3e804..a6a79b9f45300fa07c74dced87bb7518e883aa5a 100644 (file)
@@ -63,7 +63,7 @@
 #ifdef LINUX
 #include <typedefs.h>
 #endif
-#ifdef WIN32
+#ifdef OPENSSL_SYS_WIN32
 #include <windows.h>
 #endif
 #ifdef SOLARIS
@@ -105,7 +105,7 @@ static unsigned long pthreads_thread_id(void );
 
 #define THREAD_STACK_SIZE (16*1024)
 
-#ifdef WIN32
+#ifdef OPENSSL_SYS_WIN32
 
 static HANDLE *lock_cs;
 
@@ -146,7 +146,7 @@ void win32_locking_callback(int mode, int type, char *file, int line)
                }
        }
 
-#endif /* WIN32 */
+#endif /* OPENSSL_SYS_WIN32 */
 
 #ifdef SOLARIS
 
index 7773928666ae56309dfa45c1a586a9ed44e4c752..6d40bd7ef30e92f9f2ef4899ef40892c1dbcfd25 100644 (file)
 #include <openssl/tmdiff.h>
 
 #ifdef TIMEB
-#undef WIN32
+#undef OPENSSL_SYS_WIN32
 #undef TIMES
 #endif
 
-#ifndef MSDOS
-#  ifndef WIN32
-#    if !defined(VMS) || defined(__DECC)
+#ifndef OPENSSL_SYS_MSDOS
+#  ifndef OPENSSL_SYS_WIN32
+#    if !defined(OPENSSL_SYS_VMS) || defined(__DECC)
 #      define TIMES
 #    endif
 #  endif
@@ -85,7 +85,7 @@
    The __TMS macro will show if it was.  If it wasn't defined, we should
    undefine TIMES, since that tells the rest of the program how things
    should be handled.                          -- Richard Levitte */
-#if defined(VMS) && defined(__DECC) && !defined(__TMS)
+#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
 #undef TIMES
 #endif
 
@@ -99,7 +99,7 @@
 #include <sys/timeb.h>
 #endif
 
-#ifdef WIN32
+#ifdef OPENSSL_SYS_WIN32
 #include <windows.h>
 #endif
 
@@ -121,7 +121,7 @@ typedef struct ms_tm
 #ifdef TIMES
        struct tms ms_tms;
 #else
-#  ifdef WIN32
+#  ifdef OPENSSL_SYS_WIN32
        HANDLE thread_id;
        FILETIME ms_win32;
 #  else
@@ -138,7 +138,7 @@ char *ms_time_new(void)
        if (ret == NULL)
                return(NULL);
        memset(ret,0,sizeof(MS_TM));
-#ifdef WIN32
+#ifdef OPENSSL_SYS_WIN32
        ret->thread_id=GetCurrentThread();
 #endif
        return((char *)ret);
@@ -153,14 +153,14 @@ void ms_time_free(char *a)
 void ms_time_get(char *a)
        {
        MS_TM *tm=(MS_TM *)a;
-#ifdef WIN32
+#ifdef OPENSSL_SYS_WIN32
        FILETIME tmpa,tmpb,tmpc;
 #endif
 
 #ifdef TIMES
        times(&tm->ms_tms);
 #else
-#  ifdef WIN32
+#  ifdef OPENSSL_SYS_WIN32
        GetThreadTimes(tm->thread_id,&tmpa,&tmpb,&tmpc,&(tm->ms_win32));
 #  else
        ftime(&tm->ms_timeb);
@@ -177,7 +177,7 @@ double ms_time_diff(char *ap, char *bp)
 #ifdef TIMES
        ret=(b->ms_tms.tms_utime-a->ms_tms.tms_utime)/HZ;
 #else
-# ifdef WIN32
+# ifdef OPENSSL_SYS_WIN32
        {
 #ifdef __GNUC__
        signed long long la,lb;
@@ -210,7 +210,7 @@ int ms_time_cmp(char *ap, char *bp)
 #ifdef TIMES
        d=(b->ms_tms.tms_utime-a->ms_tms.tms_utime)/HZ;
 #else
-# ifdef WIN32
+# ifdef OPENSSL_SYS_WIN32
        d =(b->ms_win32.dwHighDateTime&0x000fffff)*10+b->ms_win32.dwLowDateTime/1e7;
        d-=(a->ms_win32.dwHighDateTime&0x000fffff)*10+a->ms_win32.dwLowDateTime/1e7;
 # else
index b7862e6baeec8c584d9fb2153b848e53c50f7443..e6334d6add9b7f5862214d313b4f6ec09805c886 100644 (file)
@@ -155,7 +155,7 @@ TXT_DB *TXT_DB_read(BIO *in, int num)
                *(p++)='\0';
                if ((n != num) || (*f != '\0'))
                        {
-#if !defined(OPENSSL_NO_STDIO) && !defined(WIN16)      /* temporaty fix :-( */
+#if !defined(OPENSSL_NO_STDIO) && !defined(OPENSSL_SYS_WIN16)  /* temporaty fix :-( */
                        fprintf(stderr,"wrong number of fields on line %ld (looking for field %d, got %d, '%s' left)\n",ln,num,n,f);
 #endif
                        er=2;
@@ -164,7 +164,7 @@ TXT_DB *TXT_DB_read(BIO *in, int num)
                pp[n]=p;
                if (!sk_push(ret->data,(char *)pp))
                        {
-#if !defined(OPENSSL_NO_STDIO) && !defined(WIN16)      /* temporaty fix :-( */
+#if !defined(OPENSSL_NO_STDIO) && !defined(OPENSSL_SYS_WIN16)  /* temporaty fix :-( */
                        fprintf(stderr,"failure in sk_push\n");
 #endif
                        er=2;
@@ -176,7 +176,7 @@ err:
        BUF_MEM_free(buf);
        if (er)
                {
-#if !defined(OPENSSL_NO_STDIO) && !defined(WIN16)
+#if !defined(OPENSSL_NO_STDIO) && !defined(OPENSSL_SYS_WIN16)
                if (er == 1) fprintf(stderr,"OPENSSL_malloc failure\n");
 #endif
                if (ret->data != NULL) sk_free(ret->data);
index 38ba7253737dd052f40915f4474ca0cec1c7dbfe..b3791b32aa4896b4828f0e7ce2b8ae76b851eb86 100644 (file)
@@ -62,7 +62,7 @@
 */
 
 #include <openssl/opensslconf.h>
-#ifndef NO_KRB5
+#ifndef OPENSSL_NO_KRB5
 #include <string.h>
 #include <openssl/ssl.h>
 
@@ -73,7 +73,7 @@
  * and we do not link to a .LIB file.
  */
 
-#if defined(WINDOWS) || defined(WIN32)
+#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32)
 /* 
  * The purpose of the following pre-processor statements is to provide
  * compatibility with different releases of MIT Kerberos for Windows.
@@ -470,7 +470,7 @@ kssl_krb5_cc_get_principal
        else
                return(krb5_x ((cache)->ops->get_princ,(context, cache, principal)));
        }
-#endif  /* WINDOWS || WIN32 */
+#endif  /* OPENSSL_SYS_WINDOWS || OPENSSL_SYS_WIN32 */
 
 char
 *kstring(char *string)
@@ -1031,11 +1031,11 @@ void kssl_krb5_free_data_contents(krb5_context context, krb5_data *data)
 #endif
        }
 
-#else /* !NO_KRB5 */
+#else /* !OPENSSL_NO_KRB5 */
 
 #ifdef PEDANTIC
 static int dummy=(int)&dummy;
 #endif
 
-#endif /* !NO_KRB5     */
+#endif /* !OPENSSL_NO_KRB5     */
 
index 5050a13ef20602de57b5228f27ca09504eb619ec..1eafb4b446358939396f1e6a9c84845573690f89 100644 (file)
@@ -68,7 +68,7 @@ static int ssl23_client_hello(SSL *s);
 static int ssl23_get_server_hello(SSL *s);
 static SSL_METHOD *ssl23_get_client_method(int ver)
        {
-#ifndef NO_SSL2
+#ifndef OPENSSL_NO_SSL2
        if (ver == SSL2_VERSION)
                return(SSLv2_client_method());
 #endif
@@ -322,7 +322,7 @@ static int ssl23_get_server_hello(SSL *s)
        if ((p[0] & 0x80) && (p[2] == SSL2_MT_SERVER_HELLO) &&
                (p[5] == 0x00) && (p[6] == 0x02))
                {
-#ifdef NO_SSL2
+#ifdef OPENSSL_NO_SSL2
                SSLerr(SSL_F_SSL23_GET_SERVER_HELLO,SSL_R_UNSUPPORTED_PROTOCOL);
                goto err;
 #else
index dded7a19c5a56ebe3378872635b6ab52a4f3b8ec..ec739deff194535fb81c1daeb35e35ab77535d56 100644 (file)
@@ -110,7 +110,7 @@ SSL_METHOD *sslv23_base_method(void)
 static int ssl23_num_ciphers(void)
        {
        return(ssl3_num_ciphers()
-#ifndef NO_SSL2
+#ifndef OPENSSL_NO_SSL2
               + ssl2_num_ciphers()
 #endif
            );
@@ -123,7 +123,7 @@ static SSL_CIPHER *ssl23_get_cipher(unsigned int u)
        if (u < uu)
                return(ssl3_get_cipher(u));
        else
-#ifndef NO_SSL2
+#ifndef OPENSSL_NO_SSL2
                return(ssl2_get_cipher(u-uu));
 #else
                return(NULL);
@@ -143,7 +143,7 @@ static SSL_CIPHER *ssl23_get_cipher_by_char(const unsigned char *p)
                ((unsigned long)p[1]<<8L)|(unsigned long)p[2];
        c.id=id;
        cp=ssl3_get_cipher_by_char(p);
-#ifndef NO_SSL2
+#ifndef OPENSSL_NO_SSL2
        if (cp == NULL)
                cp=ssl2_get_cipher_by_char(p);
 #endif
index 050618235f0a6cfa0126581eb7531c0364bce3f7..131054b411d3efee65bff33a8aa4f99d92400ae8 100644 (file)
@@ -67,7 +67,7 @@ static SSL_METHOD *ssl23_get_server_method(int ver);
 int ssl23_get_client_hello(SSL *s);
 static SSL_METHOD *ssl23_get_server_method(int ver)
        {
-#ifndef NO_SSL2
+#ifndef OPENSSL_NO_SSL2
        if (ver == SSL2_VERSION)
                return(SSLv2_server_method());
 #endif
@@ -208,7 +208,7 @@ int ssl23_get_client_hello(SSL *s)
        int n=0,j;
        int type=0;
        int v[2];
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
        int use_sslv2_strong=0;
 #endif
 
@@ -474,7 +474,7 @@ int ssl23_get_client_hello(SSL *s)
 
        if (type == 1)
                {
-#ifdef NO_SSL2
+#ifdef OPENSSL_NO_SSL2
                SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO,SSL_R_UNSUPPORTED_PROTOCOL);
                goto err;
 #else
index 3e062863755e971c0c10b3584c77c70746915a46..b549628dbdbd9d5c2d8b2d4790195058e58812f0 100644 (file)
@@ -57,7 +57,7 @@
  */
 
 #include "ssl_locl.h"
-#ifndef NO_SSL2
+#ifndef OPENSSL_NO_SSL2
 #include <stdio.h>
 #include <openssl/rand.h>
 #include <openssl/buffer.h>
@@ -1001,7 +1001,7 @@ end:
        EVP_PKEY_free(pkey);
        return(i);
        }
-#else /* !NO_SSL2 */
+#else /* !OPENSSL_NO_SSL2 */
 
 # if PEDANTIC
 static void *dummy=&dummy;
index 35acdf8276d218c53cb555b861b6692460ead259..c05ce5ddc0921b6cd7a4ef6d7f6f81037d0583c1 100644 (file)
@@ -57,7 +57,7 @@
  */
 
 #include "ssl_locl.h"
-#ifndef NO_SSL2
+#ifndef OPENSSL_NO_SSL2
 #include <stdio.h>
 
 int ssl2_enc_init(SSL *s, int client)
@@ -178,7 +178,7 @@ void ssl2_mac(SSL *s, unsigned char *md, int send)
        EVP_DigestFinal(&c,md,NULL);
        /* some would say I should zero the md context */
        }
-#else /* !NO_SSL2 */
+#else /* !OPENSSL_NO_SSL2 */
 
 # if PEDANTIC
 static void *dummy=&dummy;
index a590dbfa5ca6809919d0de60aaac301a3a3bfdb5..09fde61b5b97f0940cb8001ff516cbba2387775d 100644 (file)
@@ -57,7 +57,7 @@
  */
 
 #include "ssl_locl.h"
-#ifndef NO_SSL2
+#ifndef OPENSSL_NO_SSL2
 #include <stdio.h>
 #include <openssl/rsa.h>
 #include <openssl/objects.h>
@@ -479,7 +479,7 @@ int ssl2_shutdown(SSL *s)
        s->shutdown=(SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN);
        return(1);
        }
-#else /* !NO_SSL2 */
+#else /* !OPENSSL_NO_SSL2 */
 
 # if PEDANTIC
 static void *dummy=&dummy;
index deb9e1d6f36c316fdd1b005916c74540a05130e4..d30b7179f7cfe0d74c799eab0068ff98a764ef9d 100644 (file)
@@ -57,7 +57,7 @@
  */
 
 #include "ssl_locl.h"
-#ifndef NO_SSL2
+#ifndef OPENSSL_NO_SSL2
 #include <stdio.h>
 #include <openssl/objects.h>
 
@@ -86,7 +86,7 @@ SSL_METHOD *SSLv2_method(void)
                }
        return(&SSLv2_data);
        }
-#else /* !NO_SSL2 */
+#else /* !OPENSSL_NO_SSL2 */
 
 # if PEDANTIC
 static void *dummy=&dummy;
index 1f119442b4e8de2ad1c043bcb0c53c943a339e11..d2dbf348caf1888c5bfeeb3a8c238b03882d3034 100644 (file)
  */
 
 #include "ssl_locl.h"
-#ifndef NO_SSL2
+#ifndef OPENSSL_NO_SSL2
 #include <stdio.h>
 #include <errno.h>
 #define USE_SOCKETS
@@ -708,7 +708,7 @@ static int ssl_mt_error(int n)
                }
        return(ret);
        }
-#else /* !NO_SSL2 */
+#else /* !OPENSSL_NO_SSL2 */
 
 # if PEDANTIC
 static void *dummy=&dummy;
index 974d6e6de742df31064595026bd89a1a56498023..10de5ec3dbce88c50d1e42e8f087ee0b66e1d868 100644 (file)
@@ -57,7 +57,7 @@
  */
 
 #include "ssl_locl.h"
-#ifndef NO_SSL2
+#ifndef OPENSSL_NO_SSL2
 #include <stdio.h>
 #include <openssl/bio.h>
 #include <openssl/rand.h>
@@ -983,7 +983,7 @@ static int ssl_rsa_private_decrypt(CERT *c, int len, unsigned char *from,
                SSLerr(SSL_F_SSL_RSA_PRIVATE_DECRYPT,ERR_R_RSA_LIB);
        return(i);
        }
-#else /* !NO_SSL2 */
+#else /* !OPENSSL_NO_SSL2 */
 
 # if PEDANTIC
 static void *dummy=&dummy;
index 10d8d3b15afc213b8f03a72b3bc46d63b36a1336..3e98cb00cf50f1bacbd20c715a1a8a66560399e6 100644 (file)
@@ -158,7 +158,7 @@ int ssl3_send_finished(SSL *s, int a, int b, const char *sender, int slen)
                p+=i;
                l=i;
 
-#ifdef WIN16
+#ifdef OPENSSL_SYS_WIN16
                /* MSVC 1.5 does not clear the top bytes of the word unless
                 * I do this.
                 */
index 3b3c35b9d3d84dcdd815dc524b1c74ba0628b8dc..6212adfee6a90ba845c05cfc413f1bba131eaac5 100644 (file)
@@ -65,7 +65,7 @@
 #include <openssl/evp.h>
 #include "ssl_locl.h"
 
-#ifndef NO_KRB5
+#ifndef OPENSSL_NO_KRB5
 #include "kssl.h"
 #endif
 
@@ -697,7 +697,7 @@ static int ssl3_get_server_certificate(SSL *s)
                SSL3_ST_CR_CERT_A,
                SSL3_ST_CR_CERT_B,
                -1,
-#if defined(MSDOS) && !defined(WIN32)
+#if defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_WIN32)
                1024*30, /* 30k max cert list :-) */
 #else
                1024*100, /* 100k max cert list :-) */
@@ -864,7 +864,7 @@ err:
 
 static int ssl3_get_key_exchange(SSL *s)
        {
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
        unsigned char *q,md_buf[EVP_MAX_MD_SIZE*2];
 #endif
        EVP_MD_CTX md_ctx;
@@ -872,10 +872,10 @@ static int ssl3_get_key_exchange(SSL *s)
        int al,i,j,param_len,ok;
        long n,alg;
        EVP_PKEY *pkey=NULL;
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
        RSA *rsa=NULL;
 #endif
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
        DH *dh=NULL;
 #endif
 
@@ -898,14 +898,14 @@ static int ssl3_get_key_exchange(SSL *s)
 
        if (s->session->sess_cert != NULL)
                {
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
                if (s->session->sess_cert->peer_rsa_tmp != NULL)
                        {
                        RSA_free(s->session->sess_cert->peer_rsa_tmp);
                        s->session->sess_cert->peer_rsa_tmp=NULL;
                        }
 #endif
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
                if (s->session->sess_cert->peer_dh_tmp)
                        {
                        DH_free(s->session->sess_cert->peer_dh_tmp);
@@ -921,7 +921,7 @@ static int ssl3_get_key_exchange(SSL *s)
        param_len=0;
        alg=s->s3->tmp.new_cipher->algorithms;
 
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
        if (alg & SSL_kRSA)
                {
                if ((rsa=RSA_new()) == NULL)
@@ -971,11 +971,11 @@ static int ssl3_get_key_exchange(SSL *s)
                s->session->sess_cert->peer_rsa_tmp=rsa;
                rsa=NULL;
                }
-#else /* NO_RSA */
+#else /* OPENSSL_NO_RSA */
        if (0)
                ;
 #endif
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
        else if (alg & SSL_kEDH)
                {
                if ((dh=DH_new()) == NULL)
@@ -1029,14 +1029,14 @@ static int ssl3_get_key_exchange(SSL *s)
                p+=i;
                n-=param_len;
 
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
                if (alg & SSL_aRSA)
                        pkey=X509_get_pubkey(s->session->sess_cert->peer_pkeys[SSL_PKEY_RSA_ENC].x509);
 #else
                if (0)
                        ;
 #endif
-#ifndef NO_DSA
+#ifndef OPENSSL_NO_DSA
                else if (alg & SSL_aDSS)
                        pkey=X509_get_pubkey(s->session->sess_cert->peer_pkeys[SSL_PKEY_DSA_SIGN].x509);
 #endif
@@ -1051,7 +1051,7 @@ static int ssl3_get_key_exchange(SSL *s)
                SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE,SSL_R_TRIED_TO_USE_UNSUPPORTED_CIPHER);
                goto f_err;
                }
-#endif /* !NO_DH */
+#endif /* !OPENSSL_NO_DH */
        if (alg & SSL_aFZA)
                {
                al=SSL_AD_HANDSHAKE_FAILURE;
@@ -1078,7 +1078,7 @@ static int ssl3_get_key_exchange(SSL *s)
                        goto f_err;
                        }
 
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
                if (pkey->type == EVP_PKEY_RSA)
                        {
                        int num;
@@ -1114,7 +1114,7 @@ static int ssl3_get_key_exchange(SSL *s)
                        }
                else
 #endif
-#ifndef NO_DSA
+#ifndef OPENSSL_NO_DSA
                        if (pkey->type == EVP_PKEY_DSA)
                        {
                        /* lets do DSS */
@@ -1158,11 +1158,11 @@ f_err:
        ssl3_send_alert(s,SSL3_AL_FATAL,al);
 err:
        EVP_PKEY_free(pkey);
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
        if (rsa != NULL)
                RSA_free(rsa);
 #endif
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
        if (dh != NULL)
                DH_free(dh);
 #endif
@@ -1182,7 +1182,7 @@ static int ssl3_get_certificate_request(SSL *s)
                SSL3_ST_CR_CERT_REQ_A,
                SSL3_ST_CR_CERT_REQ_B,
                -1,
-#if defined(MSDOS) && !defined(WIN32)
+#if defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_WIN32)
                1024*30,  /* 30k max cert list :-) */
 #else
                1024*100, /* 100k max cert list :-) */
@@ -1348,13 +1348,13 @@ static int ssl3_send_client_key_exchange(SSL *s)
        unsigned char *p,*d;
        int n;
        unsigned long l;
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
        unsigned char *q;
        EVP_PKEY *pkey=NULL;
 #endif
-#ifndef NO_KRB5
+#ifndef OPENSSL_NO_KRB5
         KSSL_ERR kssl_err;
-#endif /* NO_KRB5 */
+#endif /* OPENSSL_NO_KRB5 */
 
        if (s->state == SSL3_ST_CW_KEY_EXCH_A)
                {
@@ -1365,7 +1365,7 @@ static int ssl3_send_client_key_exchange(SSL *s)
 
                 /* Fool emacs indentation */
                 if (0) {}
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
                else if (l & SSL_kRSA)
                        {
                        RSA *rsa;
@@ -1424,7 +1424,7 @@ static int ssl3_send_client_key_exchange(SSL *s)
                        memset(tmp_buf,0,SSL_MAX_MASTER_KEY_LENGTH);
                        }
 #endif
-#ifndef NO_KRB5
+#ifndef OPENSSL_NO_KRB5
                else if (l & SSL_kKRB5)
                         {
                         krb5_error_code        krb5rc;
@@ -1490,7 +1490,7 @@ static int ssl3_send_client_key_exchange(SSL *s)
                                         s->session->master_key,        kssl_ctx->key,kssl_ctx->length);
                         }
 #endif
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
                else if (l & (SSL_kEDH|SSL_kDHr|SSL_kDHd))
                        {
                        DH *dh_srvr,*dh_clnt;
@@ -1573,11 +1573,11 @@ static int ssl3_send_client_verify(SSL *s)
        unsigned char *p,*d;
        unsigned char data[MD5_DIGEST_LENGTH+SHA_DIGEST_LENGTH];
        EVP_PKEY *pkey;
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
        unsigned u=0;
 #endif
        unsigned long n;
-#ifndef NO_DSA
+#ifndef OPENSSL_NO_DSA
        int j;
 #endif
 
@@ -1590,7 +1590,7 @@ static int ssl3_send_client_verify(SSL *s)
                s->method->ssl3_enc->cert_verify_mac(s,&(s->s3->finish_dgst2),
                        &(data[MD5_DIGEST_LENGTH]));
 
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
                if (pkey->type == EVP_PKEY_RSA)
                        {
                        s->method->ssl3_enc->cert_verify_mac(s,
@@ -1607,7 +1607,7 @@ static int ssl3_send_client_verify(SSL *s)
                        }
                else
 #endif
-#ifndef NO_DSA
+#ifndef OPENSSL_NO_DSA
                        if (pkey->type == EVP_PKEY_DSA)
                        {
                        if (!DSA_sign(pkey->save_type,
@@ -1723,10 +1723,10 @@ static int ssl3_check_cert_and_algorithm(SSL *s)
        long algs;
        EVP_PKEY *pkey=NULL;
        SESS_CERT *sc;
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
        RSA *rsa;
 #endif
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
        DH *dh;
 #endif
 
@@ -1744,10 +1744,10 @@ static int ssl3_check_cert_and_algorithm(SSL *s)
        if (algs & (SSL_aDH|SSL_aNULL|SSL_aKRB5))
                return(1);
 
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
        rsa=s->session->sess_cert->peer_rsa_tmp;
 #endif
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
        dh=s->session->sess_cert->peer_dh_tmp;
 #endif
 
@@ -1765,14 +1765,14 @@ static int ssl3_check_cert_and_algorithm(SSL *s)
                SSLerr(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM,SSL_R_MISSING_RSA_SIGNING_CERT);
                goto f_err;
                }
-#ifndef NO_DSA
+#ifndef OPENSSL_NO_DSA
        else if ((algs & SSL_aDSS) && !has_bits(i,EVP_PK_DSA|EVP_PKT_SIGN))
                {
                SSLerr(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM,SSL_R_MISSING_DSA_SIGNING_CERT);
                goto f_err;
                }
 #endif
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
        if ((algs & SSL_kRSA) &&
                !(has_bits(i,EVP_PK_RSA|EVP_PKT_ENC) || (rsa != NULL)))
                {
@@ -1780,7 +1780,7 @@ static int ssl3_check_cert_and_algorithm(SSL *s)
                goto f_err;
                }
 #endif
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
        if ((algs & SSL_kEDH) &&
                !(has_bits(i,EVP_PK_DH|EVP_PKT_EXCH) || (dh != NULL)))
                {
@@ -1792,7 +1792,7 @@ static int ssl3_check_cert_and_algorithm(SSL *s)
                SSLerr(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM,SSL_R_MISSING_DH_RSA_CERT);
                goto f_err;
                }
-#ifndef NO_DSA
+#ifndef OPENSSL_NO_DSA
        else if ((algs & SSL_kDHd) && !has_bits(i,EVP_PK_DH|EVP_PKS_DSA))
                {
                SSLerr(SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM,SSL_R_MISSING_DH_DSA_CERT);
@@ -1803,7 +1803,7 @@ static int ssl3_check_cert_and_algorithm(SSL *s)
 
        if (SSL_C_IS_EXPORT(s->s3->tmp.new_cipher) && !has_bits(i,EVP_PKT_EXP))
                {
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
                if (algs & SSL_kRSA)
                        {
                        if (rsa == NULL
@@ -1815,7 +1815,7 @@ static int ssl3_check_cert_and_algorithm(SSL *s)
                        }
                else
 #endif
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
                        if (algs & (SSL_kEDH|SSL_kDHr|SSL_kDHd))
                            {
                            if (dh == NULL
index 76c499e67a08ab612ffbbded9c7517467d8c5f02..e9aae569df140ec5e50ce382c31ba0a93b2733ff 100644 (file)
@@ -526,7 +526,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={
        SSL_ALL_STRENGTHS,
        },
 
-#ifndef NO_KRB5
+#ifndef OPENSSL_NO_KRB5
 /* The Kerberos ciphers
 ** 20000107 VRS: And the first shall be last,
 ** in hopes of avoiding the lynx ssl renegotiation problem.
@@ -614,7 +614,7 @@ OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={
        SSL_ALL_CIPHERS,
        SSL_ALL_STRENGTHS,
        },
-#endif /* NO_KRB5 */
+#endif /* OPENSSL_NO_KRB5 */
 
 
 #if TLS1_ALLOW_EXPERIMENTAL_CIPHERSUITES
@@ -973,7 +973,7 @@ void ssl3_free(SSL *s)
                OPENSSL_free(s->s3->wbuf.buf);
        if (s->s3->rrec.comp != NULL)
                OPENSSL_free(s->s3->rrec.comp);
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
        if (s->s3->tmp.dh != NULL)
                DH_free(s->s3->tmp.dh);
 #endif
@@ -997,7 +997,7 @@ void ssl3_clear(SSL *s)
                OPENSSL_free(s->s3->rrec.comp);
                s->s3->rrec.comp=NULL;
                }
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
        if (s->s3->tmp.dh != NULL)
                DH_free(s->s3->tmp.dh);
 #endif
@@ -1023,13 +1023,13 @@ long ssl3_ctrl(SSL *s, int cmd, long larg, char *parg)
        {
        int ret=0;
 
-#if !defined(NO_DSA) || !defined(NO_RSA)
+#if !defined(OPENSSL_NO_DSA) || !defined(OPENSSL_NO_RSA)
        if (
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
            cmd == SSL_CTRL_SET_TMP_RSA ||
            cmd == SSL_CTRL_SET_TMP_RSA_CB ||
 #endif
-#ifndef NO_DSA
+#ifndef OPENSSL_NO_DSA
            cmd == SSL_CTRL_SET_TMP_DH ||
            cmd == SSL_CTRL_SET_TMP_DH_CB ||
 #endif
@@ -1063,7 +1063,7 @@ long ssl3_ctrl(SSL *s, int cmd, long larg, char *parg)
        case SSL_CTRL_GET_FLAGS:
                ret=(int)(s->s3->flags);
                break;
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
        case SSL_CTRL_NEED_TMP_RSA:
                if ((s->cert != NULL) && (s->cert->rsa_tmp == NULL) &&
                    ((s->cert->pkeys[SSL_PKEY_RSA_ENC].privatekey == NULL) ||
@@ -1096,7 +1096,7 @@ long ssl3_ctrl(SSL *s, int cmd, long larg, char *parg)
                }
                break;
 #endif
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
        case SSL_CTRL_SET_TMP_DH:
                {
                        DH *dh = (DH *)parg;
@@ -1142,12 +1142,12 @@ long ssl3_callback_ctrl(SSL *s, int cmd, void (*fp)())
        {
        int ret=0;
 
-#if !defined(NO_DSA) || !defined(NO_RSA)
+#if !defined(OPENSSL_NO_DSA) || !defined(OPENSSL_NO_RSA)
        if (
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
            cmd == SSL_CTRL_SET_TMP_RSA_CB ||
 #endif
-#ifndef NO_DSA
+#ifndef OPENSSL_NO_DSA
            cmd == SSL_CTRL_SET_TMP_DH_CB ||
 #endif
                0)
@@ -1162,14 +1162,14 @@ long ssl3_callback_ctrl(SSL *s, int cmd, void (*fp)())
 
        switch (cmd)
                {
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
        case SSL_CTRL_SET_TMP_RSA_CB:
                {
                s->cert->rsa_tmp_cb = (RSA *(*)(SSL *, int, int))fp;
                }
                break;
 #endif
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
        case SSL_CTRL_SET_TMP_DH_CB:
                {
                s->cert->dh_tmp_cb = (DH *(*)(SSL *, int, int))fp;
@@ -1190,7 +1190,7 @@ long ssl3_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, char *parg)
 
        switch (cmd)
                {
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
        case SSL_CTRL_NEED_TMP_RSA:
                if (    (cert->rsa_tmp == NULL) &&
                        ((cert->pkeys[SSL_PKEY_RSA_ENC].privatekey == NULL) ||
@@ -1235,7 +1235,7 @@ long ssl3_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, char *parg)
                }
                break;
 #endif
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
        case SSL_CTRL_SET_TMP_DH:
                {
                DH *new=NULL,*dh;
@@ -1292,14 +1292,14 @@ long ssl3_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)())
 
        switch (cmd)
                {
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
        case SSL_CTRL_SET_TMP_RSA_CB:
                {
                cert->rsa_tmp_cb = (RSA *(*)(SSL *, int, int))fp;
                }
                break;
 #endif
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
        case SSL_CTRL_SET_TMP_DH_CB:
                {
                cert->dh_tmp_cb = (DH *(*)(SSL *, int, int))fp;
@@ -1461,31 +1461,31 @@ int ssl3_get_req_cert_type(SSL *s, unsigned char *p)
 
        alg=s->s3->tmp.new_cipher->algorithms;
 
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
        if (alg & (SSL_kDHr|SSL_kEDH))
                {
-#  ifndef NO_RSA
+#  ifndef OPENSSL_NO_RSA
                p[ret++]=SSL3_CT_RSA_FIXED_DH;
 #  endif
-#  ifndef NO_DSA
+#  ifndef OPENSSL_NO_DSA
                p[ret++]=SSL3_CT_DSS_FIXED_DH;
 #  endif
                }
        if ((s->version == SSL3_VERSION) &&
                (alg & (SSL_kEDH|SSL_kDHd|SSL_kDHr)))
                {
-#  ifndef NO_RSA
+#  ifndef OPENSSL_NO_RSA
                p[ret++]=SSL3_CT_RSA_EPHEMERAL_DH;
 #  endif
-#  ifndef NO_DSA
+#  ifndef OPENSSL_NO_DSA
                p[ret++]=SSL3_CT_DSS_EPHEMERAL_DH;
 #  endif
                }
-#endif /* !NO_DH */
-#ifndef NO_RSA
+#endif /* !OPENSSL_NO_DH */
+#ifndef OPENSSL_NO_RSA
        p[ret++]=SSL3_CT_RSA_SIGN;
 #endif
-#ifndef NO_DSA
+#ifndef OPENSSL_NO_DSA
        p[ret++]=SSL3_CT_DSS_SIGN;
 #endif
        return(ret);
index 9ab76604a64534192a45569a6f90257487b2135a..a128d616b58288b36117c4c382ae5012c5aa44bb 100644 (file)
@@ -1052,7 +1052,7 @@ start:
        switch (rr->type)
                {
        default:
-#ifndef NO_TLS
+#ifndef OPENSSL_NO_TLS
                /* TLS just ignores unknown message types */
                if (s->version == TLS1_VERSION)
                        {
index 4841109c4bf5c7a5fb24bed67b03b3a3bbab8578..0a46e4ab74e4316e7afa6f513ae7f88220d63211 100644 (file)
@@ -70,9 +70,9 @@
 #include <openssl/x509.h>
 #include "ssl_locl.h"
 
-#ifndef NO_KRB5
+#ifndef OPENSSL_NO_KRB5
 #include "kssl.h"
-#endif /* NO_KRB5 */
+#endif /* OPENSSL_NO_KRB5 */
 
 static SSL_METHOD *ssl3_get_server_method(int ver);
 static int ssl3_get_client_hello(SSL *s);
@@ -267,9 +267,9 @@ int ssl3_accept(SSL *s)
                        /* clear this, it may get reset by
                         * send_server_key_exchange */
                        if ((s->options & SSL_OP_EPHEMERAL_RSA)
-#ifndef NO_KRB5
+#ifndef OPENSSL_NO_KRB5
                                && !(l & SSL_KRB5)
-#endif /* NO_KRB5 */
+#endif /* OPENSSL_NO_KRB5 */
                                )
                                s->s3->tmp.use_rsa_tmp=1;
                        else
@@ -555,7 +555,7 @@ static int ssl3_check_client_hello(SSL *s)
                 * which will now be aborted. (A full SSL_clear would be too much.)
                 * I hope that tmp.dh is the only thing that may need to be cleared
                 * when a handshake is not completed ... */
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
                if (s->s3->tmp.dh != NULL)
                        {
                        DH_free(s->s3->tmp.dh);
@@ -927,14 +927,14 @@ static int ssl3_send_server_done(SSL *s)
 
 static int ssl3_send_server_key_exchange(SSL *s)
        {
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
        unsigned char *q;
        int j,num;
        RSA *rsa;
        unsigned char md_buf[MD5_DIGEST_LENGTH+SHA_DIGEST_LENGTH];
        unsigned int u;
 #endif
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
        DH *dh=NULL,*dhp;
 #endif
        EVP_PKEY *pkey;
@@ -957,7 +957,7 @@ static int ssl3_send_server_key_exchange(SSL *s)
 
                r[0]=r[1]=r[2]=r[3]=NULL;
                n=0;
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
                if (type & SSL_kRSA)
                        {
                        rsa=cert->rsa_tmp;
@@ -987,7 +987,7 @@ static int ssl3_send_server_key_exchange(SSL *s)
                        }
                else
 #endif
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
                        if (type & SSL_kEDH)
                        {
                        dhp=cert->dh_tmp;
@@ -1091,7 +1091,7 @@ static int ssl3_send_server_key_exchange(SSL *s)
                        {
                        /* n is the length of the params, they start at &(d[4])
                         * and p points to the space at the end. */
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
                        if (pkey->type == EVP_PKEY_RSA)
                                {
                                q=md_buf;
@@ -1119,7 +1119,7 @@ static int ssl3_send_server_key_exchange(SSL *s)
                                }
                        else
 #endif
-#if !defined(NO_DSA)
+#if !defined(OPENSSL_NO_DSA)
                                if (pkey->type == EVP_PKEY_DSA)
                                {
                                /* lets do DSS */
@@ -1257,17 +1257,17 @@ static int ssl3_get_client_key_exchange(SSL *s)
        long n;
        unsigned long l;
        unsigned char *p;
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
        RSA *rsa=NULL;
        EVP_PKEY *pkey=NULL;
 #endif
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
        BIGNUM *pub=NULL;
        DH *dh_srvr;
 #endif
-#ifndef NO_KRB5
+#ifndef OPENSSL_NO_KRB5
         KSSL_ERR kssl_err;
-#endif /* NO_KRB5 */
+#endif /* OPENSSL_NO_KRB5 */
 
        n=ssl3_get_message(s,
                SSL3_ST_SR_KEY_EXCH_A,
@@ -1281,7 +1281,7 @@ static int ssl3_get_client_key_exchange(SSL *s)
 
        l=s->s3->tmp.new_cipher->algorithms;
 
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
        if (l & SSL_kRSA)
                {
                /* FIX THIS UP EAY EAY EAY EAY */
@@ -1366,7 +1366,7 @@ static int ssl3_get_client_key_exchange(SSL *s)
                }
        else
 #endif
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
                if (l & (SSL_kEDH|SSL_kDHr|SSL_kDHd))
                {
                n2s(p,i);
@@ -1429,7 +1429,7 @@ static int ssl3_get_client_key_exchange(SSL *s)
                }
        else
 #endif
-#ifndef NO_KRB5
+#ifndef OPENSSL_NO_KRB5
         if (l & SSL_kKRB5)
                 {
                 krb5_error_code        krb5rc;
@@ -1475,7 +1475,7 @@ static int ssl3_get_client_key_exchange(SSL *s)
                 */
                 }
        else
-#endif /* NO_KRB5 */
+#endif /* OPENSSL_NO_KRB5 */
                {
                al=SSL_AD_HANDSHAKE_FAILURE;
                SSLerr(SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE,SSL_R_UNKNOWN_CIPHER_TYPE);
@@ -1485,7 +1485,7 @@ static int ssl3_get_client_key_exchange(SSL *s)
        return(1);
 f_err:
        ssl3_send_alert(s,SSL3_AL_FATAL,al);
-#if !defined(NO_DH) || !defined(NO_RSA)
+#if !defined(OPENSSL_NO_DH) || !defined(OPENSSL_NO_RSA)
 err:
 #endif
        return(-1);
@@ -1574,7 +1574,7 @@ static int ssl3_get_cert_verify(SSL *s)
                goto f_err;
                }
 
-#ifndef NO_RSA 
+#ifndef OPENSSL_NO_RSA 
        if (pkey->type == EVP_PKEY_RSA)
                {
                i=RSA_verify(NID_md5_sha1, s->s3->tmp.cert_verify_md,
@@ -1595,7 +1595,7 @@ static int ssl3_get_cert_verify(SSL *s)
                }
        else
 #endif
-#ifndef NO_DSA
+#ifndef OPENSSL_NO_DSA
                if (pkey->type == EVP_PKEY_DSA)
                {
                j=DSA_verify(pkey->save_type,
@@ -1641,7 +1641,7 @@ static int ssl3_get_client_certificate(SSL *s)
                SSL3_ST_SR_CERT_A,
                SSL3_ST_SR_CERT_B,
                -1,
-#if defined(MSDOS) && !defined(WIN32)
+#if defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_WIN32)
                1024*30, /* 30k max cert list :-) */
 #else
                1024*100, /* 100k max cert list :-) */
index 549c3e8d5e9873c7e6daee0d83d9b0979d81b87f..3d1299ee7b962c9a5eaf0db8f4aebd9d7fdbbb91 100644 (file)
 int SSL_library_init(void)
        {
 
-#ifndef NO_DES
+#ifndef OPENSSL_NO_DES
        EVP_add_cipher(EVP_des_cbc());
        EVP_add_cipher(EVP_des_ede3_cbc());
 #endif
-#ifndef NO_IDEA
+#ifndef OPENSSL_NO_IDEA
        EVP_add_cipher(EVP_idea_cbc());
 #endif
-#ifndef NO_RC4
+#ifndef OPENSSL_NO_RC4
        EVP_add_cipher(EVP_rc4());
 #endif  
-#ifndef NO_RC2
+#ifndef OPENSSL_NO_RC2
        EVP_add_cipher(EVP_rc2_cbc());
 #endif
-#ifndef NO_AES
+#ifndef OPENSSL_NO_AES
        EVP_add_cipher(EVP_aes_128_cbc());
        EVP_add_cipher(EVP_aes_192_cbc());
        EVP_add_cipher(EVP_aes_256_cbc());
 #endif
-#ifndef NO_MD2
+#ifndef OPENSSL_NO_MD2
        EVP_add_digest(EVP_md2());
 #endif
-#ifndef NO_MD5
+#ifndef OPENSSL_NO_MD5
        EVP_add_digest(EVP_md5());
        EVP_add_digest_alias(SN_md5,"ssl2-md5");
        EVP_add_digest_alias(SN_md5,"ssl3-md5");
 #endif
-#ifndef NO_SHA
+#ifndef OPENSSL_NO_SHA
        EVP_add_digest(EVP_sha1()); /* RSA with sha1 */
        EVP_add_digest_alias(SN_sha1,"ssl3-sha1");
        EVP_add_digest_alias(SN_sha1WithRSAEncryption,SN_sha1WithRSA);
 #endif
-#if !defined(NO_SHA) && !defined(NO_DSA)
+#if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_DSA)
        EVP_add_digest(EVP_dss1()); /* DSA with sha1 */
        EVP_add_digest_alias(SN_dsaWithSHA1,SN_dsaWithSHA1_2);
        EVP_add_digest_alias(SN_dsaWithSHA1,"DSS1");
index 85d58c86688a454dd09da025b5dfdb0da8fae2c2..7f4739d10880fbf7d2d806cdf30f541681ff4b91 100644 (file)
 #include <stdio.h>
 
 #include "openssl/e_os.h"
-
 #ifndef NO_SYS_TYPES_H
 # include <sys/types.h>
 #endif
 
-#if !defined(WIN32) && !defined(VSM) && !defined(NeXT) && !defined(MAC_OS_pre_X)
+#if !defined(OPENSSL_SYS_WIN32) && !defined(OPENSSL_SYS_VMS) && !defined(NeXT) && !defined(MAC_OS_pre_X)
 #include <dirent.h>
 #endif
 
@@ -188,7 +187,7 @@ CERT *ssl_cert_dup(CERT *cert)
        ret->mask = cert->mask;
        ret->export_mask = cert->export_mask;
 
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
        if (cert->rsa_tmp != NULL)
                {
                ret->rsa_tmp = cert->rsa_tmp;
@@ -197,7 +196,7 @@ CERT *ssl_cert_dup(CERT *cert)
        ret->rsa_tmp_cb = cert->rsa_tmp_cb;
 #endif
 
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
        if (cert->dh_tmp != NULL)
                {
                /* DH parameters don't have a reference count */
@@ -280,14 +279,14 @@ CERT *ssl_cert_dup(CERT *cert)
 
        return(ret);
        
-#ifndef NO_DH /* avoid 'unreferenced label' warning if NO_DH is defined */
+#ifndef OPENSSL_NO_DH /* avoid 'unreferenced label' warning if OPENSSL_NO_DH is defined */
 err:
 #endif
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
        if (ret->rsa_tmp != NULL)
                RSA_free(ret->rsa_tmp);
 #endif
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
        if (ret->dh_tmp != NULL)
                DH_free(ret->dh_tmp);
 #endif
@@ -324,10 +323,10 @@ void ssl_cert_free(CERT *c)
                }
 #endif
 
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
        if (c->rsa_tmp) RSA_free(c->rsa_tmp);
 #endif
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
        if (c->dh_tmp) DH_free(c->dh_tmp);
 #endif
 
@@ -428,11 +427,11 @@ void ssl_sess_cert_free(SESS_CERT *sc)
 #endif
                }
 
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
        if (sc->peer_rsa_tmp != NULL)
                RSA_free(sc->peer_rsa_tmp);
 #endif
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
        if (sc->peer_dh_tmp != NULL)
                DH_free(sc->peer_dh_tmp);
 #endif
@@ -476,7 +475,7 @@ int ssl_verify_cert_chain(SSL *s,STACK_OF(X509) *sk)
                i=s->ctx->app_verify_callback(&ctx); /* should pass app_verify_arg */
        else
                {
-#ifndef NO_X509_VERIFY
+#ifndef OPENSSL_NO_X509_VERIFY
                i=X509_verify_cert(&ctx);
 #else
                i=0;
@@ -586,7 +585,7 @@ static int xname_cmp(const X509_NAME * const *a, const X509_NAME * const *b)
        return(X509_NAME_cmp(*a,*b));
        }
 
-#ifndef NO_STDIO
+#ifndef OPENSSL_NO_STDIO
 /*!
  * Load CA certs from a file into a ::STACK. Note that it is somewhat misnamed;
  * it doesn't really have anything to do with clients (except that a common use
@@ -716,8 +715,8 @@ err:
  * certs may have been added to \c stack.
  */
 
-#ifndef WIN32
-#ifndef VMS                    /* XXXX This may be fixed in the future */
+#ifndef OPENSSL_SYS_WIN32
+#ifndef OPENSSL_SYS_VMS                /* XXXX This may be fixed in the future */
 #ifndef MAC_OS_pre_X
 
 int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack,
index 368f90e3b8694e8247af45d102cf724c5bf3712c..752ba648ed563e97b3667928a4d9cc136db4cd09 100644 (file)
@@ -300,16 +300,16 @@ static unsigned long ssl_cipher_get_disabled(void)
        unsigned long mask;
 
        mask = SSL_kFZA;
-#ifdef NO_RSA
+#ifdef OPENSSL_NO_RSA
        mask |= SSL_aRSA|SSL_kRSA;
 #endif
-#ifdef NO_DSA
+#ifdef OPENSSL_NO_DSA
        mask |= SSL_aDSS;
 #endif
-#ifdef NO_DH
+#ifdef OPENSSL_NO_DH
        mask |= SSL_kDHr|SSL_kDHd|SSL_kEDH|SSL_aDH;
 #endif
-#ifdef NO_KRB5
+#ifdef OPENSSL_NO_KRB5
        mask |= SSL_kKRB5|SSL_aKRB5;
 #endif
 
index 25d1446e543b21fe13e17ed8ceb31e958c18f9a7..4a4609900244bdb1a33143284efb3bf6cc09a64a 100644 (file)
@@ -63,7 +63,7 @@
 #include <openssl/ssl.h>
 
 /* BEGIN ERROR CODES */
-#ifndef NO_ERR
+#ifndef OPENSSL_NO_ERR
 static ERR_STRING_DATA SSL_str_functs[]=
        {
 {ERR_PACK(0,SSL_F_CLIENT_CERTIFICATE,0),       "CLIENT_CERTIFICATE"},
@@ -432,7 +432,7 @@ void ERR_load_SSL_strings(void)
        if (init)
                {
                init=0;
-#ifndef NO_ERR
+#ifndef OPENSSL_NO_ERR
                ERR_load_strings(ERR_LIB_SSL,SSL_str_functs);
                ERR_load_strings(ERR_LIB_SSL,SSL_str_reasons);
 #endif
index cc089a612b10f23ed0ca2bf2a3c2c8e583954580..ea95a5f983c1e9d26c60c30f0d05d9d7aaa2ea75 100644 (file)
@@ -62,7 +62,7 @@
 
 void SSL_load_error_strings(void)
        {
-#ifndef NO_ERR
+#ifndef OPENSSL_NO_ERR
        ERR_load_crypto_strings();
        ERR_load_SSL_strings();
 #endif
index 24f314e5b93f3302cd1f053a8651df62748ec523..21e4d6e921a5ca88230b0d23277f2b46c2397875 100644 (file)
@@ -191,9 +191,9 @@ SSL *SSL_new(SSL_CTX *ctx)
        if (s == NULL) goto err;
        memset(s,0,sizeof(SSL));
 
-#ifndef        NO_KRB5
+#ifndef        OPENSSL_NO_KRB5
        s->kssl_ctx = kssl_ctx_new();
-#endif /* NO_KRB5 */
+#endif /* OPENSSL_NO_KRB5 */
 
        if (ctx->cert != NULL)
                {
@@ -425,7 +425,7 @@ int SSL_get_fd(SSL *s)
        return(ret);
        }
 
-#ifndef NO_SOCK
+#ifndef OPENSSL_NO_SOCK
 int SSL_set_fd(SSL *s,int fd)
        {
        int ret=0;
@@ -1316,14 +1316,14 @@ void ssl_set_cert_masks(CERT *c, SSL_CIPHER *cipher)
 
        kl=SSL_C_EXPORT_PKEYLENGTH(cipher);
 
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
        rsa_tmp=(c->rsa_tmp != NULL || c->rsa_tmp_cb != NULL);
        rsa_tmp_export=(c->rsa_tmp_cb != NULL ||
                (rsa_tmp && RSA_size(c->rsa_tmp)*8 <= kl));
 #else
        rsa_tmp=rsa_tmp_export=0;
 #endif
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
        dh_tmp=(c->dh_tmp != NULL || c->dh_tmp_cb != NULL);
        dh_tmp_export=(c->dh_tmp_cb != NULL ||
                (dh_tmp && DH_size(c->dh_tmp)*8 <= kl));
@@ -1397,7 +1397,7 @@ void ssl_set_cert_masks(CERT *c, SSL_CIPHER *cipher)
        mask|=SSL_aNULL;
        emask|=SSL_aNULL;
 
-#ifndef NO_KRB5
+#ifndef OPENSSL_NO_KRB5
        mask|=SSL_kKRB5|SSL_aKRB5;
        emask|=SSL_kKRB5|SSL_aKRB5;
 #endif
@@ -1946,7 +1946,7 @@ SSL_CTX *SSL_get_SSL_CTX(SSL *ssl)
        return(ssl->ctx);
        }
 
-#ifndef NO_STDIO
+#ifndef OPENSSL_NO_STDIO
 int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx)
        {
        return(X509_STORE_set_default_paths(ctx->cert_store));
@@ -2048,7 +2048,7 @@ int SSL_want(SSL *s)
  * \param cb the callback
  */
 
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
 void SSL_CTX_set_tmp_rsa_callback(SSL_CTX *ctx,RSA *(*cb)(SSL *ssl,
                                                          int is_export,
                                                          int keylength))
@@ -2085,7 +2085,7 @@ RSA *cb(SSL *ssl,int is_export,int keylength)
  * \param dh the callback
  */
 
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
 void SSL_CTX_set_tmp_dh_callback(SSL_CTX *ctx,DH *(*dh)(SSL *ssl,int is_export,
                                                        int keylength))
     {
@@ -2099,7 +2099,7 @@ void SSL_set_tmp_dh_callback(SSL *ssl,DH *(*dh)(SSL *ssl,int is_export,
     }
 #endif
 
-#if defined(_WINDLL) && defined(WIN16)
+#if defined(_WINDLL) && defined(OPENSSL_SYS_WIN16)
 #include "../crypto/bio/bss_file.c"
 #endif
 
index f0ee7443aa2bb4e8aae6526ee83a122ce3a8459e..55f0b6c5164d89d436bed160356fbfd419887adf 100644 (file)
 #include <openssl/x509.h>
 #include <openssl/err.h>
 #include <openssl/ssl.h>
+#include <openssl/symhacks.h>
 
 #ifdef OPENSSL_BUILD_SHLIBSSL
 # undef OPENSSL_EXTERN
@@ -376,11 +377,11 @@ typedef struct cert_st
        int valid;
        unsigned long mask;
        unsigned long export_mask;
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
        RSA *rsa_tmp;
        RSA *(*rsa_tmp_cb)(SSL *ssl,int is_export,int keysize);
 #endif
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
        DH *dh_tmp;
        DH *(*dh_tmp_cb)(SSL *ssl,int is_export,int keysize);
 #endif
@@ -403,10 +404,10 @@ typedef struct sess_cert_st
        /* Obviously we don't have the private keys of these,
         * so maybe we shouldn't even use the CERT_PKEY type here. */
 
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
        RSA *peer_rsa_tmp; /* not used for SSL 2 */
 #endif
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
        DH *peer_dh_tmp; /* not used for SSL 2 */
 #endif
 
@@ -463,9 +464,9 @@ OPENSSL_EXTERN SSL3_ENC_METHOD ssl3_undef_enc_method;
 OPENSSL_EXTERN SSL_CIPHER ssl2_ciphers[];
 OPENSSL_EXTERN SSL_CIPHER ssl3_ciphers[];
 
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
 #undef SSL_COMP_get_compression_methods
-#define SSL_COMP_get_compression_methods SSL_COMP_get_compress_methods
+#define SSL_COMP_get_compression_methods       SSL_COMP_get_compress_methods
 #endif
 
 
index 34a4d27dbee57df8e8deeeb9515a75fd21758fcb..80d9f798123cff9a835858141c11cb243a0891f5 100644 (file)
@@ -81,7 +81,7 @@ int SSL_use_certificate(SSL *ssl, X509 *x)
        return(ssl_set_cert(ssl->cert,x));
        }
 
-#ifndef NO_STDIO
+#ifndef OPENSSL_NO_STDIO
 int SSL_use_certificate_file(SSL *ssl, const char *file, int type)
        {
        int j;
@@ -148,7 +148,7 @@ int SSL_use_certificate_ASN1(SSL *ssl, unsigned char *d, int len)
        return(ret);
        }
 
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
 int SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa)
        {
        EVP_PKEY *pkey;
@@ -198,7 +198,7 @@ static int ssl_set_pkey(CERT *c, EVP_PKEY *pkey)
                EVP_PKEY_free(pktmp);
                ERR_clear_error();
 
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
                /* Don't check the public/private key, this is mostly
                 * for smart cards. */
                if ((pkey->type == EVP_PKEY_RSA) &&
@@ -251,8 +251,8 @@ static int ssl_set_pkey(CERT *c, EVP_PKEY *pkey)
        return(1);
        }
 
-#ifndef NO_RSA
-#ifndef NO_STDIO
+#ifndef OPENSSL_NO_RSA
+#ifndef OPENSSL_NO_STDIO
 int SSL_use_RSAPrivateKey_file(SSL *ssl, const char *file, int type)
        {
        int j,ret=0;
@@ -317,7 +317,7 @@ int SSL_use_RSAPrivateKey_ASN1(SSL *ssl, unsigned char *d, long len)
        RSA_free(rsa);
        return(ret);
        }
-#endif /* !NO_RSA */
+#endif /* !OPENSSL_NO_RSA */
 
 int SSL_use_PrivateKey(SSL *ssl, EVP_PKEY *pkey)
        {
@@ -337,7 +337,7 @@ int SSL_use_PrivateKey(SSL *ssl, EVP_PKEY *pkey)
        return(ret);
        }
 
-#ifndef NO_STDIO
+#ifndef OPENSSL_NO_STDIO
 int SSL_use_PrivateKey_file(SSL *ssl, const char *file, int type)
        {
        int j,ret=0;
@@ -438,7 +438,7 @@ static int ssl_set_cert(CERT *c, X509 *x)
                EVP_PKEY_copy_parameters(pkey,c->pkeys[i].privatekey);
                ERR_clear_error();
 
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
                /* Don't check the public/private key, this is mostly
                 * for smart cards. */
                if ((c->pkeys[i].privatekey->type == EVP_PKEY_RSA) &&
@@ -471,7 +471,7 @@ static int ssl_set_cert(CERT *c, X509 *x)
                        }
                else
                        ok=1;
-               } /* NO_RSA */
+               } /* OPENSSL_NO_RSA */
                }
        else
                ok=1;
@@ -493,7 +493,7 @@ static int ssl_set_cert(CERT *c, X509 *x)
        return(1);
        }
 
-#ifndef NO_STDIO
+#ifndef OPENSSL_NO_STDIO
 int SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file, int type)
        {
        int j;
@@ -560,7 +560,7 @@ int SSL_CTX_use_certificate_ASN1(SSL_CTX *ctx, int len, unsigned char *d)
        return(ret);
        }
 
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
 int SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa)
        {
        int ret;
@@ -590,7 +590,7 @@ int SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa)
        return(ret);
        }
 
-#ifndef NO_STDIO
+#ifndef OPENSSL_NO_STDIO
 int SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file, int type)
        {
        int j,ret=0;
@@ -655,7 +655,7 @@ int SSL_CTX_use_RSAPrivateKey_ASN1(SSL_CTX *ctx, unsigned char *d, long len)
        RSA_free(rsa);
        return(ret);
        }
-#endif /* !NO_RSA */
+#endif /* !OPENSSL_NO_RSA */
 
 int SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey)
        {
@@ -672,7 +672,7 @@ int SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey)
        return(ssl_set_pkey(ctx->cert,pkey));
        }
 
-#ifndef NO_STDIO
+#ifndef OPENSSL_NO_STDIO
 int SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type)
        {
        int j,ret=0;
@@ -735,7 +735,7 @@ int SSL_CTX_use_PrivateKey_ASN1(int type, SSL_CTX *ctx, unsigned char *d,
        }
 
 
-#ifndef NO_STDIO
+#ifndef OPENSSL_NO_STDIO
 /* Read a file that contains our certificate in "PEM" format,
  * possibly followed by a sequence of CA certificates that should be
  * sent to the peer in the Certificate message.
index 8e12461f3b8c71a530b01d8de46b99e891c1e43a..8355e9b859fbe978034c4792289600760087a17e 100644 (file)
@@ -74,7 +74,7 @@ case SSL_ST_BEFORE|SSL_ST_CONNECT: str="before/connect initialization"; break;
 case SSL_ST_OK|SSL_ST_CONNECT: str="ok/connect SSL initialization"; break;
 case SSL_ST_BEFORE|SSL_ST_ACCEPT: str="before/accept initialization"; break;
 case SSL_ST_OK|SSL_ST_ACCEPT: str="ok/accept SSL initialization"; break;
-#ifndef NO_SSL2
+#ifndef OPENSSL_NO_SSL2
 case SSL2_ST_CLIENT_START_ENCRYPTION: str="SSLv2 client start encryption"; break;
 case SSL2_ST_SERVER_START_ENCRYPTION: str="SSLv2 server start encryption"; break;
 case SSL2_ST_SEND_CLIENT_HELLO_A: str="SSLv2 write client hello A"; break;
@@ -115,7 +115,7 @@ case SSL2_ST_X509_GET_SERVER_CERTIFICATE: str="SSLv2 X509 read server certificat
 case SSL2_ST_X509_GET_CLIENT_CERTIFICATE: str="SSLv2 X509 read client certificate"; break;
 #endif
 
-#ifndef NO_SSL3
+#ifndef OPENSSL_NO_SSL3
 /* SSLv3 additions */
 case SSL3_ST_CW_CLNT_HELLO_A:  str="SSLv3 write client hello A"; break;
 case SSL3_ST_CW_CLNT_HELLO_B:  str="SSLv3 write client hello B"; break;
@@ -182,7 +182,7 @@ case SSL3_ST_SR_CERT_VRFY_A:        str="SSLv3 read certificate verify A"; break;
 case SSL3_ST_SR_CERT_VRFY_B:   str="SSLv3 read certificate verify B"; break;
 #endif
 
-#if !defined(NO_SSL2) && !defined(NO_SSL3)
+#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
 /* SSLv2/v3 compatibility states */
 /* client */
 case SSL23_ST_CW_CLNT_HELLO_A: str="SSLv2/v3 write client hello A"; break;
@@ -223,7 +223,7 @@ case SSL_ST_BEFORE:                         str="PINIT "; break;
 case SSL_ST_ACCEPT:                            str="AINIT "; break;
 case SSL_ST_CONNECT:                           str="CINIT "; break;
 case SSL_ST_OK:                                        str="SSLOK "; break;
-#ifndef NO_SSL2
+#ifndef OPENSSL_NO_SSL2
 case SSL2_ST_CLIENT_START_ENCRYPTION:          str="2CSENC"; break;
 case SSL2_ST_SERVER_START_ENCRYPTION:          str="2SSENC"; break;
 case SSL2_ST_SEND_CLIENT_HELLO_A:              str="2SCH_A"; break;
@@ -264,7 +264,7 @@ case SSL2_ST_X509_GET_SERVER_CERTIFICATE:   str="2X9GSC"; break;
 case SSL2_ST_X509_GET_CLIENT_CERTIFICATE:      str="2X9GCC"; break;
 #endif
 
-#ifndef NO_SSL3
+#ifndef OPENSSL_NO_SSL3
 /* SSLv3 additions */
 case SSL3_ST_SW_FLUSH:
 case SSL3_ST_CW_FLUSH:                         str="3FLUSH"; break;
@@ -330,7 +330,7 @@ case SSL3_ST_SR_CERT_VRFY_A:                        str="3RCV_A"; break;
 case SSL3_ST_SR_CERT_VRFY_B:                   str="3RCV_B"; break;
 #endif
 
-#if !defined(NO_SSL2) && !defined(NO_SSL3)
+#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
 /* SSLv2/v3 compatibility states */
 /* client */
 case SSL23_ST_CW_CLNT_HELLO_A:                 str="23WCHA"; break;
index 6e33eec3e4f7de3c0d862d1927d6038484759743..8b37a37e404ac8c63a7e9bd5ab1d694b4f4fd804 100644 (file)
@@ -60,7 +60,7 @@
 #include <openssl/buffer.h>
 #include "ssl_locl.h"
 
-#ifndef NO_FP_API
+#ifndef OPENSSL_NO_FP_API
 int SSL_SESSION_print_fp(FILE *fp, SSL_SESSION *x)
        {
        BIO *b;
index 9d513baf8089f81f07a5c30800eda54c648d017f..cbcb00c89b1ec4daf792862050a2bb2bd8b06c89 100644 (file)
 #include <openssl/ssl.h>
 #include <openssl/err.h>
 #include <openssl/rand.h>
-#ifdef WINDOWS
+#ifdef OPENSSL_SYS_WINDOWS
 #include <winsock.h>
 #include "../crypto/bio/bss_file.c"
 #endif
 
-#ifdef VMS
+#ifdef OPENSSL_SYS_VMS
 #  define TEST_SERVER_CERT "SYS$DISK:[-.APPS]SERVER.PEM"
 #  define TEST_CLIENT_CERT "SYS$DISK:[-.APPS]CLIENT.PEM"
 #else
 #define COMP_ZLIB      2
 
 static int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx);
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
 static RSA MS_CALLBACK *tmp_rsa_cb(SSL *s, int is_export,int keylength);
 static void free_tmp_rsa(void);
 #endif
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
 static DH *get_dh512(void);
 static DH *get_dh1024(void);
 static DH *get_dh1024dsa(void);
@@ -183,18 +183,18 @@ static void sv_usage(void)
        fprintf(stderr," -reuse        - use session-id reuse\n");
        fprintf(stderr," -num <val>    - number of connections to perform\n");
        fprintf(stderr," -bytes <val>  - number of bytes to swap between client/server\n");
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
        fprintf(stderr," -dhe1024      - use 1024 bit key (safe prime) for DHE\n");
        fprintf(stderr," -dhe1024dsa   - use 1024 bit key (with 160-bit subprime) for DHE\n");
        fprintf(stderr," -no_dhe       - disable DHE\n");
 #endif
-#ifndef NO_SSL2
+#ifndef OPENSSL_NO_SSL2
        fprintf(stderr," -ssl2         - use SSLv2\n");
 #endif
-#ifndef NO_SSL3
+#ifndef OPENSSL_NO_SSL3
        fprintf(stderr," -ssl3         - use SSLv3\n");
 #endif
-#ifndef NO_TLS1
+#ifndef OPENSSL_NO_TLS1
        fprintf(stderr," -tls1         - use TLSv1\n");
 #endif
        fprintf(stderr," -CApath arg   - PEM format directory of CA's\n");
@@ -230,7 +230,7 @@ static void print_details(SSL *c_ssl, const char *prefix)
                        {
                        if (0) 
                                ;
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
                        else if (pkey->type == EVP_PKEY_RSA && pkey->pkey.rsa != NULL
                                && pkey->pkey.rsa->n != NULL)
                                {
@@ -238,7 +238,7 @@ static void print_details(SSL *c_ssl, const char *prefix)
                                        BN_num_bits(pkey->pkey.rsa->n));
                                }
 #endif
-#ifndef NO_DSA
+#ifndef OPENSSL_NO_DSA
                        else if (pkey->type == EVP_PKEY_DSA && pkey->pkey.dsa != NULL
                                && pkey->pkey.dsa->p != NULL)
                                {
@@ -337,7 +337,7 @@ int main(int argc, char *argv[])
        SSL *c_ssl,*s_ssl;
        int number=1,reuse=0;
        long bytes=1L;
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
        DH *dh;
        int dhe1024 = 0, dhe1024dsa = 0;
 #endif
@@ -375,7 +375,7 @@ int main(int argc, char *argv[])
                        debug=1;
                else if (strcmp(*argv,"-reuse") == 0)
                        reuse=1;
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
                else if (strcmp(*argv,"-dhe1024") == 0)
                        dhe1024=1;
                else if (strcmp(*argv,"-dhe1024dsa") == 0)
@@ -527,7 +527,7 @@ bad:
                        }
                }
 
-#if !defined(NO_SSL2) && !defined(NO_SSL3)
+#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3)
        if (ssl2)
                meth=SSLv2_method();
        else 
@@ -539,7 +539,7 @@ bad:
        else
                meth=SSLv23_method();
 #else
-#ifdef NO_SSL2
+#ifdef OPENSSL_NO_SSL2
        meth=SSLv3_method();
 #else
        meth=SSLv2_method();
@@ -560,7 +560,7 @@ bad:
                SSL_CTX_set_cipher_list(s_ctx,cipher);
                }
 
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
        if (!no_dhe)
                {
                if (dhe1024dsa)
@@ -580,7 +580,7 @@ bad:
        (void)no_dhe;
 #endif
 
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
        SSL_CTX_set_tmp_rsa_callback(s_ctx,tmp_rsa_cb);
 #endif
 
@@ -636,7 +636,7 @@ bad:
        c_ssl=SSL_new(c_ctx);
        s_ssl=SSL_new(s_ctx);
 
-#ifndef NO_KRB5
+#ifndef OPENSSL_NO_KRB5
        if (c_ssl  &&  c_ssl->kssl_ctx)
                 {
                 char   localhost[257];
@@ -647,7 +647,7 @@ bad:
                                 localhost);
                        }
                }
-#endif    /* NO_KRB5  */
+#endif    /* OPENSSL_NO_KRB5  */
 
        for (i=0; i<number; i++)
                {
@@ -695,7 +695,7 @@ end:
 
        if (bio_stdout != NULL) BIO_free(bio_stdout);
 
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
        free_tmp_rsa();
 #endif
        ERR_free_strings();
@@ -1411,7 +1411,7 @@ static int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx)
        return(ok);
        }
 
-#ifndef NO_RSA
+#ifndef OPENSSL_NO_RSA
 static RSA *rsa_tmp=NULL;
 
 static RSA MS_CALLBACK *tmp_rsa_cb(SSL *s, int is_export, int keylength)
@@ -1437,7 +1437,7 @@ static void free_tmp_rsa(void)
        }
 #endif
 
-#ifndef NO_DH
+#ifndef OPENSSL_NO_DH
 /* These DH parameters have been generated as follows:
  *    $ openssl dhparam -C -noout 512
  *    $ openssl dhparam -C -noout 1024