spray the apps directory with anti-VMS napalm.
authortedu <tedu@openbsd.org>
Wed, 16 Apr 2014 02:14:27 +0000 (02:14 +0000)
committertedu <tedu@openbsd.org>
Wed, 16 Apr 2014 02:14:27 +0000 (02:14 +0000)
so that its lovecraftian horror is not forever lost, i reproduce below
a comment from the deleted code.

        /* 2011-03-22 SMS.
         * If we have 32-bit pointers everywhere, then we're safe, and
         * we bypass this mess, as on non-VMS systems.  (See ARGV,
         * above.)
         * Problem 1: Compaq/HP C before V7.3 always used 32-bit
         * pointers for argv[].
         * Fix 1: For a 32-bit argv[], when we're using 64-bit pointers
         * everywhere else, we always allocate and use a 64-bit
         * duplicate of argv[].
         * Problem 2: Compaq/HP C V7.3 (Alpha, IA64) before ECO1 failed
         * to NULL-terminate a 64-bit argv[].  (As this was written, the
         * compiler ECO was available only on IA64.)
         * Fix 2: Unless advised not to (VMS_TRUST_ARGV), we test a
         * 64-bit argv[argc] for NULL, and, if necessary, use a
         * (properly) NULL-terminated (64-bit) duplicate of argv[].
         * The same code is used in either case to duplicate argv[].
         * Some of these decisions could be handled in preprocessing,
         * but the code tends to get even uglier, and the penalty for
         * deciding at compile- or run-time is tiny.
         */

46 files changed:
lib/libssl/src/apps/apps.c
lib/libssl/src/apps/asn1pars.c
lib/libssl/src/apps/ca.c
lib/libssl/src/apps/ciphers.c
lib/libssl/src/apps/cms.c
lib/libssl/src/apps/crl.c
lib/libssl/src/apps/crl2p7.c
lib/libssl/src/apps/dgst.c
lib/libssl/src/apps/dh.c
lib/libssl/src/apps/dhparam.c
lib/libssl/src/apps/dsa.c
lib/libssl/src/apps/dsaparam.c
lib/libssl/src/apps/ec.c
lib/libssl/src/apps/ecparam.c
lib/libssl/src/apps/enc.c
lib/libssl/src/apps/engine.c
lib/libssl/src/apps/errstr.c
lib/libssl/src/apps/gendh.c
lib/libssl/src/apps/gendsa.c
lib/libssl/src/apps/genpkey.c
lib/libssl/src/apps/genrsa.c
lib/libssl/src/apps/nseq.c
lib/libssl/src/apps/ocsp.c
lib/libssl/src/apps/openssl.c
lib/libssl/src/apps/passwd.c
lib/libssl/src/apps/pkcs12.c
lib/libssl/src/apps/pkcs7.c
lib/libssl/src/apps/pkcs8.c
lib/libssl/src/apps/pkey.c
lib/libssl/src/apps/pkeyparam.c
lib/libssl/src/apps/pkeyutl.c
lib/libssl/src/apps/prime.c
lib/libssl/src/apps/rand.c
lib/libssl/src/apps/req.c
lib/libssl/src/apps/rsa.c
lib/libssl/src/apps/rsautl.c
lib/libssl/src/apps/s_apps.h
lib/libssl/src/apps/s_client.c
lib/libssl/src/apps/s_server.c
lib/libssl/src/apps/s_socket.c
lib/libssl/src/apps/sess_id.c
lib/libssl/src/apps/smime.c
lib/libssl/src/apps/speed.c
lib/libssl/src/apps/spkac.c
lib/libssl/src/apps/srp.c
lib/libssl/src/apps/x509.c

index 4ec9960..5162c01 100644 (file)
  *
  */
 
-#if !defined(_POSIX_C_SOURCE) && defined(OPENSSL_SYS_VMS)
-#define _POSIX_C_SOURCE 2      /* On VMS, you need to define this to get
-                                  the declaration of fileno().  The value
-                                  2 is to make sure no function defined
-                                  in POSIX-2 is left undefined. */
-#endif
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -335,34 +329,6 @@ void program_name(char *in, char *out, int size)
        out[n]='\0';
        }
 #else
-#ifdef OPENSSL_SYS_VMS
-void program_name(char *in, char *out, int size)
-       {
-       char *p=in, *q;
-       char *chars=":]>";
-
-       while(*chars != '\0')
-               {
-               q=strrchr(p,*chars);
-               if (q > p)
-                       p = q + 1;
-               chars++;
-               }
-
-       q=strrchr(p,'.');
-       if (q == NULL)
-               q = p + strlen(p);
-       strncpy(out,p,size-1);
-       if (q-p >= size)
-               {
-               out[size-1]='\0';
-               }
-       else
-               {
-               out[q-p]='\0';
-               }
-       }
-#else
 void program_name(char *in, char *out, int size)
        {
        char *p;
@@ -375,7 +341,6 @@ void program_name(char *in, char *out, int size)
        BUF_strlcpy(out,p,size);
        }
 #endif
-#endif
 
 int chopup_args(ARGS *arg, char *buf, int *argc, char **argv[])
        {
@@ -1543,9 +1508,7 @@ char *make_config_name()
        len=strlen(t)+strlen(OPENSSL_CONF)+2;
        p=OPENSSL_malloc(len);
        BUF_strlcpy(p,t,len);
-#ifndef OPENSSL_SYS_VMS
        BUF_strlcat(p,"/",len);
-#endif
        BUF_strlcat(p,OPENSSL_CONF,len);
 
        return p;
index 0d66070..0ff3cdf 100644 (file)
@@ -224,12 +224,6 @@ bad:
                goto end;
                }
        BIO_set_fp(out,stdout,BIO_NOCLOSE|BIO_FP_TEXT);
-#ifdef OPENSSL_SYS_VMS
-       {
-       BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-       out = BIO_push(tmpbio, out);
-       }
-#endif
 
        if (oidfile != NULL)
                {
index 6f37e02..4c71aa2 100644 (file)
 #include <openssl/pem.h>
 
 #ifndef W_OK
-#  ifdef OPENSSL_SYS_VMS
-#    if defined(__DECC)
-#      include <unistd.h>
-#    else
-#      include <unixlib.h>
-#    endif
-#  elif !defined(OPENSSL_SYS_VXWORKS) && !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_NETWARE)
 #    include <sys/file.h>
-#  endif
 #endif
 
 #include "apps.h"
@@ -587,16 +579,10 @@ bad:
                const char *s=X509_get_default_cert_area();
                size_t len;
 
-#ifdef OPENSSL_SYS_VMS
-               len = strlen(s)+sizeof(CONFIG_FILE);
-               tofree=OPENSSL_malloc(len);
-               strcpy(tofree,s);
-#else
                len = strlen(s)+sizeof(CONFIG_FILE)+1;
                tofree=OPENSSL_malloc(len);
                BUF_strlcpy(tofree,s,len);
                BUF_strlcat(tofree,"/",len);
-#endif
                BUF_strlcat(tofree,CONFIG_FILE,len);
                configfile=tofree;
                }
@@ -854,7 +840,6 @@ bad:
                        BIO_printf(bio_err,"there needs to be defined a directory for new certificate to be placed in\n");
                        goto err;
                        }
-#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()
@@ -882,7 +867,6 @@ bad:
                        perror(outdir);
                        goto err;
                        }
-#endif
                }
 
        /*****************************************************************/
@@ -943,12 +927,6 @@ bad:
        if (verbose)
                {
                BIO_set_fp(out,stdout,BIO_NOCLOSE|BIO_FP_TEXT); /* cannot fail */
-#ifdef OPENSSL_SYS_VMS
-               {
-               BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-               out = BIO_push(tmpbio, out);
-               }
-#endif
                TXT_DB_write(out,db->db);
                BIO_printf(bio_err,"%d entries loaded from the database\n",
                           sk_OPENSSL_PSTRING_num(db->db->data));
@@ -1026,12 +1004,6 @@ bad:
                else
                        {
                        BIO_set_fp(Sout,stdout,BIO_NOCLOSE|BIO_FP_TEXT);
-#ifdef OPENSSL_SYS_VMS
-                       {
-                       BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-                       Sout = BIO_push(tmpbio, Sout);
-                       }
-#endif
                        }
                }
 
@@ -1319,9 +1291,7 @@ bad:
 
                        strlcpy(buf[2],outdir,sizeof(buf[2]));
 
-#ifndef OPENSSL_SYS_VMS
                        BUF_strlcat(buf[2],"/",sizeof(buf[2]));
-#endif
 
                        n=(char *)&(buf[2][strlen(buf[2])]);
                        if (j > 0)
index 1906ca8..b5ab166 100644 (file)
@@ -103,12 +103,6 @@ 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 OPENSSL_SYS_VMS
-       {
-       BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-       STDout = BIO_push(tmpbio, STDout);
-       }
-#endif
        if (!load_config(bio_err, NULL))
                goto end;
 
index 5f77f8f..801d523 100644 (file)
@@ -878,12 +878,6 @@ int MAIN(int argc, char **argv)
        else
                {
                out = BIO_new_fp(stdout, BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-               {
-                   BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-                   out = BIO_push(tmpbio, out);
-               }
-#endif
                }
 
        if ((operation == SMIME_VERIFY) || (operation == SMIME_VERIFY_RECEIPT))
index 8797d30..88e6065 100644 (file)
@@ -137,12 +137,6 @@ int MAIN(int argc, char **argv)
                if ((bio_out=BIO_new(BIO_s_file())) != NULL)
                        {
                        BIO_set_fp(bio_out,stdout,BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-                       {
-                       BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-                       bio_out = BIO_push(tmpbio, bio_out);
-                       }
-#endif
                        }
 
        informat=FORMAT_PEM;
@@ -372,12 +366,6 @@ bad:
        if (outfile == NULL)
                {
                BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-               {
-               BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-               out = BIO_push(tmpbio, out);
-               }
-#endif
                }
        else
                {
index bbc8377..2020709 100644 (file)
@@ -241,12 +241,6 @@ bad:
        if (outfile == NULL)
                {
                BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-               {
-               BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-               out = BIO_push(tmpbio, out);
-               }
-#endif
                }
        else
                {
index f4aec77..0615fa8 100644 (file)
@@ -328,12 +328,6 @@ int MAIN(int argc, char **argv)
                else    out = BIO_new_file(outfile, "w");
        } else {
                out = BIO_new_fp(stdout, BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-               {
-               BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-               out = BIO_push(tmpbio, out);
-               }
-#endif
        }
 
        if(!out) {
index dee9c01..5f53426 100644 (file)
@@ -210,12 +210,6 @@ bad:
        if (outfile == NULL)
                {
                BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-               {
-               BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-               out = BIO_push(tmpbio, out);
-               }
-#endif
                }
        else
                {
index 93bab90..193e59b 100644 (file)
@@ -416,12 +416,6 @@ bad:
        if (outfile == NULL)
                {
                BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-               {
-               BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-               out = BIO_push(tmpbio, out);
-               }
-#endif
                }
        else
                {
index 5222487..45bac4a 100644 (file)
@@ -293,12 +293,6 @@ bad:
        if (outfile == NULL)
                {
                BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-               {
-               BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-               out = BIO_push(tmpbio, out);
-               }
-#endif
                }
        else
                {
index ad609fd..47f8c83 100644 (file)
@@ -258,12 +258,6 @@ bad:
        if (outfile == NULL)
                {
                BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-               {
-               BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-               out = BIO_push(tmpbio, out);
-               }
-#endif
                }
        else
                {
index 896eabc..dd3bb9d 100644 (file)
@@ -311,12 +311,6 @@ bad:
        if (outfile == NULL)
                {
                BIO_set_fp(out, stdout, BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-                       {
-                       BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-                       out = BIO_push(tmpbio, out);
-                       }
-#endif
                }
        else
                {
index 976ebef..17e28cf 100644 (file)
@@ -320,12 +320,6 @@ bad:
        if (outfile == NULL)
                {
                BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-               {
-               BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-               out = BIO_push(tmpbio, out);
-               }
-#endif
                }
        else
                {
index ab97489..16e98b8 100644 (file)
@@ -456,12 +456,6 @@ bad:
                if (bufsize != NULL)
                        setvbuf(stdout, (char *)NULL, _IONBF, 0);
 #endif /* ndef OPENSSL_NO_SETVBUF_IONBF */
-#ifdef OPENSSL_SYS_VMS
-               {
-               BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-               out = BIO_push(tmpbio, out);
-               }
-#endif
                }
        else
                {
index 9a02943..33eeaf9 100644 (file)
@@ -360,12 +360,6 @@ int MAIN(int argc, char **argv)
        if (!load_config(bio_err, NULL))
                goto end;
        bio_out=BIO_new_fp(stdout,BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-       {
-       BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-       bio_out = BIO_push(tmpbio, bio_out);
-       }
-#endif
 
        argc--;
        argv++;
index fe3b980..f9b4a4f 100644 (file)
@@ -91,12 +91,6 @@ int MAIN(int argc, char **argv)
                out=BIO_new(BIO_s_file());
                if ((out != NULL) && BIO_set_fp(out,stdout,BIO_NOCLOSE))
                        {
-#ifdef OPENSSL_SYS_VMS
-                       {
-                       BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-                       out = BIO_push(tmpbio, out);
-                       }
-#endif
                        lh_ERR_STRING_DATA_node_stats_bio(
                                                  ERR_get_string_table(), out);
                        lh_ERR_STRING_DATA_stats_bio(ERR_get_string_table(),
index 6ef7eb9..c80fc0c 100644 (file)
@@ -173,12 +173,6 @@ bad:
        if (outfile == NULL)
                {
                BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-               {
-               BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-               out = BIO_push(tmpbio, out);
-               }
-#endif
                }
        else
                {
index 62ea977..612bdfb 100644 (file)
@@ -233,12 +233,6 @@ bad:
        if (outfile == NULL)
                {
                BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-               {
-               BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-               out = BIO_push(tmpbio, out);
-               }
-#endif
                }
        else
                {
index 6dfda08..24b623a 100644 (file)
@@ -233,12 +233,6 @@ int MAIN(int argc, char **argv)
        else
                {
                out = BIO_new_fp (stdout, BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-                       {
-                       BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-                       out = BIO_push(tmpbio, out);
-                       }
-#endif
                }
 
        EVP_PKEY_CTX_set_cb(ctx, genpkey_cb);
index d3064b6..bdc8778 100644 (file)
@@ -238,12 +238,6 @@ bad:
        if (outfile == NULL)
                {
                BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-               {
-               BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-               out = BIO_push(tmpbio, out);
-               }
-#endif
                }
        else
                {
index e3c4dba..4abb436 100644 (file)
@@ -121,12 +121,6 @@ int MAIN(int argc, char **argv)
                }
        } else {
                out = BIO_new_fp(stdout, BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-               {
-               BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-               out = BIO_push(tmpbio, out);
-               }
-#endif
        }
        if (toseq) {
                seq = NETSCAPE_CERT_SEQUENCE_new();
index b0ec7cd..1713467 100644 (file)
  */
 #ifndef OPENSSL_NO_OCSP
 
-#ifdef OPENSSL_SYS_VMS
-#define _XOPEN_SOURCE_EXTENDED /* So fd_set and friends get properly defined
-                                  on OpenVMS */
-#endif
-
 #define USE_SOCKETS
 
 #include <stdio.h>
index e40be80..8bd7108 100644 (file)
@@ -216,11 +216,7 @@ static void lock_dbg_cb(int mode, int type, const char *file, int line)
                }
        }
 
-#if defined( OPENSSL_SYS_VMS) && (__INITIAL_POINTER_SIZE == 64)
-# define ARGV _Argv
-#else
 # define ARGV Argv
-#endif
 
 int main(int Argc, char *ARGV[])
        {
@@ -237,54 +233,6 @@ int main(int Argc, char *ARGV[])
        LHASH_OF(FUNCTION) *prog=NULL;
        long errline;
 
-#if defined( OPENSSL_SYS_VMS) && (__INITIAL_POINTER_SIZE == 64)
-       /* 2011-03-22 SMS.
-        * If we have 32-bit pointers everywhere, then we're safe, and
-        * we bypass this mess, as on non-VMS systems.  (See ARGV,
-        * above.)
-        * Problem 1: Compaq/HP C before V7.3 always used 32-bit
-        * pointers for argv[].
-        * Fix 1: For a 32-bit argv[], when we're using 64-bit pointers
-        * everywhere else, we always allocate and use a 64-bit
-        * duplicate of argv[].
-        * Problem 2: Compaq/HP C V7.3 (Alpha, IA64) before ECO1 failed
-        * to NULL-terminate a 64-bit argv[].  (As this was written, the
-        * compiler ECO was available only on IA64.)
-        * Fix 2: Unless advised not to (VMS_TRUST_ARGV), we test a
-        * 64-bit argv[argc] for NULL, and, if necessary, use a
-        * (properly) NULL-terminated (64-bit) duplicate of argv[].
-        * The same code is used in either case to duplicate argv[].
-        * Some of these decisions could be handled in preprocessing,
-        * but the code tends to get even uglier, and the penalty for
-        * deciding at compile- or run-time is tiny.
-        */
-       char **Argv = NULL;
-       int free_Argv = 0;
-
-       if ((sizeof( _Argv) < 8)        /* 32-bit argv[]. */
-# if !defined( VMS_TRUST_ARGV)
-        || (_Argv[ Argc] != NULL)      /* Untrusted argv[argc] not NULL. */
-# endif
-               )
-               {
-               int i;
-               Argv = OPENSSL_malloc( (Argc+ 1)* sizeof( char *));
-               if (Argv == NULL)
-                       { ret = -1; goto end; }
-               for(i = 0; i < Argc; i++)
-                       Argv[i] = _Argv[i];
-               Argv[ Argc] = NULL;     /* Certain NULL termination. */
-               free_Argv = 1;
-               }
-       else
-               {
-               /* Use the known-good 32-bit argv[] (which needs the
-                * type cast to satisfy the compiler), or the trusted or
-                * tested-good 64-bit argv[] as-is. */
-               Argv = (char **)_Argv;
-               }
-#endif /* defined( OPENSSL_SYS_VMS) && (__INITIAL_POINTER_SIZE == 64) */
-
        arg.data=NULL;
        arg.count=0;
 
@@ -443,13 +391,6 @@ end:
                BIO_free(bio_err);
                bio_err=NULL;
                }
-#if defined( OPENSSL_SYS_VMS) && (__INITIAL_POINTER_SIZE == 64)
-       /* Free any duplicate Argv[] storage. */
-       if (free_Argv)
-               {
-               OPENSSL_free(Argv);
-               }
-#endif
        OPENSSL_EXIT(ret);
        }
 
@@ -492,12 +433,6 @@ static int do_cmd(LHASH_OF(FUNCTION) *prog, int argc, char *argv[])
        else if ((strncmp(argv[0],"no-",3)) == 0)
                {
                BIO *bio_stdout = BIO_new_fp(stdout,BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-               {
-               BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-               bio_stdout = BIO_push(tmpbio, bio_stdout);
-               }
-#endif
                f.name=argv[0]+3;
                ret = (lh_FUNCTION_retrieve(prog,&f) != NULL);
                if (!ret)
@@ -538,12 +473,6 @@ static int do_cmd(LHASH_OF(FUNCTION) *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 OPENSSL_SYS_VMS
-               {
-               BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-               bio_stdout = BIO_push(tmpbio, bio_stdout);
-               }
-#endif
 
                if (!load_config(bio_err, NULL))
                        goto end;
index 9eabeb4..cb30f81 100644 (file)
@@ -85,12 +85,6 @@ int MAIN(int argc, char **argv)
        if (out == NULL)
                goto err;
        BIO_set_fp(out, stdout, BIO_NOCLOSE | BIO_FP_TEXT);
-#ifdef OPENSSL_SYS_VMS
-       {
-       BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-       out = BIO_push(tmpbio, out);
-       }
-#endif
 
        badopt = 0, opt_done = 0;
        i = 0;
index 4d62a7b..f099e8f 100644 (file)
@@ -398,12 +398,6 @@ int MAIN(int argc, char **argv)
 
     if (!outfile) {
        out = BIO_new_fp(stdout, BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-       {
-           BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-           out = BIO_push(tmpbio, out);
-       }
-#endif
     } else out = BIO_new_file(outfile, "wb");
     if (!out) {
        BIO_printf(bio_err, "Error opening output file %s\n",
index ae6cd33..272bf11 100644 (file)
@@ -221,12 +221,6 @@ bad:
        if (outfile == NULL)
                {
                BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-               {
-               BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-               out = BIO_push(tmpbio, out);
-               }
-#endif
                }
        else
                {
index 7edeb17..90b2ebe 100644 (file)
@@ -266,12 +266,6 @@ int MAIN(int argc, char **argv)
        else
                {
                out = BIO_new_fp (stdout, BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-                       {
-                       BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-                       out = BIO_push(tmpbio, out);
-                       }
-#endif
                }
        if (topk8)
                {
index 17e6702..a55714d 100644 (file)
@@ -219,12 +219,6 @@ int MAIN(int argc, char **argv)
        else
                {
                out = BIO_new_fp (stdout, BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-                       {
-                       BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-                       out = BIO_push(tmpbio, out);
-                       }
-#endif
                }
 
        if (pubin)
index 6f7a357..6a46c8a 100644 (file)
@@ -167,12 +167,6 @@ int MAIN(int argc, char **argv)
        else
                {
                out = BIO_new_fp (stdout, BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-                       {
-                       BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-                       out = BIO_push(tmpbio, out);
-                       }
-#endif
                }
 
        pkey = PEM_read_bio_Parameters(in, NULL);
index 7eb3f5c..8b260ca 100644 (file)
@@ -278,12 +278,6 @@ int MAIN(int argc, char **argv)
        else
                {
                out = BIO_new_fp(stdout, BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-               {
-                   BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-                   out = BIO_push(tmpbio, out);
-               }
-#endif
        }
 
        if (sigfile)
index f1aaef8..031906a 100644 (file)
@@ -112,12 +112,6 @@ int MAIN(int argc, char **argv)
     if ((bio_out=BIO_new(BIO_s_file())) != NULL)
        {
        BIO_set_fp(bio_out,stdout,BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-           {
-           BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-           bio_out = BIO_push(tmpbio, bio_out);
-           }
-#endif
        }
 
     if(generate)
index 790e795..884c244 100644 (file)
@@ -191,12 +191,6 @@ int MAIN(int argc, char **argv)
        else
                {
                r = BIO_set_fp(out, stdout, BIO_NOCLOSE | BIO_FP_TEXT);
-#ifdef OPENSSL_SYS_VMS
-               {
-               BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-               out = BIO_push(tmpbio, out);
-               }
-#endif
                }
        if (r <= 0)
                goto err;
index ede69ed..6603890 100644 (file)
@@ -717,12 +717,6 @@ bad:
                        {
                        BIO_printf(bio_err,"writing new private key to stdout\n");
                        BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-                       {
-                       BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-                       out = BIO_push(tmpbio, out);
-                       }
-#endif
                        }
                else
                        {
@@ -969,12 +963,6 @@ loop:
        if (outfile == NULL)
                {
                BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-               {
-               BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-               out = BIO_push(tmpbio, out);
-               }
-#endif
                }
        else
                {
index a17708f..579c2e2 100644 (file)
@@ -306,12 +306,6 @@ bad:
        if (outfile == NULL)
                {
                BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-               {
-               BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-               out = BIO_push(tmpbio, out);
-               }
-#endif
                }
        else
                {
index b01f004..4990349 100644 (file)
@@ -247,12 +247,6 @@ int MAIN(int argc, char **argv)
                }
        } else {
                out = BIO_new_fp(stdout, BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-               {
-                   BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-                   out = BIO_push(tmpbio, out);
-               }
-#endif
        }
 
        keysize = RSA_size(rsa);
index 08f55d5..95a1311 100644 (file)
 #define _kbhit kbhit
 #endif
 
-#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
-#define        NBBY             8              /* number of bits in a byte     */
-
-#ifndef        FD_SETSIZE
-#define        FD_SETSIZE      MAX_NOFILE
-#endif /* FD_SETSIZE */
-
-/* How many things we'll allow select to use. 0 if unlimited */
-#define MAXSELFD       MAX_NOFILE
-typedef int    fd_mask;        /* int here! VMS prototypes int, not long */
-#define NFDBITS        (sizeof(fd_mask) * NBBY)        /* bits per mask (power of 2!)*/
-#define NFDSHIFT 5                             /* Shift based on above */
-
-typedef fd_mask fd_set;
-#define        FD_SET(n, p)    (*(p) |= (1 << ((n) % NFDBITS)))
-#define        FD_CLR(n, p)    (*(p) &= ~(1 << ((n) % NFDBITS)))
-#define        FD_ISSET(n, p)  (*(p) & (1 << ((n) % NFDBITS)))
-#define FD_ZERO(p)     memset((char *)(p), 0, sizeof(*(p)))
-#endif
-
 #define PORT            4433
 #define PORT_STR        "4433"
 #define PROTOCOL        "tcp"
index 7bea720..cb0a768 100644 (file)
    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(OPENSSL_SYS_VMS_DECC) && !defined(__U_INT)
-#define __U_INT
-typedef unsigned int u_int;
-#endif
-
 #define USE_SOCKETS
 #include "apps.h"
 #include <openssl/x509.h>
@@ -171,11 +166,6 @@ typedef unsigned int u_int;
 #include "s_apps.h"
 #include "timeouts.h"
 
-#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
-
 #if defined(OPENSSL_SYS_BEOS_R5)
 #include <fcntl.h>
 #endif
index 26e1fe9..4ad535b 100644 (file)
 #include <sys/types.h>
 #endif
 
-/* With IPv6, it looks like Digital has mixed up the proper order of
-   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(OPENSSL_SYS_VMS_DECC) && !defined(__U_INT)
-#define __U_INT
-typedef unsigned int u_int;
-#endif
-
 #include <openssl/lhash.h>
 #include <openssl/bn.h>
 #define USE_SOCKETS
@@ -192,11 +183,6 @@ typedef unsigned int u_int;
 #include "s_apps.h"
 #include "timeouts.h"
 
-#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
-
 #if defined(OPENSSL_SYS_BEOS_R5)
 #include <fcntl.h>
 #endif
index 8c4421a..a301567 100644 (file)
 #include "../e_os2.h"
 #endif
 
-/* With IPv6, it looks like Digital has mixed up the proper order of
-   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(OPENSSL_SYS_VMS_DECC) && !defined(__U_INT)
-#define __U_INT
-typedef unsigned int u_int;
-#endif
-
 #define USE_SOCKETS
 #define NON_MAIN
 #include "apps.h"
index b16686c..8fab8c0 100644 (file)
@@ -210,12 +210,6 @@ bad:
                if (outfile == NULL)
                        {
                        BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-                       {
-                       BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-                       out = BIO_push(tmpbio, out);
-                       }
-#endif
                        }
                else
                        {
index c583f8a..cd08fe4 100644 (file)
@@ -659,12 +659,6 @@ int MAIN(int argc, char **argv)
        else
                {
                out = BIO_new_fp(stdout, BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-               {
-                   BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-                   out = BIO_push(tmpbio, out);
-               }
-#endif
                }
 
        if (operation == SMIME_VERIFY)
index 9886ca3..1b94d19 100644 (file)
 #endif
 
 #ifndef HAVE_FORK
-# if defined(OPENSSL_SYS_VMS) || defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MACINTOSH_CLASSIC) || defined(OPENSSL_SYS_OS2) || defined(OPENSSL_SYS_NETWARE)
-#  define HAVE_FORK 0
-# else
 #  define HAVE_FORK 1
-# endif
 #endif
 
 #if HAVE_FORK
index 0e01ea9..7b90825 100644 (file)
@@ -209,12 +209,6 @@ bad:
                if (outfile) out = BIO_new_file(outfile, "w");
                else {
                        out = BIO_new_fp(stdout, BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-                       {
-                           BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-                           out = BIO_push(tmpbio, out);
-                       }
-#endif
                }
 
                if(!out) {
@@ -267,12 +261,6 @@ bad:
        if (outfile) out = BIO_new_file(outfile, "w");
        else {
                out = BIO_new_fp(stdout, BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-               {
-                   BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-                   out = BIO_push(tmpbio, out);
-               }
-#endif
        }
 
        if(!out) {
index 9c7ae18..7004fea 100644 (file)
@@ -443,16 +443,10 @@ bad:
                        const char *s=X509_get_default_cert_area();
                        size_t len;
 
-#ifdef OPENSSL_SYS_VMS
-                       len = strlen(s)+sizeof(CONFIG_FILE);
-                       tofree=OPENSSL_malloc(len);
-                       strcpy(tofree,s);
-#else
                        len = strlen(s)+sizeof(CONFIG_FILE)+1;
                        tofree=OPENSSL_malloc(len);
                        BUF_strlcpy(tofree,s,len);
                        BUF_strlcat(tofree,"/",len);
-#endif
                        BUF_strlcat(tofree,CONFIG_FILE,len);
                        configfile=tofree;
                        }
index 0cee89e..2ed3f13 100644 (file)
@@ -221,12 +221,6 @@ int MAIN(int argc, char **argv)
        if (!load_config(bio_err, NULL))
                goto end;
        STDout=BIO_new_fp(stdout,BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-       {
-       BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-       STDout = BIO_push(tmpbio, STDout);
-       }
-#endif
 
        informat=FORMAT_PEM;
        outformat=FORMAT_PEM;
@@ -682,12 +676,6 @@ bad:
                if (outfile == NULL)
                        {
                        BIO_set_fp(out,stdout,BIO_NOCLOSE);
-#ifdef OPENSSL_SYS_VMS
-                       {
-                       BIO *tmpbio = BIO_new(BIO_f_linebuffer());
-                       out = BIO_push(tmpbio, out);
-                       }
-#endif
                        }
                else
                        {