Use new-style system-id macros everywhere possible. I hope I haven't
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.
This commit is contained in:
parent
f2bc668429
commit
bc36ee6227
118 changed files with 464 additions and 460 deletions
|
@ -693,7 +693,6 @@ if ($no_krb5
|
||||||
$cflags="-DOPENSSL_NO_KRB5 $cflags";
|
$cflags="-DOPENSSL_NO_KRB5 $cflags";
|
||||||
$options.=" no-krb5" unless $no_krb5;
|
$options.=" no-krb5" unless $no_krb5;
|
||||||
$openssl_algorithm_defines .= "#define OPENSSL_NO_KRB5\n";
|
$openssl_algorithm_defines .= "#define OPENSSL_NO_KRB5\n";
|
||||||
$openssl_algorithm_defines .= "#define NO_KRB5\n";
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -124,7 +124,7 @@ int app_RAND_load_file(const char *file, BIO *bio_e, int dont_warn)
|
||||||
int consider_randfile = (file == NULL);
|
int consider_randfile = (file == NULL);
|
||||||
char buffer[200];
|
char buffer[200];
|
||||||
|
|
||||||
#ifdef WINDOWS
|
#ifdef OPENSSL_SYS_WINDOWS
|
||||||
BIO_printf(bio_e,"Loading 'screen' into random state -");
|
BIO_printf(bio_e,"Loading 'screen' into random state -");
|
||||||
BIO_flush(bio_e);
|
BIO_flush(bio_e);
|
||||||
RAND_screen();
|
RAND_screen();
|
||||||
|
|
10
apps/apps.c
10
apps/apps.c
|
@ -70,7 +70,7 @@
|
||||||
#include <openssl/pkcs12.h>
|
#include <openssl/pkcs12.h>
|
||||||
#include <openssl/safestack.h>
|
#include <openssl/safestack.h>
|
||||||
|
|
||||||
#ifdef WINDOWS
|
#ifdef OPENSSL_SYS_WINDOWS
|
||||||
# include "bss_file.c"
|
# include "bss_file.c"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ int str2fmt(char *s)
|
||||||
return(FORMAT_UNDEF);
|
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)
|
void program_name(char *in, char *out, int size)
|
||||||
{
|
{
|
||||||
int i,n;
|
int i,n;
|
||||||
|
@ -222,7 +222,7 @@ void program_name(char *in, char *out, int size)
|
||||||
out[n]='\0';
|
out[n]='\0';
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
void program_name(char *in, char *out, int size)
|
void program_name(char *in, char *out, int size)
|
||||||
{
|
{
|
||||||
char *p=in, *q;
|
char *p=in, *q;
|
||||||
|
@ -258,10 +258,10 @@ void program_name(char *in, char *out, int size)
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef OPENSSL_SYS_WIN32
|
||||||
int WIN32_rename(char *from, char *to)
|
int WIN32_rename(char *from, char *to)
|
||||||
{
|
{
|
||||||
#ifdef WINNT
|
#ifdef OPENSSL_SYS_WINNT
|
||||||
int ret;
|
int ret;
|
||||||
/* Note: MoveFileEx() doesn't work under Win95, Win98 */
|
/* Note: MoveFileEx() doesn't work under Win95, Win98 */
|
||||||
|
|
||||||
|
|
|
@ -206,7 +206,7 @@ bad:
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
BIO_set_fp(out,stdout,BIO_NOCLOSE|BIO_FP_TEXT);
|
BIO_set_fp(out,stdout,BIO_NOCLOSE|BIO_FP_TEXT);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
out = BIO_push(tmpbio, out);
|
out = BIO_push(tmpbio, out);
|
||||||
|
|
21
apps/ca.c
21
apps/ca.c
|
@ -79,7 +79,7 @@
|
||||||
#include <openssl/engine.h>
|
#include <openssl/engine.h>
|
||||||
|
|
||||||
#ifndef W_OK
|
#ifndef W_OK
|
||||||
# ifdef VMS
|
# ifdef OPENSSL_SYS_VMS
|
||||||
# if defined(__DECC)
|
# if defined(__DECC)
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
# else
|
# else
|
||||||
|
@ -545,7 +545,7 @@ bad:
|
||||||
if (configfile == NULL)
|
if (configfile == NULL)
|
||||||
{
|
{
|
||||||
/* We will just use 'buf[0]' as a temporary buffer. */
|
/* We will just use 'buf[0]' as a temporary buffer. */
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
strncpy(buf[0],X509_get_default_cert_area(),
|
strncpy(buf[0],X509_get_default_cert_area(),
|
||||||
sizeof(buf[0])-1-sizeof(CONFIG_FILE));
|
sizeof(buf[0])-1-sizeof(CONFIG_FILE));
|
||||||
#else
|
#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");
|
BIO_printf(bio_err,"there needs to be defined a directory for new certificate to be placed in\n");
|
||||||
goto err;
|
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
|
filename. In any case, stat(), below, will catch the problem
|
||||||
if outdir is not a directory spec, and the fopen() or open()
|
if outdir is not a directory spec, and the fopen() or open()
|
||||||
will catch an error if there is no write access.
|
will catch an error if there is no write access.
|
||||||
|
@ -853,7 +854,7 @@ bad:
|
||||||
if (verbose)
|
if (verbose)
|
||||||
{
|
{
|
||||||
BIO_set_fp(out,stdout,BIO_NOCLOSE|BIO_FP_TEXT); /* cannot fail */
|
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());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
out = BIO_push(tmpbio, out);
|
out = BIO_push(tmpbio, out);
|
||||||
|
@ -996,7 +997,7 @@ bad:
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
BIO_set_fp(Sout,stdout,BIO_NOCLOSE|BIO_FP_TEXT);
|
BIO_set_fp(Sout,stdout,BIO_NOCLOSE|BIO_FP_TEXT);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
Sout = BIO_push(tmpbio, Sout);
|
Sout = BIO_push(tmpbio, Sout);
|
||||||
|
@ -1232,7 +1233,7 @@ bad:
|
||||||
|
|
||||||
strncpy(buf[0],serialfile,BSIZE-4);
|
strncpy(buf[0],serialfile,BSIZE-4);
|
||||||
|
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
strcat(buf[0],"-new");
|
strcat(buf[0],"-new");
|
||||||
#else
|
#else
|
||||||
strcat(buf[0],".new");
|
strcat(buf[0],".new");
|
||||||
|
@ -1242,7 +1243,7 @@ bad:
|
||||||
|
|
||||||
strncpy(buf[1],dbfile,BSIZE-4);
|
strncpy(buf[1],dbfile,BSIZE-4);
|
||||||
|
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
strcat(buf[1],"-new");
|
strcat(buf[1],"-new");
|
||||||
#else
|
#else
|
||||||
strcat(buf[1],".new");
|
strcat(buf[1],".new");
|
||||||
|
@ -1272,7 +1273,7 @@ bad:
|
||||||
|
|
||||||
strncpy(buf[2],outdir,BSIZE-(j*2)-6);
|
strncpy(buf[2],outdir,BSIZE-(j*2)-6);
|
||||||
|
|
||||||
#ifndef VMS
|
#ifndef OPENSSL_SYS_VMS
|
||||||
strcat(buf[2],"/");
|
strcat(buf[2],"/");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1309,7 +1310,7 @@ bad:
|
||||||
/* Rename the database and the serial file */
|
/* Rename the database and the serial file */
|
||||||
strncpy(buf[2],serialfile,BSIZE-4);
|
strncpy(buf[2],serialfile,BSIZE-4);
|
||||||
|
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
strcat(buf[2],"-old");
|
strcat(buf[2],"-old");
|
||||||
#else
|
#else
|
||||||
strcat(buf[2],".old");
|
strcat(buf[2],".old");
|
||||||
|
@ -1337,7 +1338,7 @@ bad:
|
||||||
|
|
||||||
strncpy(buf[2],dbfile,BSIZE-4);
|
strncpy(buf[2],dbfile,BSIZE-4);
|
||||||
|
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
strcat(buf[2],"-old");
|
strcat(buf[2],"-old");
|
||||||
#else
|
#else
|
||||||
strcat(buf[2],".old");
|
strcat(buf[2],".old");
|
||||||
|
|
|
@ -108,7 +108,7 @@ int MAIN(int argc, char **argv)
|
||||||
if (bio_err == NULL)
|
if (bio_err == NULL)
|
||||||
bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
|
bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
|
||||||
STDout=BIO_new_fp(stdout,BIO_NOCLOSE);
|
STDout=BIO_new_fp(stdout,BIO_NOCLOSE);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
STDout = BIO_push(tmpbio, STDout);
|
STDout = BIO_push(tmpbio, STDout);
|
||||||
|
|
|
@ -124,7 +124,7 @@ int MAIN(int argc, char **argv)
|
||||||
if ((bio_out=BIO_new(BIO_s_file())) != NULL)
|
if ((bio_out=BIO_new(BIO_s_file())) != NULL)
|
||||||
{
|
{
|
||||||
BIO_set_fp(bio_out,stdout,BIO_NOCLOSE);
|
BIO_set_fp(bio_out,stdout,BIO_NOCLOSE);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
bio_out = BIO_push(tmpbio, bio_out);
|
bio_out = BIO_push(tmpbio, bio_out);
|
||||||
|
@ -324,7 +324,7 @@ bad:
|
||||||
if (outfile == NULL)
|
if (outfile == NULL)
|
||||||
{
|
{
|
||||||
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
out = BIO_push(tmpbio, out);
|
out = BIO_push(tmpbio, out);
|
||||||
|
|
|
@ -241,7 +241,7 @@ bad:
|
||||||
if (outfile == NULL)
|
if (outfile == NULL)
|
||||||
{
|
{
|
||||||
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
out = BIO_push(tmpbio, out);
|
out = BIO_push(tmpbio, out);
|
||||||
|
|
|
@ -272,7 +272,7 @@ int MAIN(int argc, char **argv)
|
||||||
else out = BIO_new_file(outfile, "w");
|
else out = BIO_new_file(outfile, "w");
|
||||||
} else {
|
} else {
|
||||||
out = BIO_new_fp(stdout, BIO_NOCLOSE);
|
out = BIO_new_fp(stdout, BIO_NOCLOSE);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
out = BIO_push(tmpbio, out);
|
out = BIO_push(tmpbio, out);
|
||||||
|
|
|
@ -213,7 +213,7 @@ bad:
|
||||||
if (outfile == NULL)
|
if (outfile == NULL)
|
||||||
{
|
{
|
||||||
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
out = BIO_push(tmpbio, out);
|
out = BIO_push(tmpbio, out);
|
||||||
|
|
|
@ -419,7 +419,7 @@ bad:
|
||||||
if (outfile == NULL)
|
if (outfile == NULL)
|
||||||
{
|
{
|
||||||
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
out = BIO_push(tmpbio, out);
|
out = BIO_push(tmpbio, out);
|
||||||
|
|
|
@ -262,7 +262,7 @@ bad:
|
||||||
if (outfile == NULL)
|
if (outfile == NULL)
|
||||||
{
|
{
|
||||||
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
out = BIO_push(tmpbio, out);
|
out = BIO_push(tmpbio, out);
|
||||||
|
|
|
@ -216,7 +216,7 @@ bad:
|
||||||
if (outfile == NULL)
|
if (outfile == NULL)
|
||||||
{
|
{
|
||||||
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
out = BIO_push(tmpbio, out);
|
out = BIO_push(tmpbio, out);
|
||||||
|
|
|
@ -407,7 +407,7 @@ bad:
|
||||||
if (outf == NULL)
|
if (outf == NULL)
|
||||||
{
|
{
|
||||||
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
out = BIO_push(tmpbio, out);
|
out = BIO_push(tmpbio, out);
|
||||||
|
|
|
@ -133,7 +133,7 @@ int MAIN(int argc, char **argv)
|
||||||
if (bio_err == NULL)
|
if (bio_err == NULL)
|
||||||
bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
|
bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
|
||||||
bio_out=BIO_new_fp(stdout,BIO_NOCLOSE);
|
bio_out=BIO_new_fp(stdout,BIO_NOCLOSE);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
bio_out = BIO_push(tmpbio, bio_out);
|
bio_out = BIO_push(tmpbio, bio_out);
|
||||||
|
|
|
@ -91,7 +91,7 @@ int MAIN(int argc, char **argv)
|
||||||
out=BIO_new(BIO_s_file());
|
out=BIO_new(BIO_s_file());
|
||||||
if ((out != NULL) && BIO_set_fp(out,stdout,BIO_NOCLOSE))
|
if ((out != NULL) && BIO_set_fp(out,stdout,BIO_NOCLOSE))
|
||||||
{
|
{
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
out = BIO_push(tmpbio, out);
|
out = BIO_push(tmpbio, out);
|
||||||
|
|
|
@ -171,7 +171,7 @@ bad:
|
||||||
if (outfile == NULL)
|
if (outfile == NULL)
|
||||||
{
|
{
|
||||||
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
out = BIO_push(tmpbio, out);
|
out = BIO_push(tmpbio, out);
|
||||||
|
|
|
@ -207,7 +207,7 @@ bad:
|
||||||
if (outfile == NULL)
|
if (outfile == NULL)
|
||||||
{
|
{
|
||||||
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
out = BIO_push(tmpbio, out);
|
out = BIO_push(tmpbio, out);
|
||||||
|
|
|
@ -197,7 +197,7 @@ bad:
|
||||||
if (outfile == NULL)
|
if (outfile == NULL)
|
||||||
{
|
{
|
||||||
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
out = BIO_push(tmpbio, out);
|
out = BIO_push(tmpbio, out);
|
||||||
|
|
|
@ -121,7 +121,7 @@ int MAIN(int argc, char **argv)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
out = BIO_new_fp(stdout, BIO_NOCLOSE);
|
out = BIO_new_fp(stdout, BIO_NOCLOSE);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
out = BIO_push(tmpbio, out);
|
out = BIO_push(tmpbio, out);
|
||||||
|
|
|
@ -254,7 +254,7 @@ int main(int Argc, char *Argv[])
|
||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
{
|
{
|
||||||
strcpy(config_name,X509_get_default_cert_area());
|
strcpy(config_name,X509_get_default_cert_area());
|
||||||
#ifndef VMS
|
#ifndef OPENSSL_SYS_VMS
|
||||||
strcat(config_name,"/");
|
strcat(config_name,"/");
|
||||||
#endif
|
#endif
|
||||||
strcat(config_name,OPENSSL_CONF);
|
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)
|
else if ((strncmp(argv[0],"no-",3)) == 0)
|
||||||
{
|
{
|
||||||
BIO *bio_stdout = BIO_new_fp(stdout,BIO_NOCLOSE);
|
BIO *bio_stdout = BIO_new_fp(stdout,BIO_NOCLOSE);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
bio_stdout = BIO_push(tmpbio, bio_stdout);
|
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 */
|
else /* strcmp(argv[0],LIST_CIPHER_COMMANDS) == 0 */
|
||||||
list_type = FUNC_TYPE_CIPHER;
|
list_type = FUNC_TYPE_CIPHER;
|
||||||
bio_stdout = BIO_new_fp(stdout,BIO_NOCLOSE);
|
bio_stdout = BIO_new_fp(stdout,BIO_NOCLOSE);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
bio_stdout = BIO_push(tmpbio, bio_stdout);
|
bio_stdout = BIO_push(tmpbio, bio_stdout);
|
||||||
|
|
|
@ -83,7 +83,7 @@ int MAIN(int argc, char **argv)
|
||||||
if (out == NULL)
|
if (out == NULL)
|
||||||
goto err;
|
goto err;
|
||||||
BIO_set_fp(out, stdout, BIO_NOCLOSE | BIO_FP_TEXT);
|
BIO_set_fp(out, stdout, BIO_NOCLOSE | BIO_FP_TEXT);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
out = BIO_push(tmpbio, out);
|
out = BIO_push(tmpbio, out);
|
||||||
|
|
|
@ -375,7 +375,7 @@ int MAIN(int argc, char **argv)
|
||||||
|
|
||||||
if (!outfile) {
|
if (!outfile) {
|
||||||
out = BIO_new_fp(stdout, BIO_NOCLOSE);
|
out = BIO_new_fp(stdout, BIO_NOCLOSE);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
out = BIO_push(tmpbio, out);
|
out = BIO_push(tmpbio, out);
|
||||||
|
|
|
@ -225,7 +225,7 @@ bad:
|
||||||
if (outfile == NULL)
|
if (outfile == NULL)
|
||||||
{
|
{
|
||||||
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
out = BIO_push(tmpbio, out);
|
out = BIO_push(tmpbio, out);
|
||||||
|
|
|
@ -226,7 +226,7 @@ int MAIN(int argc, char **argv)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
out = BIO_new_fp (stdout, BIO_NOCLOSE);
|
out = BIO_new_fp (stdout, BIO_NOCLOSE);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
out = BIO_push(tmpbio, out);
|
out = BIO_push(tmpbio, out);
|
||||||
|
|
|
@ -132,7 +132,7 @@ int MAIN(int argc, char **argv)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
r = BIO_set_fp(out, stdout, BIO_NOCLOSE | BIO_FP_TEXT);
|
r = BIO_set_fp(out, stdout, BIO_NOCLOSE | BIO_FP_TEXT);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
out = BIO_push(tmpbio, out);
|
out = BIO_push(tmpbio, out);
|
||||||
|
|
|
@ -435,7 +435,7 @@ bad:
|
||||||
if (p == NULL)
|
if (p == NULL)
|
||||||
{
|
{
|
||||||
strcpy(config_name,X509_get_default_cert_area());
|
strcpy(config_name,X509_get_default_cert_area());
|
||||||
#ifndef VMS
|
#ifndef OPENSSL_SYS_VMS
|
||||||
strcat(config_name,"/");
|
strcat(config_name,"/");
|
||||||
#endif
|
#endif
|
||||||
strcat(config_name,OPENSSL_CONF);
|
strcat(config_name,OPENSSL_CONF);
|
||||||
|
@ -697,7 +697,7 @@ bad:
|
||||||
{
|
{
|
||||||
BIO_printf(bio_err,"writing new private key to stdout\n");
|
BIO_printf(bio_err,"writing new private key to stdout\n");
|
||||||
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
out = BIO_push(tmpbio, out);
|
out = BIO_push(tmpbio, out);
|
||||||
|
@ -910,7 +910,7 @@ loop:
|
||||||
if (outfile == NULL)
|
if (outfile == NULL)
|
||||||
{
|
{
|
||||||
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
out = BIO_push(tmpbio, out);
|
out = BIO_push(tmpbio, out);
|
||||||
|
|
|
@ -307,7 +307,7 @@ bad:
|
||||||
if (outfile == NULL)
|
if (outfile == NULL)
|
||||||
{
|
{
|
||||||
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
out = BIO_push(tmpbio, out);
|
out = BIO_push(tmpbio, out);
|
||||||
|
|
|
@ -227,7 +227,7 @@ int MAIN(int argc, char **argv)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
out = BIO_new_fp(stdout, BIO_NOCLOSE);
|
out = BIO_new_fp(stdout, BIO_NOCLOSE);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
out = BIO_push(tmpbio, out);
|
out = BIO_push(tmpbio, out);
|
||||||
|
|
|
@ -57,7 +57,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/types.h>
|
#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 */
|
/* VAX C does not defined fd_set and friends, but it's actually quite simple */
|
||||||
/* These definitions are borrowed from SOCKETSHR. /Richard Levitte */
|
/* These definitions are borrowed from SOCKETSHR. /Richard Levitte */
|
||||||
#define MAX_NOFILE 32
|
#define MAX_NOFILE 32
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
recursive header file inclusion, resulting in the compiler complaining
|
recursive header file inclusion, resulting in the compiler complaining
|
||||||
that u_int isn't defined, but only if _POSIX_C_SOURCE is defined, which
|
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 */
|
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
|
#define __U_INT
|
||||||
typedef unsigned int u_int;
|
typedef unsigned int u_int;
|
||||||
#endif
|
#endif
|
||||||
|
@ -82,12 +82,12 @@ typedef unsigned int u_int;
|
||||||
#include <openssl/engine.h>
|
#include <openssl/engine.h>
|
||||||
#include "s_apps.h"
|
#include "s_apps.h"
|
||||||
|
|
||||||
#ifdef WINDOWS
|
#ifdef OPENSSL_SYS_WINDOWS
|
||||||
#include <conio.h>
|
#include <conio.h>
|
||||||
#endif
|
#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 */
|
/* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */
|
||||||
#undef FIONBIO
|
#undef FIONBIO
|
||||||
#endif
|
#endif
|
||||||
|
@ -186,7 +186,7 @@ int MAIN(int argc, char **argv)
|
||||||
char *inrand=NULL;
|
char *inrand=NULL;
|
||||||
char *engine_id=NULL;
|
char *engine_id=NULL;
|
||||||
ENGINE *e=NULL;
|
ENGINE *e=NULL;
|
||||||
#ifdef WINDOWS
|
#ifdef OPENSSL_SYS_WINDOWS
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -537,7 +537,7 @@ re_start:
|
||||||
|
|
||||||
if (!ssl_pending)
|
if (!ssl_pending)
|
||||||
{
|
{
|
||||||
#ifndef WINDOWS
|
#ifndef OPENSSL_SYS_WINDOWS
|
||||||
if (tty_on)
|
if (tty_on)
|
||||||
{
|
{
|
||||||
if (read_tty) FD_SET(fileno(stdin),&readfds);
|
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
|
* will choke the compiler: if you do have a cast then
|
||||||
* you can either go for (int *) or (void *).
|
* you can either go for (int *) or (void *).
|
||||||
*/
|
*/
|
||||||
#ifdef WINDOWS
|
#ifdef OPENSSL_SYS_WINDOWS
|
||||||
/* Under Windows we make the assumption that we can
|
/* Under Windows we make the assumption that we can
|
||||||
* always write to the tty: therefore if we need to
|
* always write to the tty: therefore if we need to
|
||||||
* write to the tty we just fall through. Otherwise
|
* write to the tty we just fall through. Otherwise
|
||||||
|
@ -663,7 +663,7 @@ re_start:
|
||||||
goto shut;
|
goto shut;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef WINDOWS
|
#ifdef OPENSSL_SYS_WINDOWS
|
||||||
/* Assume Windows can always write */
|
/* Assume Windows can always write */
|
||||||
else if (!ssl_pending && write_tty)
|
else if (!ssl_pending && write_tty)
|
||||||
#else
|
#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 if ((_kbhit()) || (WAIT_OBJECT_0 == WaitForSingleObject(GetStdHandle(STD_INPUT_HANDLE), 0)))
|
||||||
#else
|
#else
|
||||||
else if (FD_ISSET(fileno(stdin),&readfds))
|
else if (FD_ISSET(fileno(stdin),&readfds))
|
||||||
|
|
|
@ -70,7 +70,7 @@
|
||||||
recursive header file inclusion, resulting in the compiler complaining
|
recursive header file inclusion, resulting in the compiler complaining
|
||||||
that u_int isn't defined, but only if _POSIX_C_SOURCE is defined, which
|
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 */
|
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
|
#define __U_INT
|
||||||
typedef unsigned int u_int;
|
typedef unsigned int u_int;
|
||||||
#endif
|
#endif
|
||||||
|
@ -86,11 +86,11 @@ typedef unsigned int u_int;
|
||||||
#include <openssl/engine.h>
|
#include <openssl/engine.h>
|
||||||
#include "s_apps.h"
|
#include "s_apps.h"
|
||||||
|
|
||||||
#ifdef WINDOWS
|
#ifdef OPENSSL_SYS_WINDOWS
|
||||||
#include <conio.h>
|
#include <conio.h>
|
||||||
#endif
|
#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 */
|
/* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */
|
||||||
#undef FIONBIO
|
#undef FIONBIO
|
||||||
#endif
|
#endif
|
||||||
|
@ -815,7 +815,7 @@ static int sv_body(char *hostname, int s, unsigned char *context)
|
||||||
unsigned long l;
|
unsigned long l;
|
||||||
SSL *con=NULL;
|
SSL *con=NULL;
|
||||||
BIO *sbio;
|
BIO *sbio;
|
||||||
#ifdef WINDOWS
|
#ifdef OPENSSL_SYS_WINDOWS
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -882,7 +882,7 @@ static int sv_body(char *hostname, int s, unsigned char *context)
|
||||||
if (!read_from_sslcon)
|
if (!read_from_sslcon)
|
||||||
{
|
{
|
||||||
FD_ZERO(&readfds);
|
FD_ZERO(&readfds);
|
||||||
#ifndef WINDOWS
|
#ifndef OPENSSL_SYS_WINDOWS
|
||||||
FD_SET(fileno(stdin),&readfds);
|
FD_SET(fileno(stdin),&readfds);
|
||||||
#endif
|
#endif
|
||||||
FD_SET(s,&readfds);
|
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
|
* the compiler: if you do have a cast then you can either
|
||||||
* go for (int *) or (void *).
|
* go for (int *) or (void *).
|
||||||
*/
|
*/
|
||||||
#ifdef WINDOWS
|
#ifdef OPENSSL_SYS_WINDOWS
|
||||||
/* Under Windows we can't select on stdin: only
|
/* Under Windows we can't select on stdin: only
|
||||||
* on sockets. As a workaround we timeout the select every
|
* on sockets. As a workaround we timeout the select every
|
||||||
* second and check for any keypress. In a proper Windows
|
* 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
|
else
|
||||||
{
|
{
|
||||||
BIO_printf(bio_s_out,"read R BLOCK\n");
|
BIO_printf(bio_s_out,"read R BLOCK\n");
|
||||||
#ifndef MSDOS
|
#ifndef OPENSSL_SYS_MSDOS
|
||||||
sleep(1);
|
sleep(1);
|
||||||
#endif
|
#endif
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
recursive header file inclusion, resulting in the compiler complaining
|
recursive header file inclusion, resulting in the compiler complaining
|
||||||
that u_int isn't defined, but only if _POSIX_C_SOURCE is defined, which
|
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 */
|
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
|
#define __U_INT
|
||||||
typedef unsigned int u_int;
|
typedef unsigned int u_int;
|
||||||
#endif
|
#endif
|
||||||
|
@ -80,7 +80,7 @@ typedef unsigned int u_int;
|
||||||
#include <openssl/ssl.h>
|
#include <openssl/ssl.h>
|
||||||
|
|
||||||
static struct hostent *GetHostByName(char *name);
|
static struct hostent *GetHostByName(char *name);
|
||||||
#ifdef WINDOWS
|
#ifdef OPENSSL_SYS_WINDOWS
|
||||||
static void sock_cleanup(void);
|
static void sock_cleanup(void);
|
||||||
#endif
|
#endif
|
||||||
static int sock_init(void);
|
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 do_accept(int acc_sock, int *sock, char **host);
|
||||||
static int host_ip(char *str, unsigned char ip[4]);
|
static int host_ip(char *str, unsigned char ip[4]);
|
||||||
|
|
||||||
#ifdef WIN16
|
#ifdef OPENSSL_SYS_WIN16
|
||||||
#define SOCKET_PROTOCOL 0 /* more microsoft stupidity */
|
#define SOCKET_PROTOCOL 0 /* more microsoft stupidity */
|
||||||
#else
|
#else
|
||||||
#define SOCKET_PROTOCOL IPPROTO_TCP
|
#define SOCKET_PROTOCOL IPPROTO_TCP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WINDOWS
|
#ifdef OPENSSL_SYS_WINDOWS
|
||||||
static struct WSAData wsa_state;
|
static struct WSAData wsa_state;
|
||||||
static int wsa_init_done=0;
|
static int wsa_init_done=0;
|
||||||
|
|
||||||
#ifdef WIN16
|
#ifdef OPENSSL_SYS_WIN16
|
||||||
static HWND topWnd=0;
|
static HWND topWnd=0;
|
||||||
static FARPROC lpTopWndProc=NULL;
|
static FARPROC lpTopWndProc=NULL;
|
||||||
static FARPROC lpTopHookProc=NULL;
|
static FARPROC lpTopHookProc=NULL;
|
||||||
|
@ -129,10 +129,10 @@ static BOOL CALLBACK enumproc(HWND hwnd,LPARAM lParam)
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* WIN32 */
|
#endif /* OPENSSL_SYS_WIN32 */
|
||||||
#endif /* WINDOWS */
|
#endif /* OPENSSL_SYS_WINDOWS */
|
||||||
|
|
||||||
#ifdef WINDOWS
|
#ifdef OPENSSL_SYS_WINDOWS
|
||||||
static void sock_cleanup(void)
|
static void sock_cleanup(void)
|
||||||
{
|
{
|
||||||
if (wsa_init_done)
|
if (wsa_init_done)
|
||||||
|
@ -146,7 +146,7 @@ static void sock_cleanup(void)
|
||||||
|
|
||||||
static int sock_init(void)
|
static int sock_init(void)
|
||||||
{
|
{
|
||||||
#ifdef WINDOWS
|
#ifdef OPENSSL_SYS_WINDOWS
|
||||||
if (!wsa_init_done)
|
if (!wsa_init_done)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
@ -163,15 +163,15 @@ static int sock_init(void)
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WIN16
|
#ifdef OPENSSL_SYS_WIN16
|
||||||
EnumTaskWindows(GetCurrentTask(),enumproc,0L);
|
EnumTaskWindows(GetCurrentTask(),enumproc,0L);
|
||||||
lpTopWndProc=(FARPROC)GetWindowLong(topWnd,GWL_WNDPROC);
|
lpTopWndProc=(FARPROC)GetWindowLong(topWnd,GWL_WNDPROC);
|
||||||
lpTopHookProc=MakeProcInstance((FARPROC)topHookProc,_hInstance);
|
lpTopHookProc=MakeProcInstance((FARPROC)topHookProc,_hInstance);
|
||||||
|
|
||||||
SetWindowLong(topWnd,GWL_WNDPROC,(LONG)lpTopHookProc);
|
SetWindowLong(topWnd,GWL_WNDPROC,(LONG)lpTopHookProc);
|
||||||
#endif /* WIN16 */
|
#endif /* OPENSSL_SYS_WIN16 */
|
||||||
}
|
}
|
||||||
#endif /* WINDOWS */
|
#endif /* OPENSSL_SYS_WINDOWS */
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,7 +285,7 @@ static int init_server_long(int *sock, int port, char *ip)
|
||||||
#endif
|
#endif
|
||||||
if (bind(s,(struct sockaddr *)&server,sizeof(server)) == -1)
|
if (bind(s,(struct sockaddr *)&server,sizeof(server)) == -1)
|
||||||
{
|
{
|
||||||
#ifndef WINDOWS
|
#ifndef OPENSSL_SYS_WINDOWS
|
||||||
perror("bind");
|
perror("bind");
|
||||||
#endif
|
#endif
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -318,7 +318,7 @@ static int do_accept(int acc_sock, int *sock, char **host)
|
||||||
|
|
||||||
if (!sock_init()) return(0);
|
if (!sock_init()) return(0);
|
||||||
|
|
||||||
#ifndef WINDOWS
|
#ifndef OPENSSL_SYS_WINDOWS
|
||||||
redoit:
|
redoit:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -332,7 +332,7 @@ redoit:
|
||||||
ret=accept(acc_sock,(struct sockaddr *)&from,(void *)&len);
|
ret=accept(acc_sock,(struct sockaddr *)&from,(void *)&len);
|
||||||
if (ret == INVALID_SOCKET)
|
if (ret == INVALID_SOCKET)
|
||||||
{
|
{
|
||||||
#ifdef WINDOWS
|
#ifdef OPENSSL_SYS_WINDOWS
|
||||||
i=WSAGetLastError();
|
i=WSAGetLastError();
|
||||||
BIO_printf(bio_err,"accept error %d\n",i);
|
BIO_printf(bio_err,"accept error %d\n",i);
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -82,7 +82,7 @@
|
||||||
#include "wintext.h"
|
#include "wintext.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(MSDOS) && (!defined(VMS) || defined(__DECC))
|
#if !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC))
|
||||||
#define TIMES
|
#define TIMES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@
|
||||||
The __TMS macro will show if it was. If it wasn't defined, we should
|
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
|
undefine TIMES, since that tells the rest of the program how things
|
||||||
should be handled. -- Richard Levitte */
|
should be handled. -- Richard Levitte */
|
||||||
#if defined(VMS) && defined(__DECC) && !defined(__TMS)
|
#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
|
||||||
#undef TIMES
|
#undef TIMES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -174,7 +174,7 @@ static int perform=0;
|
||||||
#ifdef FIONBIO
|
#ifdef FIONBIO
|
||||||
static int t_nbio=0;
|
static int t_nbio=0;
|
||||||
#endif
|
#endif
|
||||||
#ifdef WIN32
|
#ifdef OPENSSL_SYS_WIN32
|
||||||
static int exitNow = 0; /* Set when it's time to exit main */
|
static int exitNow = 0; /* Set when it's time to exit main */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -198,7 +198,7 @@ static void s_time_init(void)
|
||||||
#ifdef FIONBIO
|
#ifdef FIONBIO
|
||||||
t_nbio=0;
|
t_nbio=0;
|
||||||
#endif
|
#endif
|
||||||
#ifdef WIN32
|
#ifdef OPENSSL_SYS_WIN32
|
||||||
exitNow = 0; /* Set when it's time to exit main */
|
exitNow = 0; /* Set when it's time to exit main */
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -208,7 +208,7 @@ bad:
|
||||||
if (outfile == NULL)
|
if (outfile == NULL)
|
||||||
{
|
{
|
||||||
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
out = BIO_push(tmpbio, out);
|
out = BIO_push(tmpbio, out);
|
||||||
|
|
|
@ -421,7 +421,7 @@ int MAIN(int argc, char **argv)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
out = BIO_new_fp(stdout, BIO_NOCLOSE);
|
out = BIO_new_fp(stdout, BIO_NOCLOSE);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
out = BIO_push(tmpbio, out);
|
out = BIO_push(tmpbio, out);
|
||||||
|
|
|
@ -87,7 +87,7 @@
|
||||||
|
|
||||||
#if defined(__FreeBSD__)
|
#if defined(__FreeBSD__)
|
||||||
# define USE_TOD
|
# define USE_TOD
|
||||||
#elif !defined(MSDOS) && (!defined(VMS) || defined(__DECC))
|
#elif !defined(OPENSSL_SYS_MSDOS) && (!defined(OPENSSL_SYS_VMS) || defined(__DECC))
|
||||||
# define TIMES
|
# define TIMES
|
||||||
#endif
|
#endif
|
||||||
#if !defined(_UNICOS) && !defined(__OpenBSD__) && !defined(sgi) && !defined(__FreeBSD__) && !(defined(__bsdi) || defined(__bsdi__)) && !defined(_AIX) && !defined(OPENSSL_SYS_MPE) && !defined(__NetBSD__) /* FIXME */
|
#if !defined(_UNICOS) && !defined(__OpenBSD__) && !defined(sgi) && !defined(__FreeBSD__) && !(defined(__bsdi) || defined(__bsdi__)) && !defined(_AIX) && !defined(OPENSSL_SYS_MPE) && !defined(__NetBSD__) /* FIXME */
|
||||||
|
@ -110,7 +110,7 @@
|
||||||
The __TMS macro will show if it was. If it wasn't defined, we should
|
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
|
undefine TIMES, since that tells the rest of the program how things
|
||||||
should be handled. -- Richard Levitte */
|
should be handled. -- Richard Levitte */
|
||||||
#if defined(VMS) && defined(__DECC) && !defined(__TMS)
|
#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
|
||||||
#undef TIMES
|
#undef TIMES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -221,7 +221,7 @@ bad:
|
||||||
if (outfile) out = BIO_new_file(outfile, "w");
|
if (outfile) out = BIO_new_file(outfile, "w");
|
||||||
else {
|
else {
|
||||||
out = BIO_new_fp(stdout, BIO_NOCLOSE);
|
out = BIO_new_fp(stdout, BIO_NOCLOSE);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
out = BIO_push(tmpbio, out);
|
out = BIO_push(tmpbio, out);
|
||||||
|
@ -278,7 +278,7 @@ bad:
|
||||||
if (outfile) out = BIO_new_file(outfile, "w");
|
if (outfile) out = BIO_new_file(outfile, "w");
|
||||||
else {
|
else {
|
||||||
out = BIO_new_fp(stdout, BIO_NOCLOSE);
|
out = BIO_new_fp(stdout, BIO_NOCLOSE);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
out = BIO_push(tmpbio, out);
|
out = BIO_push(tmpbio, out);
|
||||||
|
|
|
@ -193,7 +193,7 @@ int MAIN(int argc, char **argv)
|
||||||
if (bio_err == NULL)
|
if (bio_err == NULL)
|
||||||
bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
|
bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
|
||||||
STDout=BIO_new_fp(stdout,BIO_NOCLOSE);
|
STDout=BIO_new_fp(stdout,BIO_NOCLOSE);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
STDout = BIO_push(tmpbio, STDout);
|
STDout = BIO_push(tmpbio, STDout);
|
||||||
|
@ -642,7 +642,7 @@ bad:
|
||||||
if (outfile == NULL)
|
if (outfile == NULL)
|
||||||
{
|
{
|
||||||
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
BIO_set_fp(out,stdout,BIO_NOCLOSE);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
{
|
{
|
||||||
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
BIO *tmpbio = BIO_new(BIO_f_linebuffer());
|
||||||
out = BIO_push(tmpbio, out);
|
out = BIO_push(tmpbio, out);
|
||||||
|
|
|
@ -193,7 +193,7 @@ ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
|
||||||
{
|
{
|
||||||
char *p;
|
char *p;
|
||||||
struct tm *ts;
|
struct tm *ts;
|
||||||
#if defined(OPENSSL_THREADS) && !defined(WIN32)
|
#if defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32)
|
||||||
struct tm data;
|
struct tm data;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
|
||||||
if (s == NULL)
|
if (s == NULL)
|
||||||
return(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 */
|
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;
|
ts=&data;
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -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)
|
ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t)
|
||||||
{
|
{
|
||||||
struct tm *ts;
|
struct tm *ts;
|
||||||
#if defined(OPENSSL_THREADS) && !defined(WIN32) && !defined(__CYGWIN32__)
|
#if defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32) && !defined(__CYGWIN32__)
|
||||||
struct tm data;
|
struct tm data;
|
||||||
|
|
||||||
gmtime_r(&t,&data);
|
gmtime_r(&t,&data);
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
#include <descrip.h>
|
#include <descrip.h>
|
||||||
#include <lnmdef.h>
|
#include <lnmdef.h>
|
||||||
#include <starlet.h>
|
#include <starlet.h>
|
||||||
|
@ -191,7 +191,7 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t)
|
||||||
{
|
{
|
||||||
char *p;
|
char *p;
|
||||||
struct tm *ts;
|
struct tm *ts;
|
||||||
#if defined(OPENSSL_THREADS) && !defined(WIN32) && !defined(__CYGWIN32__)
|
#if defined(OPENSSL_THREADS) && !defined(OPENSSL_SYS_WIN32) && !defined(__CYGWIN32__)
|
||||||
|
|
||||||
struct tm data;
|
struct tm data;
|
||||||
#endif
|
#endif
|
||||||
|
@ -201,13 +201,13 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t)
|
||||||
if (s == NULL)
|
if (s == NULL)
|
||||||
return(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 */
|
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;
|
ts=&data;
|
||||||
#else
|
#else
|
||||||
ts=gmtime(&t);
|
ts=gmtime(&t);
|
||||||
#endif
|
#endif
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
if (ts == NULL)
|
if (ts == NULL)
|
||||||
{
|
{
|
||||||
static $DESCRIPTOR(tabnam,"LNM$DCL_LOGICAL");
|
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 */
|
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; }
|
{ struct tm data; gmtime_r(&t, &data); tm = &data; }
|
||||||
#else
|
#else
|
||||||
tm = gmtime(&t);
|
tm = gmtime(&t);
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
/* define PART1, PART2, PART3 or PART4 to build only with a few of the options.
|
/* 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. */
|
* 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
|
#define TIMES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ OPENSSL_DECLARE_EXIT
|
||||||
The __TMS macro will show if it was. If it wasn't defined, we should
|
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
|
undefine TIMES, since that tells the rest of the program how things
|
||||||
should be handled. -- Richard Levitte */
|
should be handled. -- Richard Levitte */
|
||||||
#if defined(VMS) && defined(__DECC) && !defined(__TMS)
|
#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
|
||||||
#undef TIMES
|
#undef TIMES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -322,7 +322,7 @@ int main(int argc, char **argv)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
exit(0);
|
exit(0);
|
||||||
#if defined(LINT) || defined(MSDOS)
|
#if defined(LINT) || defined(OPENSSL_SYS_MSDOS)
|
||||||
return(0);
|
return(0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
/* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */
|
/* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */
|
||||||
/* 06-Apr-92 Luke Brennan Support for VMS and add extra signal calls */
|
/* 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
|
#define TIMES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ OPENSSL_DECLARE_EXIT
|
||||||
The __TMS macro will show if it was. If it wasn't defined, we should
|
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
|
undefine TIMES, since that tells the rest of the program how things
|
||||||
should be handled. -- Richard Levitte */
|
should be handled. -- Richard Levitte */
|
||||||
#if defined(VMS) && defined(__DECC) && !defined(__TMS)
|
#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
|
||||||
#undef TIMES
|
#undef TIMES
|
||||||
#endif
|
#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 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);
|
printf("Blowfish cbc bytes per sec = %12.3f (%9.3fuS)\n",c,8.0e6/c);
|
||||||
exit(0);
|
exit(0);
|
||||||
#if defined(LINT) || defined(MSDOS)
|
#if defined(LINT) || defined(OPENSSL_SYS_MSDOS)
|
||||||
return(0);
|
return(0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
#include "cryptlib.h"
|
#include "cryptlib.h"
|
||||||
#include <openssl/bio.h>
|
#include <openssl/bio.h>
|
||||||
|
|
||||||
#ifdef WIN16
|
#ifdef OPENSSL_SYS_WIN16
|
||||||
#define SOCKET_PROTOCOL 0 /* more microsoft stupidity */
|
#define SOCKET_PROTOCOL 0 /* more microsoft stupidity */
|
||||||
#else
|
#else
|
||||||
#define SOCKET_PROTOCOL IPPROTO_TCP
|
#define SOCKET_PROTOCOL IPPROTO_TCP
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
#define MAX_LISTEN 32
|
#define MAX_LISTEN 32
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WINDOWS
|
#ifdef OPENSSL_SYS_WINDOWS
|
||||||
static int wsa_init_done=0;
|
static int wsa_init_done=0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -429,7 +429,7 @@ end:
|
||||||
|
|
||||||
int BIO_sock_init(void)
|
int BIO_sock_init(void)
|
||||||
{
|
{
|
||||||
#ifdef WINDOWS
|
#ifdef OPENSSL_SYS_WINDOWS
|
||||||
static struct WSAData wsa_state;
|
static struct WSAData wsa_state;
|
||||||
|
|
||||||
if (!wsa_init_done)
|
if (!wsa_init_done)
|
||||||
|
@ -449,13 +449,13 @@ int BIO_sock_init(void)
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* WINDOWS */
|
#endif /* OPENSSL_SYS_WINDOWS */
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BIO_sock_cleanup(void)
|
void BIO_sock_cleanup(void)
|
||||||
{
|
{
|
||||||
#ifdef WINDOWS
|
#ifdef OPENSSL_SYS_WINDOWS
|
||||||
if (wsa_init_done)
|
if (wsa_init_done)
|
||||||
{
|
{
|
||||||
wsa_init_done=0;
|
wsa_init_done=0;
|
||||||
|
@ -465,7 +465,7 @@ void BIO_sock_cleanup(void)
|
||||||
#endif
|
#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)
|
int BIO_socket_ioctl(int fd, long type, unsigned long *arg)
|
||||||
{
|
{
|
||||||
|
|
|
@ -125,7 +125,7 @@ long MS_CALLBACK BIO_debug_callback(BIO *bio, int cmd, const char *argp,
|
||||||
b=(BIO *)bio->cb_arg;
|
b=(BIO *)bio->cb_arg;
|
||||||
if (b != NULL)
|
if (b != NULL)
|
||||||
BIO_write(b,buf,strlen(buf));
|
BIO_write(b,buf,strlen(buf));
|
||||||
#if !defined(OPENSSL_NO_STDIO) && !defined(WIN16)
|
#if !defined(OPENSSL_NO_STDIO) && !defined(OPENSSL_SYS_WIN16)
|
||||||
else
|
else
|
||||||
fputs(buf,stderr);
|
fputs(buf,stderr);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -64,13 +64,13 @@
|
||||||
#include "cryptlib.h"
|
#include "cryptlib.h"
|
||||||
#include <openssl/bio.h>
|
#include <openssl/bio.h>
|
||||||
|
|
||||||
#ifdef WIN16
|
#ifdef OPENSSL_SYS_WIN16
|
||||||
#define SOCKET_PROTOCOL 0 /* more microsoft stupidity */
|
#define SOCKET_PROTOCOL 0 /* more microsoft stupidity */
|
||||||
#else
|
#else
|
||||||
#define SOCKET_PROTOCOL IPPROTO_TCP
|
#define SOCKET_PROTOCOL IPPROTO_TCP
|
||||||
#endif
|
#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 */
|
/* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */
|
||||||
#undef FIONBIO
|
#undef FIONBIO
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -64,13 +64,13 @@
|
||||||
#include "cryptlib.h"
|
#include "cryptlib.h"
|
||||||
#include <openssl/bio.h>
|
#include <openssl/bio.h>
|
||||||
|
|
||||||
#ifdef WIN16
|
#ifdef OPENSSL_SYS_WIN16
|
||||||
#define SOCKET_PROTOCOL 0 /* more microsoft stupidity */
|
#define SOCKET_PROTOCOL 0 /* more microsoft stupidity */
|
||||||
#else
|
#else
|
||||||
#define SOCKET_PROTOCOL IPPROTO_TCP
|
#define SOCKET_PROTOCOL IPPROTO_TCP
|
||||||
#endif
|
#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 */
|
/* FIONBIO used as a switch to enable ioctl, and that isn't in VMS < 7.0 */
|
||||||
#undef FIONBIO
|
#undef FIONBIO
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -223,7 +223,7 @@ int BIO_fd_should_retry(int i)
|
||||||
{
|
{
|
||||||
err=get_last_sys_error();
|
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))
|
if ((i == -1) && (err == 0))
|
||||||
return(1);
|
return(1);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -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->shutdown=(int)num&BIO_CLOSE;
|
||||||
b->ptr=(char *)ptr;
|
b->ptr=(char *)ptr;
|
||||||
b->init=1;
|
b->init=1;
|
||||||
#if defined(MSDOS) || defined(WINDOWS)
|
#if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WINDOWS)
|
||||||
/* Set correct text/binary mode */
|
/* Set correct text/binary mode */
|
||||||
if (num & BIO_FP_TEXT)
|
if (num & BIO_FP_TEXT)
|
||||||
_setmode(fileno((FILE *)ptr),_O_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;
|
ret=0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#if defined(MSDOS) || defined(WINDOWS)
|
#if defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_WINDOWS)
|
||||||
if (!(num & BIO_FP_TEXT))
|
if (!(num & BIO_FP_TEXT))
|
||||||
strcat(p,"b");
|
strcat(p,"b");
|
||||||
else
|
else
|
||||||
|
|
|
@ -66,9 +66,11 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#if defined(WIN32)
|
#include <openssl/opensslconf.h>
|
||||||
|
|
||||||
|
#if defined(OPENSSL_SYS_WIN32)
|
||||||
# include <process.h>
|
# include <process.h>
|
||||||
#elif defined(VMS) || defined(__VMS)
|
#elif defined(OPENSSL_SYS_VMS)
|
||||||
# include <opcdef.h>
|
# include <opcdef.h>
|
||||||
# include <descrip.h>
|
# include <descrip.h>
|
||||||
# include <lib$routines.h>
|
# include <lib$routines.h>
|
||||||
|
@ -85,7 +87,7 @@
|
||||||
|
|
||||||
#ifndef NO_SYSLOG
|
#ifndef NO_SYSLOG
|
||||||
|
|
||||||
#if defined(WIN32)
|
#if defined(OPENSSL_SYS_WIN32)
|
||||||
#define LOG_EMERG 0
|
#define LOG_EMERG 0
|
||||||
#define LOG_ALERT 1
|
#define LOG_ALERT 1
|
||||||
#define LOG_CRIT 2
|
#define LOG_CRIT 2
|
||||||
|
@ -96,7 +98,7 @@
|
||||||
#define LOG_DEBUG 7
|
#define LOG_DEBUG 7
|
||||||
|
|
||||||
#define LOG_DAEMON (3<<3)
|
#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 */
|
/* On VMS, we don't really care about these, but we need them to compile */
|
||||||
#define LOG_EMERG 0
|
#define LOG_EMERG 0
|
||||||
#define LOG_ALERT 1
|
#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 xopenlog(BIO* bp, char* name, int level);
|
||||||
static void xsyslog(BIO* bp, int priority, const char* string);
|
static void xsyslog(BIO* bp, int priority, const char* string);
|
||||||
static void xcloselog(BIO* bp);
|
static void xcloselog(BIO* bp);
|
||||||
#ifdef WIN32
|
#ifdef OPENSSL_SYS_WIN32
|
||||||
LONG (WINAPI *go_for_advapi)() = RegOpenKeyEx;
|
LONG (WINAPI *go_for_advapi)() = RegOpenKeyEx;
|
||||||
HANDLE (WINAPI *register_event_source)() = NULL;
|
HANDLE (WINAPI *register_event_source)() = NULL;
|
||||||
BOOL (WINAPI *deregister_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);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(WIN32)
|
#if defined(OPENSSL_SYS_WIN32)
|
||||||
|
|
||||||
static void xopenlog(BIO* bp, char* name, int level)
|
static void xopenlog(BIO* bp, char* name, int level)
|
||||||
{
|
{
|
||||||
|
@ -313,7 +315,7 @@ static void xcloselog(BIO* bp)
|
||||||
bp->ptr= NULL;
|
bp->ptr= NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined(VMS)
|
#elif defined(OPENSSL_SYS_VMS)
|
||||||
|
|
||||||
static int VMS_OPC_target = LOG_DAEMON;
|
static int VMS_OPC_target = LOG_DAEMON;
|
||||||
|
|
||||||
|
|
|
@ -228,7 +228,7 @@ int BIO_sock_should_retry(int i)
|
||||||
{
|
{
|
||||||
err=get_last_socket_error();
|
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))
|
if ((i == -1) && (err == 0))
|
||||||
return(1);
|
return(1);
|
||||||
#endif
|
#endif
|
||||||
|
@ -242,7 +242,7 @@ int BIO_sock_non_fatal_error(int err)
|
||||||
{
|
{
|
||||||
switch (err)
|
switch (err)
|
||||||
{
|
{
|
||||||
#if defined(WINDOWS)
|
#if defined(OPENSSL_SYS_WINDOWS)
|
||||||
# if defined(WSAEWOULDBLOCK)
|
# if defined(WSAEWOULDBLOCK)
|
||||||
case WSAEWOULDBLOCK:
|
case WSAEWOULDBLOCK:
|
||||||
# endif
|
# endif
|
||||||
|
|
|
@ -71,7 +71,7 @@
|
||||||
#include <openssl/crypto.h>
|
#include <openssl/crypto.h>
|
||||||
#include <openssl/err.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
|
#define TIMES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@
|
||||||
The __TMS macro will show if it was. If it wasn't defined, we should
|
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
|
undefine TIMES, since that tells the rest of the program how things
|
||||||
should be handled. -- Richard Levitte */
|
should be handled. -- Richard Levitte */
|
||||||
#if defined(VMS) && defined(__DECC) && !defined(__TMS)
|
#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
|
||||||
#undef TIMES
|
#undef TIMES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
#include <openssl/x509.h>
|
#include <openssl/x509.h>
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
|
|
||||||
#ifdef WINDOWS
|
#ifdef OPENSSL_SYS_WINDOWS
|
||||||
#include "../bio/bss_file.c"
|
#include "../bio/bss_file.c"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ static void genprime_cb(int p, int n, void *arg);
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
#include <openssl/rand.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
|
#define TIMES
|
||||||
#endif
|
#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
|
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
|
undefine TIMES, since that tells the rest of the program how things
|
||||||
should be handled. -- Richard Levitte */
|
should be handled. -- Richard Levitte */
|
||||||
#if defined(VMS) && defined(__DECC) && !defined(__TMS)
|
#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
|
||||||
#undef TIMES
|
#undef TIMES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
#include <openssl/bn.h>
|
#include <openssl/bn.h>
|
||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
#ifdef WINDOWS
|
#ifdef OPENSSL_SYS_WINDOWS
|
||||||
#include "../bio/bss_file.c"
|
#include "../bio/bss_file.c"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@
|
||||||
bn_div_words_abort(int i)
|
bn_div_words_abort(int i)
|
||||||
{
|
{
|
||||||
#ifdef BN_DEBUG
|
#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);
|
fprintf(stderr,"Division would overflow (%d)\n",i);
|
||||||
#endif
|
#endif
|
||||||
abort();
|
abort();
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
/* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */
|
/* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */
|
||||||
/* 06-Apr-92 Luke Brennan Support for VMS and add extra signal calls */
|
/* 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
|
#define TIMES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ OPENSSL_DECLARE_EXIT
|
||||||
The __TMS macro will show if it was. If it wasn't defined, we should
|
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
|
undefine TIMES, since that tells the rest of the program how things
|
||||||
should be handled. -- Richard Levitte */
|
should be handled. -- Richard Levitte */
|
||||||
#if defined(VMS) && defined(__DECC) && !defined(__TMS)
|
#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
|
||||||
#undef TIMES
|
#undef TIMES
|
||||||
#endif
|
#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 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);
|
printf("CAST cbc bytes per sec = %12.2f (%9.3fuS)\n",c,8.0e6/c);
|
||||||
exit(0);
|
exit(0);
|
||||||
#if defined(LINT) || defined(MSDOS)
|
#if defined(LINT) || defined(OPENSSL_SYS_MSDOS)
|
||||||
return(0);
|
return(0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
/* define PART1, PART2, PART3 or PART4 to build only with a few of the options.
|
/* 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. */
|
* 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
|
#define TIMES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ OPENSSL_DECLARE_EXIT
|
||||||
The __TMS macro will show if it was. If it wasn't defined, we should
|
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
|
undefine TIMES, since that tells the rest of the program how things
|
||||||
should be handled. -- Richard Levitte */
|
should be handled. -- Richard Levitte */
|
||||||
#if defined(VMS) && defined(__DECC) && !defined(__TMS)
|
#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
|
||||||
#undef TIMES
|
#undef TIMES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -332,7 +332,7 @@ int main(int argc, char **argv)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
exit(0);
|
exit(0);
|
||||||
#if defined(LINT) || defined(MSDOS)
|
#if defined(LINT) || defined(OPENSSL_SYS_MSDOS)
|
||||||
return(0);
|
return(0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,14 +48,14 @@ static COMP_METHOD zlib_method={
|
||||||
* work. Therefore, all ZLIB routines are loaded at run time
|
* work. Therefore, all ZLIB routines are loaded at run time
|
||||||
* and we do not link to a .LIB file.
|
* 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>
|
# include <windows.h>
|
||||||
|
|
||||||
# define Z_CALLCONV _stdcall
|
# define Z_CALLCONV _stdcall
|
||||||
# define ZLIB_SHARED
|
# define ZLIB_SHARED
|
||||||
#else
|
#else
|
||||||
# define Z_CALLCONV
|
# define Z_CALLCONV
|
||||||
#endif /* !(WINDOWS || WIN32) */
|
#endif /* !(OPENSSL_SYS_WINDOWS || OPENSSL_SYS_WIN32) */
|
||||||
|
|
||||||
#ifdef ZLIB_SHARED
|
#ifdef ZLIB_SHARED
|
||||||
#include <openssl/dso.h>
|
#include <openssl/dso.h>
|
||||||
|
@ -188,7 +188,7 @@ COMP_METHOD *COMP_zlib(void)
|
||||||
#ifdef ZLIB_SHARED
|
#ifdef ZLIB_SHARED
|
||||||
if (!zlib_loaded)
|
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);
|
zlib_dso = DSO_load(NULL, "ZLIB", NULL, 0);
|
||||||
#else
|
#else
|
||||||
zlib_dso = DSO_load(NULL, "z", NULL, 0);
|
zlib_dso = DSO_load(NULL, "z", NULL, 0);
|
||||||
|
|
|
@ -185,7 +185,7 @@ static int def_load(CONF *conf, const char *name, long *line)
|
||||||
int ret;
|
int ret;
|
||||||
BIO *in=NULL;
|
BIO *in=NULL;
|
||||||
|
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
in=BIO_new_file(name, "r");
|
in=BIO_new_file(name, "r");
|
||||||
#else
|
#else
|
||||||
in=BIO_new_file(name, "rb");
|
in=BIO_new_file(name, "rb");
|
||||||
|
|
|
@ -81,7 +81,7 @@ LHASH *CONF_load(LHASH *conf, const char *file, long *eline)
|
||||||
LHASH *ltmp;
|
LHASH *ltmp;
|
||||||
BIO *in=NULL;
|
BIO *in=NULL;
|
||||||
|
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
in=BIO_new_file(file, "r");
|
in=BIO_new_file(file, "r");
|
||||||
#else
|
#else
|
||||||
in=BIO_new_file(file, "rb");
|
in=BIO_new_file(file, "rb");
|
||||||
|
|
|
@ -62,7 +62,7 @@
|
||||||
#include <openssl/crypto.h>
|
#include <openssl/crypto.h>
|
||||||
#include <openssl/safestack.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 */
|
static double SSLeay_MSVC5_hack=0.0; /* and for VC1.5 */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ int CRYPTO_get_new_lockid(char *name)
|
||||||
char *str;
|
char *str;
|
||||||
int i;
|
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 hack to make Visual C++ 5.0 work correctly when linking as
|
||||||
* a DLL using /MT. Without this, the application cannot use
|
* a DLL using /MT. Without this, the application cannot use
|
||||||
* and floating point printf's.
|
* and floating point printf's.
|
||||||
|
@ -354,9 +354,9 @@ unsigned long CRYPTO_thread_id(void)
|
||||||
|
|
||||||
if (id_callback == NULL)
|
if (id_callback == NULL)
|
||||||
{
|
{
|
||||||
#ifdef WIN16
|
#ifdef OPENSSL_SYS_WIN16
|
||||||
ret=(unsigned long)GetCurrentTask();
|
ret=(unsigned long)GetCurrentTask();
|
||||||
#elif defined(WIN32)
|
#elif defined(OPENSSL_SYS_WIN32)
|
||||||
ret=(unsigned long)GetCurrentThreadId();
|
ret=(unsigned long)GetCurrentThreadId();
|
||||||
#elif defined(GETPID_IS_MEANINGLESS)
|
#elif defined(GETPID_IS_MEANINGLESS)
|
||||||
ret=1L;
|
ret=1L;
|
||||||
|
@ -464,7 +464,7 @@ const char *CRYPTO_get_lock_name(int type)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _DLL
|
#ifdef _DLL
|
||||||
#ifdef WIN32
|
#ifdef OPENSSL_SYS_WIN32
|
||||||
|
|
||||||
/* All we really need to do is remove the 'error' state when a thread
|
/* All we really need to do is remove the 'error' state when a thread
|
||||||
* detaches */
|
* detaches */
|
||||||
|
|
|
@ -74,7 +74,7 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef VMS
|
#ifndef OPENSSL_SYS_VMS
|
||||||
#define X509_CERT_AREA OPENSSLDIR
|
#define X509_CERT_AREA OPENSSLDIR
|
||||||
#define X509_CERT_DIR OPENSSLDIR "/certs"
|
#define X509_CERT_DIR OPENSSLDIR "/certs"
|
||||||
#define X509_CERT_FILE OPENSSLDIR "/cert.pem"
|
#define X509_CERT_FILE OPENSSLDIR "/cert.pem"
|
||||||
|
|
|
@ -59,25 +59,25 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#ifndef MSDOS
|
|
||||||
#ifndef VMS
|
|
||||||
#include <openssl/opensslconf.h>
|
#include <openssl/opensslconf.h>
|
||||||
|
#ifndef OPENSSL_SYS_MSDOS
|
||||||
|
#ifndef OPENSSL_SYS_VMS
|
||||||
#include OPENSSL_UNISTD
|
#include OPENSSL_UNISTD
|
||||||
#else /* VMS */
|
#else /* OPENSSL_SYS_VMS */
|
||||||
#ifdef __DECC
|
#ifdef __DECC
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#else /* not __DECC */
|
#else /* not __DECC */
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#endif /* __DECC */
|
#endif /* __DECC */
|
||||||
#endif /* VMS */
|
#endif /* OPENSSL_SYS_VMS */
|
||||||
#else /* MSDOS */
|
#else /* OPENSSL_SYS_MSDOS */
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include "des_ver.h"
|
#include "des_ver.h"
|
||||||
|
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
#include <types.h>
|
#include <types.h>
|
||||||
#include <stat.h>
|
#include <stat.h>
|
||||||
#else
|
#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,
|
void des_3cbc_encrypt(des_cblock *input,des_cblock *output,long length,
|
||||||
des_key_schedule sk1,des_key_schedule sk2,
|
des_key_schedule sk1,des_key_schedule sk2,
|
||||||
des_cblock *ivec1,des_cblock *ivec2,int enc);
|
des_cblock *ivec1,des_cblock *ivec2,int enc);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
#define EXIT(a) exit(a&0x10000000L)
|
#define EXIT(a) exit(a&0x10000000L)
|
||||||
#else
|
#else
|
||||||
#define EXIT(a) exit(a)
|
#define EXIT(a) exit(a)
|
||||||
|
@ -258,12 +258,12 @@ int main(int argc, char **argv)
|
||||||
#endif
|
#endif
|
||||||
if ( (in != NULL) &&
|
if ( (in != NULL) &&
|
||||||
(out != NULL) &&
|
(out != NULL) &&
|
||||||
#ifndef MSDOS
|
#ifndef OPENSSL_SYS_MSDOS
|
||||||
(stat(in,&ins) != -1) &&
|
(stat(in,&ins) != -1) &&
|
||||||
(stat(out,&outs) != -1) &&
|
(stat(out,&outs) != -1) &&
|
||||||
(ins.st_dev == outs.st_dev) &&
|
(ins.st_dev == outs.st_dev) &&
|
||||||
(ins.st_ino == outs.st_ino))
|
(ins.st_ino == outs.st_ino))
|
||||||
#else /* MSDOS */
|
#else /* OPENSSL_SYS_MSDOS */
|
||||||
(strcmp(in,out) == 0))
|
(strcmp(in,out) == 0))
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
@ -298,7 +298,7 @@ int main(int argc, char **argv)
|
||||||
EXIT(5);
|
EXIT(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MSDOS
|
#ifdef OPENSSL_SYS_MSDOS
|
||||||
/* This should set the file to binary mode. */
|
/* This should set the file to binary mode. */
|
||||||
{
|
{
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
@ -367,7 +367,7 @@ void doencryption(void)
|
||||||
des_cblock kk,k2;
|
des_cblock kk,k2;
|
||||||
FILE *O;
|
FILE *O;
|
||||||
int Exit=0;
|
int Exit=0;
|
||||||
#ifndef MSDOS
|
#ifndef OPENSSL_SYS_MSDOS
|
||||||
static unsigned char buf[BUFSIZE+8],obuf[BUFSIZE+8];
|
static unsigned char buf[BUFSIZE+8],obuf[BUFSIZE+8];
|
||||||
#else
|
#else
|
||||||
static unsigned char *buf=NULL,*obuf=NULL;
|
static unsigned char *buf=NULL,*obuf=NULL;
|
||||||
|
|
|
@ -60,8 +60,8 @@
|
||||||
#define HEADER_DES_LOCL_H
|
#define HEADER_DES_LOCL_H
|
||||||
|
|
||||||
#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN16)
|
#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN16)
|
||||||
#ifndef MSDOS
|
#ifndef OPENSSL_SYS_MSDOS
|
||||||
#define MSDOS
|
#define OPENSSL_SYS_MSDOS
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -70,8 +70,8 @@
|
||||||
|
|
||||||
#include <openssl/opensslconf.h>
|
#include <openssl/opensslconf.h>
|
||||||
|
|
||||||
#ifndef MSDOS
|
#ifndef OPENSSL_SYS_MSDOS
|
||||||
#if !defined(VMS) || defined(__DECC)
|
#if !defined(OPENSSL_SYS_VMS) || defined(__DECC)
|
||||||
#ifdef OPENSSL_UNISTD
|
#ifdef OPENSSL_UNISTD
|
||||||
# include OPENSSL_UNISTD
|
# include OPENSSL_UNISTD
|
||||||
#else
|
#else
|
||||||
|
@ -82,14 +82,14 @@
|
||||||
#endif
|
#endif
|
||||||
#include <openssl/des.h>
|
#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 <stdlib.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#endif
|
#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>
|
#include <string.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -59,12 +59,12 @@
|
||||||
/* define PART1, PART2, PART3 or PART4 to build only with a few of the options.
|
/* 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. */
|
* 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
|
#define TIMES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#ifndef MSDOS
|
#ifndef OPENSSL_SYS_MSDOS
|
||||||
#include <openssl/e_os2.h>
|
#include <openssl/e_os2.h>
|
||||||
#include OPENSSL_UNISTD
|
#include OPENSSL_UNISTD
|
||||||
#else
|
#else
|
||||||
|
@ -84,7 +84,7 @@ extern void exit();
|
||||||
The __TMS macro will show if it was. If it wasn't defined, we should
|
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
|
undefine TIMES, since that tells the rest of the program how things
|
||||||
should be handled. -- Richard Levitte */
|
should be handled. -- Richard Levitte */
|
||||||
#if defined(VMS) && defined(__DECC) && !defined(__TMS)
|
#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
|
||||||
#undef TIMES
|
#undef TIMES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -598,7 +598,7 @@ int main(int argc, char **argv)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
exit(0);
|
exit(0);
|
||||||
#if defined(LINT) || defined(MSDOS)
|
#if defined(LINT) || defined(OPENSSL_SYS_MSDOS)
|
||||||
return(0);
|
return(0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,9 +56,9 @@
|
||||||
* [including the GNU Public Licence.]
|
* [including the GNU Public Licence.]
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(WIN32) || defined(WIN16) || defined(WINDOWS)
|
#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN16) || defined(OPENSSL_SYS_WINDOWS)
|
||||||
#ifndef MSDOS
|
#ifndef OPENSSL_SYS_MSDOS
|
||||||
#define MSDOS
|
#define OPENSSL_SYS_MSDOS
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
* [including the GNU Public Licence.]
|
* [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>
|
#include <openssl/opensslconf.h>
|
||||||
#ifdef OPENSSL_UNISTD
|
#ifdef OPENSSL_UNISTD
|
||||||
# include OPENSSL_UNISTD
|
# include OPENSSL_UNISTD
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
/* #define SIGACTION */ /* Define this if you have sigaction() */
|
/* #define SIGACTION */ /* Define this if you have sigaction() */
|
||||||
|
|
||||||
#ifdef WIN16TTY
|
#ifdef WIN16TTY
|
||||||
#undef WIN16
|
#undef OPENSSL_SYS_WIN16
|
||||||
#undef _WINDOWS
|
#undef _WINDOWS
|
||||||
#include <graph.h>
|
#include <graph.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -92,7 +92,7 @@
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#ifdef VMS /* prototypes for sys$whatever */
|
#ifdef OPENSSL_SYS_VMS /* prototypes for sys$whatever */
|
||||||
#include <starlet.h>
|
#include <starlet.h>
|
||||||
#ifdef __DECC
|
#ifdef __DECC
|
||||||
#pragma message disable DOLLARID
|
#pragma message disable DOLLARID
|
||||||
|
@ -127,7 +127,7 @@
|
||||||
#undef SGTTY
|
#undef SGTTY
|
||||||
#endif
|
#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 TERMIOS
|
||||||
#undef TERMIO
|
#undef TERMIO
|
||||||
#define SGTTY
|
#define SGTTY
|
||||||
|
@ -157,16 +157,16 @@
|
||||||
#define TTY_set(tty,data) ioctl(tty,TIOCSETP,data)
|
#define TTY_set(tty,data) ioctl(tty,TIOCSETP,data)
|
||||||
#endif
|
#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>
|
#include <sys/ioctl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(MSDOS) && !defined(__CYGWIN32__)
|
#if defined(OPENSSL_SYS_MSDOS) && !defined(__CYGWIN32__)
|
||||||
#include <conio.h>
|
#include <conio.h>
|
||||||
#define fgets(a,b,c) noecho_fgets(a,b,c)
|
#define fgets(a,b,c) noecho_fgets(a,b,c)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
#include <ssdef.h>
|
#include <ssdef.h>
|
||||||
#include <iodef.h>
|
#include <iodef.h>
|
||||||
#include <ttdef.h>
|
#include <ttdef.h>
|
||||||
|
@ -195,7 +195,7 @@ static void read_till_nl(FILE *);
|
||||||
static void recsig(int);
|
static void recsig(int);
|
||||||
static void pushsig(void);
|
static void pushsig(void);
|
||||||
static void popsig(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);
|
static int noecho_fgets(char *buf, int size, FILE *tty);
|
||||||
#endif
|
#endif
|
||||||
#ifdef SIGACTION
|
#ifdef SIGACTION
|
||||||
|
@ -216,7 +216,7 @@ int des_read_pw_string(char *buf, int length, const char *prompt,
|
||||||
return(ret);
|
return(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef WIN16
|
#ifndef OPENSSL_SYS_WIN16
|
||||||
|
|
||||||
static void read_till_nl(FILE *in)
|
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 des_read_pw(char *buf, char *buff, int size, const char *prompt,
|
||||||
int verify)
|
int verify)
|
||||||
{
|
{
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
struct IOSB iosb;
|
struct IOSB iosb;
|
||||||
$DESCRIPTOR(terminal,"TT");
|
$DESCRIPTOR(terminal,"TT");
|
||||||
long tty_orig[3], tty_new[3];
|
long tty_orig[3], tty_new[3];
|
||||||
long status;
|
long status;
|
||||||
unsigned short channel = 0;
|
unsigned short channel = 0;
|
||||||
#else
|
#else
|
||||||
#ifndef MSDOS
|
#ifndef OPENSSL_SYS_MSDOS
|
||||||
TTY_STRUCT tty_orig,tty_new;
|
TTY_STRUCT tty_orig,tty_new;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -265,7 +265,7 @@ int des_read_pw(char *buf, char *buff, int size, const char *prompt,
|
||||||
is_a_tty=1;
|
is_a_tty=1;
|
||||||
tty=NULL;
|
tty=NULL;
|
||||||
|
|
||||||
#ifdef MSDOS
|
#ifdef OPENSSL_SYS_MSDOS
|
||||||
if ((tty=fopen("con","r")) == NULL)
|
if ((tty=fopen("con","r")) == NULL)
|
||||||
tty=stdin;
|
tty=stdin;
|
||||||
#elif defined(MAC_OS_pre_X)
|
#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;
|
tty=stdin;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(TTY_get) && !defined(VMS)
|
#if defined(TTY_get) && !defined(OPENSSL_SYS_VMS)
|
||||||
if (TTY_get(fileno(tty),&tty_orig) == -1)
|
if (TTY_get(fileno(tty),&tty_orig) == -1)
|
||||||
{
|
{
|
||||||
#ifdef ENOTTY
|
#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));
|
memcpy(&(tty_new),&(tty_orig),sizeof(tty_orig));
|
||||||
#endif
|
#endif
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
status = sys$assign(&terminal,&channel,0,0);
|
status = sys$assign(&terminal,&channel,0,0);
|
||||||
if (status != SS$_NORMAL)
|
if (status != SS$_NORMAL)
|
||||||
return(-1);
|
return(-1);
|
||||||
|
@ -312,7 +312,7 @@ int des_read_pw(char *buf, char *buff, int size, const char *prompt,
|
||||||
tty_new.TTY_FLAGS &= ~ECHO;
|
tty_new.TTY_FLAGS &= ~ECHO;
|
||||||
#endif
|
#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))
|
if (is_a_tty && (TTY_set(fileno(tty),&tty_new) == -1))
|
||||||
#ifdef OPENSSL_SYS_MPE
|
#ifdef OPENSSL_SYS_MPE
|
||||||
; /* MPE lies -- echo really has been disabled */
|
; /* 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);
|
return(-1);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
tty_new[0] = tty_orig[0];
|
tty_new[0] = tty_orig[0];
|
||||||
tty_new[1] = tty_orig[1] | TT$M_NOECHO;
|
tty_new[1] = tty_orig[1] | TT$M_NOECHO;
|
||||||
tty_new[2] = tty_orig[2];
|
tty_new[2] = tty_orig[2];
|
||||||
|
@ -370,10 +370,10 @@ error:
|
||||||
perror("fgets(tty)");
|
perror("fgets(tty)");
|
||||||
#endif
|
#endif
|
||||||
/* What can we do if there is an error? */
|
/* 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);
|
if (ps >= 2) TTY_set(fileno(tty),&tty_orig);
|
||||||
#endif
|
#endif
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
if (ps >= 2)
|
if (ps >= 2)
|
||||||
status = sys$qiow(0,channel,IO$_SETMODE,&iosb,0,0
|
status = sys$qiow(0,channel,IO$_SETMODE,&iosb,0,0
|
||||||
,tty_orig,12,0,0,0,0);
|
,tty_orig,12,0,0,0,0);
|
||||||
|
@ -381,13 +381,13 @@ error:
|
||||||
|
|
||||||
if (ps >= 1) popsig();
|
if (ps >= 1) popsig();
|
||||||
if (stdin != tty) fclose(tty);
|
if (stdin != tty) fclose(tty);
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
status = sys$dassgn(channel);
|
status = sys$dassgn(channel);
|
||||||
#endif
|
#endif
|
||||||
return(!ok);
|
return(!ok);
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* WIN16 */
|
#else /* OPENSSL_SYS_WIN16 */
|
||||||
|
|
||||||
int des_read_pw(char *buf, char *buff, int size, char *prompt, int verify)
|
int des_read_pw(char *buf, char *buff, int size, char *prompt, int verify)
|
||||||
{
|
{
|
||||||
|
@ -460,7 +460,7 @@ static void recsig(int i)
|
||||||
#endif
|
#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)
|
static int noecho_fgets(char *buf, int size, FILE *tty)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
/* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */
|
/* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */
|
||||||
/* 06-Apr-92 Luke Brennan Support for VMS and add extra signal calls */
|
/* 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
|
#define TIMES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ OPENSSL_DECLARE_EXIT
|
||||||
The __TMS macro will show if it was. If it wasn't defined, we should
|
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
|
undefine TIMES, since that tells the rest of the program how things
|
||||||
should be handled. -- Richard Levitte */
|
should be handled. -- Richard Levitte */
|
||||||
#if defined(VMS) && defined(__DECC) && !defined(__TMS)
|
#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
|
||||||
#undef TIMES
|
#undef TIMES
|
||||||
#endif
|
#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("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);
|
printf("crypt per sec = %12.2f (%9.3fuS)\n",e,1.0e6/e);
|
||||||
exit(0);
|
exit(0);
|
||||||
#if defined(LINT) || defined(MSDOS)
|
#if defined(LINT) || defined(OPENSSL_SYS_MSDOS)
|
||||||
return(0);
|
return(0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#ifdef WINDOWS
|
#ifdef OPENSSL_SYS_WINDOWS
|
||||||
#include "../bio/bss_file.c"
|
#include "../bio/bss_file.c"
|
||||||
#endif
|
#endif
|
||||||
#include <openssl/crypto.h>
|
#include <openssl/crypto.h>
|
||||||
|
@ -76,7 +76,7 @@ int main(int argc, char *argv[])
|
||||||
#else
|
#else
|
||||||
#include <openssl/dh.h>
|
#include <openssl/dh.h>
|
||||||
|
|
||||||
#ifdef WIN16
|
#ifdef OPENSSL_SYS_WIN16
|
||||||
#define MS_CALLBACK _far _loadds
|
#define MS_CALLBACK _far _loadds
|
||||||
#else
|
#else
|
||||||
#define MS_CALLBACK
|
#define MS_CALLBACK
|
||||||
|
@ -99,7 +99,7 @@ int main(int argc, char *argv[])
|
||||||
int i,alen,blen,aout,bout,ret=1;
|
int i,alen,blen,aout,bout,ret=1;
|
||||||
BIO *out;
|
BIO *out;
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef OPENSSL_SYS_WIN32
|
||||||
CRYPTO_malloc_init();
|
CRYPTO_malloc_init();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
#include <openssl/bio.h>
|
#include <openssl/bio.h>
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
#ifdef WINDOWS
|
#ifdef OPENSSL_SYS_WINDOWS
|
||||||
#include "../bio/bss_file.c"
|
#include "../bio/bss_file.c"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ int main(int argc, char *argv[])
|
||||||
#else
|
#else
|
||||||
#include <openssl/dsa.h>
|
#include <openssl/dsa.h>
|
||||||
|
|
||||||
#ifdef WIN16
|
#ifdef OPENSSL_SYS_WIN16
|
||||||
#define MS_CALLBACK _far _loadds
|
#define MS_CALLBACK _far _loadds
|
||||||
#else
|
#else
|
||||||
#define MS_CALLBACK
|
#define MS_CALLBACK
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
#pragma message disable DOLLARID
|
#pragma message disable DOLLARID
|
||||||
#include <lib$routines.h>
|
#include <lib$routines.h>
|
||||||
#include <libfisdef.h>
|
#include <libfisdef.h>
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
#include "cryptlib.h"
|
#include "cryptlib.h"
|
||||||
#include <openssl/dso.h>
|
#include <openssl/dso.h>
|
||||||
|
|
||||||
#ifndef VMS
|
#ifndef OPENSSL_SYS_VMS
|
||||||
DSO_METHOD *DSO_METHOD_vms(void)
|
DSO_METHOD *DSO_METHOD_vms(void)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -369,4 +369,4 @@ static char *vms_name_converter(DSO *dso, const char *filename)
|
||||||
return(filename);
|
return(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* VMS */
|
#endif /* OPENSSL_SYS_VMS */
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
#include "cryptlib.h"
|
#include "cryptlib.h"
|
||||||
#include <openssl/dso.h>
|
#include <openssl/dso.h>
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef OPENSSL_SYS_WIN32
|
||||||
DSO_METHOD *DSO_METHOD_win32(void)
|
DSO_METHOD *DSO_METHOD_win32(void)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -273,4 +273,4 @@ static char *win32_name_converter(DSO *dso, const char *filename)
|
||||||
return(translated);
|
return(translated);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* WIN32 */
|
#endif /* OPENSSL_SYS_WIN32 */
|
||||||
|
|
|
@ -177,7 +177,7 @@ static ERR_STRING_DATA ERR_str_functs[]=
|
||||||
{ERR_PACK(0,SYS_F_BIND,0), "bind"},
|
{ERR_PACK(0,SYS_F_BIND,0), "bind"},
|
||||||
{ERR_PACK(0,SYS_F_LISTEN,0), "listen"},
|
{ERR_PACK(0,SYS_F_LISTEN,0), "listen"},
|
||||||
{ERR_PACK(0,SYS_F_ACCEPT,0), "accept"},
|
{ERR_PACK(0,SYS_F_ACCEPT,0), "accept"},
|
||||||
#ifdef WINDOWS
|
#ifdef OPENSSL_SYS_WINDOWS
|
||||||
{ERR_PACK(0,SYS_F_WSASTARTUP,0), "WSAstartup"},
|
{ERR_PACK(0,SYS_F_WSASTARTUP,0), "WSAstartup"},
|
||||||
#endif
|
#endif
|
||||||
{ERR_PACK(0,SYS_F_OPENDIR,0), "opendir"},
|
{ERR_PACK(0,SYS_F_OPENDIR,0), "opendir"},
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
/* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */
|
/* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */
|
||||||
/* 06-Apr-92 Luke Brennan Support for VMS and add extra signal calls */
|
/* 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
|
#define TIMES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ OPENSSL_DECLARE_EXIT
|
||||||
The __TMS macro will show if it was. If it wasn't defined, we should
|
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
|
undefine TIMES, since that tells the rest of the program how things
|
||||||
should be handled. -- Richard Levitte */
|
should be handled. -- Richard Levitte */
|
||||||
#if defined(VMS) && defined(__DECC) && !defined(__TMS)
|
#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
|
||||||
#undef TIMES
|
#undef TIMES
|
||||||
#endif
|
#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 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);
|
printf("IDEA cbc bytes per sec = %12.2f (%9.3fuS)\n",c,8.0e6/c);
|
||||||
exit(0);
|
exit(0);
|
||||||
#if defined(LINT) || defined(MSDOS)
|
#if defined(LINT) || defined(OPENSSL_SYS_MSDOS)
|
||||||
return(0);
|
return(0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -294,7 +294,7 @@ static void ssleay_rand_add(const void *buf, int num, double add)
|
||||||
entropy += add;
|
entropy += add;
|
||||||
if (!add_do_not_lock) CRYPTO_w_unlock(CRYPTO_LOCK_RAND);
|
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]);
|
assert(md_c[1] == md_count[1]);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,7 +93,7 @@
|
||||||
* RAND_egd() is a wrapper for RAND_egd_bytes() with numbytes=255.
|
* 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)
|
int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes)
|
||||||
{
|
{
|
||||||
return(-1);
|
return(-1);
|
||||||
|
|
|
@ -113,7 +113,7 @@
|
||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
#include "rand_lcl.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/types.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
#include "rand_lcl.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,
|
/* For now, this does nothing. I'm searching for a good random device,
|
||||||
then we'll see. */
|
then we'll see. */
|
||||||
|
|
|
@ -113,7 +113,7 @@
|
||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
#include "rand_lcl.h"
|
#include "rand_lcl.h"
|
||||||
|
|
||||||
#if defined(WINDOWS) || defined(WIN32)
|
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32)
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#ifndef _WIN32_WINNT
|
#ifndef _WIN32_WINNT
|
||||||
# define _WIN32_WINNT 0x0400
|
# define _WIN32_WINNT 0x0400
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
#include <unixio.h>
|
#include <unixio.h>
|
||||||
#endif
|
#endif
|
||||||
#ifndef NO_SYS_TYPES_H
|
#ifndef NO_SYS_TYPES_H
|
||||||
|
@ -136,7 +136,7 @@ int RAND_write_file(const char *file)
|
||||||
FILE *out = NULL;
|
FILE *out = NULL;
|
||||||
int n;
|
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 */
|
/* For some reason Win32 can't write to files created this way */
|
||||||
|
|
||||||
/* chmod(..., 0600) is too late to protect the file,
|
/* chmod(..., 0600) is too late to protect the file,
|
||||||
|
@ -168,7 +168,7 @@ int RAND_write_file(const char *file)
|
||||||
ret+=i;
|
ret+=i;
|
||||||
if (n <= 0) break;
|
if (n <= 0) break;
|
||||||
}
|
}
|
||||||
#ifdef VMS
|
#ifdef OPENSSL_SYS_VMS
|
||||||
/* Try to delete older versions of the file, until there aren't
|
/* Try to delete older versions of the file, until there aren't
|
||||||
any */
|
any */
|
||||||
{
|
{
|
||||||
|
@ -186,7 +186,7 @@ int RAND_write_file(const char *file)
|
||||||
some point... */
|
some point... */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* VMS */
|
#endif /* OPENSSL_SYS_VMS */
|
||||||
|
|
||||||
fclose(out);
|
fclose(out);
|
||||||
memset(buf,0,BUFSIZE);
|
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))
|
if (s != NULL && (strlen(s)+strlen(RFILE)+2 < size))
|
||||||
{
|
{
|
||||||
strcpy(buf,s);
|
strcpy(buf,s);
|
||||||
#ifndef VMS
|
#ifndef OPENSSL_SYS_VMS
|
||||||
strcat(buf,"/");
|
strcat(buf,"/");
|
||||||
#endif
|
#endif
|
||||||
strcat(buf,RFILE);
|
strcat(buf,RFILE);
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
/* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */
|
/* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */
|
||||||
/* 06-Apr-92 Luke Brennan Support for VMS and add extra signal calls */
|
/* 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
|
#define TIMES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ OPENSSL_DECLARE_EXIT
|
||||||
The __TMS macro will show if it was. If it wasn't defined, we should
|
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
|
undefine TIMES, since that tells the rest of the program how things
|
||||||
should be handled. -- Richard Levitte */
|
should be handled. -- Richard Levitte */
|
||||||
#if defined(VMS) && defined(__DECC) && !defined(__TMS)
|
#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
|
||||||
#undef TIMES
|
#undef TIMES
|
||||||
#endif
|
#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 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);
|
printf("RC2 cbc bytes per sec = %12.2f (%9.3fuS)\n",c,8.0e6/c);
|
||||||
exit(0);
|
exit(0);
|
||||||
#if defined(LINT) || defined(MSDOS)
|
#if defined(LINT) || defined(OPENSSL_SYS_MSDOS)
|
||||||
return(0);
|
return(0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,7 +141,7 @@ bad:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef MSDOS
|
#ifdef OPENSSL_SYS_MSDOS
|
||||||
/* This should set the file to binary mode. */
|
/* This should set the file to binary mode. */
|
||||||
{
|
{
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
/* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */
|
/* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */
|
||||||
/* 06-Apr-92 Luke Brennan Support for VMS and add extra signal calls */
|
/* 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
|
#define TIMES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ OPENSSL_DECLARE_EXIT
|
||||||
The __TMS macro will show if it was. If it wasn't defined, we should
|
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
|
undefine TIMES, since that tells the rest of the program how things
|
||||||
should be handled. -- Richard Levitte */
|
should be handled. -- Richard Levitte */
|
||||||
#if defined(VMS) && defined(__DECC) && !defined(__TMS)
|
#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
|
||||||
#undef TIMES
|
#undef TIMES
|
||||||
#endif
|
#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 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);
|
printf("RC4 bytes per sec = %12.2f (%9.3fuS)\n",c,8.0e6/c);
|
||||||
exit(0);
|
exit(0);
|
||||||
#if defined(LINT) || defined(MSDOS)
|
#if defined(LINT) || defined(OPENSSL_SYS_MSDOS)
|
||||||
return(0);
|
return(0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
/* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */
|
/* 11-Sep-92 Andrew Daviel Support for Silicon Graphics IRIX added */
|
||||||
/* 06-Apr-92 Luke Brennan Support for VMS and add extra signal calls */
|
/* 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
|
#define TIMES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ OPENSSL_DECLARE_EXIT
|
||||||
The __TMS macro will show if it was. If it wasn't defined, we should
|
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
|
undefine TIMES, since that tells the rest of the program how things
|
||||||
should be handled. -- Richard Levitte */
|
should be handled. -- Richard Levitte */
|
||||||
#if defined(VMS) && defined(__DECC) && !defined(__TMS)
|
#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
|
||||||
#undef TIMES
|
#undef TIMES
|
||||||
#endif
|
#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 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);
|
printf("RC5_32/12/16 cbc bytes per sec = %12.2f (%9.3fuS)\n",c,8.0e6/c);
|
||||||
exit(0);
|
exit(0);
|
||||||
#if defined(LINT) || defined(MSDOS)
|
#if defined(LINT) || defined(OPENSSL_SYS_MSDOS)
|
||||||
return(0);
|
return(0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -198,7 +198,7 @@ int RSA_verify(int dtype, const unsigned char *m, unsigned int m_len,
|
||||||
(sigtype == NID_md2WithRSAEncryption)))
|
(sigtype == NID_md2WithRSAEncryption)))
|
||||||
{
|
{
|
||||||
/* ok, we will let it through */
|
/* 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");
|
fprintf(stderr,"signature has problems, re-make with post SSLeay045\n");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -158,7 +158,7 @@
|
||||||
#undef ENGINE_set_default_BN_mod_exp_crt
|
#undef ENGINE_set_default_BN_mod_exp_crt
|
||||||
#define ENGINE_set_default_BN_mod_exp_crt ENGINE_set_def_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.... */
|
/* Case insensiteve linking causes problems.... */
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
#ifdef LINUX
|
#ifdef LINUX
|
||||||
#include <typedefs.h>
|
#include <typedefs.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef WIN32
|
#ifdef OPENSSL_SYS_WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef SOLARIS
|
#ifdef SOLARIS
|
||||||
|
@ -691,7 +691,7 @@ int MS_CALLBACK verify_callback(int ok, X509_STORE_CTX *ctx)
|
||||||
|
|
||||||
#define THREAD_STACK_SIZE (16*1024)
|
#define THREAD_STACK_SIZE (16*1024)
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef OPENSSL_SYS_WIN32
|
||||||
|
|
||||||
static HANDLE *lock_cs;
|
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);
|
printf("win32 threads done - %.3f seconds\n",ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* WIN32 */
|
#endif /* OPENSSL_SYS_WIN32 */
|
||||||
|
|
||||||
#ifdef SOLARIS
|
#ifdef SOLARIS
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
#ifdef LINUX
|
#ifdef LINUX
|
||||||
#include <typedefs.h>
|
#include <typedefs.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef WIN32
|
#ifdef OPENSSL_SYS_WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef SOLARIS
|
#ifdef SOLARIS
|
||||||
|
@ -105,7 +105,7 @@ static unsigned long pthreads_thread_id(void );
|
||||||
|
|
||||||
#define THREAD_STACK_SIZE (16*1024)
|
#define THREAD_STACK_SIZE (16*1024)
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef OPENSSL_SYS_WIN32
|
||||||
|
|
||||||
static HANDLE *lock_cs;
|
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
|
#ifdef SOLARIS
|
||||||
|
|
||||||
|
|
|
@ -61,13 +61,13 @@
|
||||||
#include <openssl/tmdiff.h>
|
#include <openssl/tmdiff.h>
|
||||||
|
|
||||||
#ifdef TIMEB
|
#ifdef TIMEB
|
||||||
#undef WIN32
|
#undef OPENSSL_SYS_WIN32
|
||||||
#undef TIMES
|
#undef TIMES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MSDOS
|
#ifndef OPENSSL_SYS_MSDOS
|
||||||
# ifndef WIN32
|
# ifndef OPENSSL_SYS_WIN32
|
||||||
# if !defined(VMS) || defined(__DECC)
|
# if !defined(OPENSSL_SYS_VMS) || defined(__DECC)
|
||||||
# define TIMES
|
# define TIMES
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
|
@ -85,7 +85,7 @@
|
||||||
The __TMS macro will show if it was. If it wasn't defined, we should
|
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
|
undefine TIMES, since that tells the rest of the program how things
|
||||||
should be handled. -- Richard Levitte */
|
should be handled. -- Richard Levitte */
|
||||||
#if defined(VMS) && defined(__DECC) && !defined(__TMS)
|
#if defined(OPENSSL_SYS_VMS_DECC) && !defined(__TMS)
|
||||||
#undef TIMES
|
#undef TIMES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@
|
||||||
#include <sys/timeb.h>
|
#include <sys/timeb.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef OPENSSL_SYS_WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ typedef struct ms_tm
|
||||||
#ifdef TIMES
|
#ifdef TIMES
|
||||||
struct tms ms_tms;
|
struct tms ms_tms;
|
||||||
#else
|
#else
|
||||||
# ifdef WIN32
|
# ifdef OPENSSL_SYS_WIN32
|
||||||
HANDLE thread_id;
|
HANDLE thread_id;
|
||||||
FILETIME ms_win32;
|
FILETIME ms_win32;
|
||||||
# else
|
# else
|
||||||
|
@ -138,7 +138,7 @@ char *ms_time_new(void)
|
||||||
if (ret == NULL)
|
if (ret == NULL)
|
||||||
return(NULL);
|
return(NULL);
|
||||||
memset(ret,0,sizeof(MS_TM));
|
memset(ret,0,sizeof(MS_TM));
|
||||||
#ifdef WIN32
|
#ifdef OPENSSL_SYS_WIN32
|
||||||
ret->thread_id=GetCurrentThread();
|
ret->thread_id=GetCurrentThread();
|
||||||
#endif
|
#endif
|
||||||
return((char *)ret);
|
return((char *)ret);
|
||||||
|
@ -153,14 +153,14 @@ void ms_time_free(char *a)
|
||||||
void ms_time_get(char *a)
|
void ms_time_get(char *a)
|
||||||
{
|
{
|
||||||
MS_TM *tm=(MS_TM *)a;
|
MS_TM *tm=(MS_TM *)a;
|
||||||
#ifdef WIN32
|
#ifdef OPENSSL_SYS_WIN32
|
||||||
FILETIME tmpa,tmpb,tmpc;
|
FILETIME tmpa,tmpb,tmpc;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef TIMES
|
#ifdef TIMES
|
||||||
times(&tm->ms_tms);
|
times(&tm->ms_tms);
|
||||||
#else
|
#else
|
||||||
# ifdef WIN32
|
# ifdef OPENSSL_SYS_WIN32
|
||||||
GetThreadTimes(tm->thread_id,&tmpa,&tmpb,&tmpc,&(tm->ms_win32));
|
GetThreadTimes(tm->thread_id,&tmpa,&tmpb,&tmpc,&(tm->ms_win32));
|
||||||
# else
|
# else
|
||||||
ftime(&tm->ms_timeb);
|
ftime(&tm->ms_timeb);
|
||||||
|
@ -177,7 +177,7 @@ double ms_time_diff(char *ap, char *bp)
|
||||||
#ifdef TIMES
|
#ifdef TIMES
|
||||||
ret=(b->ms_tms.tms_utime-a->ms_tms.tms_utime)/HZ;
|
ret=(b->ms_tms.tms_utime-a->ms_tms.tms_utime)/HZ;
|
||||||
#else
|
#else
|
||||||
# ifdef WIN32
|
# ifdef OPENSSL_SYS_WIN32
|
||||||
{
|
{
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
signed long long la,lb;
|
signed long long la,lb;
|
||||||
|
@ -210,7 +210,7 @@ int ms_time_cmp(char *ap, char *bp)
|
||||||
#ifdef TIMES
|
#ifdef TIMES
|
||||||
d=(b->ms_tms.tms_utime-a->ms_tms.tms_utime)/HZ;
|
d=(b->ms_tms.tms_utime-a->ms_tms.tms_utime)/HZ;
|
||||||
#else
|
#else
|
||||||
# ifdef WIN32
|
# ifdef OPENSSL_SYS_WIN32
|
||||||
d =(b->ms_win32.dwHighDateTime&0x000fffff)*10+b->ms_win32.dwLowDateTime/1e7;
|
d =(b->ms_win32.dwHighDateTime&0x000fffff)*10+b->ms_win32.dwLowDateTime/1e7;
|
||||||
d-=(a->ms_win32.dwHighDateTime&0x000fffff)*10+a->ms_win32.dwLowDateTime/1e7;
|
d-=(a->ms_win32.dwHighDateTime&0x000fffff)*10+a->ms_win32.dwLowDateTime/1e7;
|
||||||
# else
|
# else
|
||||||
|
|
|
@ -155,7 +155,7 @@ TXT_DB *TXT_DB_read(BIO *in, int num)
|
||||||
*(p++)='\0';
|
*(p++)='\0';
|
||||||
if ((n != num) || (*f != '\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);
|
fprintf(stderr,"wrong number of fields on line %ld (looking for field %d, got %d, '%s' left)\n",ln,num,n,f);
|
||||||
#endif
|
#endif
|
||||||
er=2;
|
er=2;
|
||||||
|
@ -164,7 +164,7 @@ TXT_DB *TXT_DB_read(BIO *in, int num)
|
||||||
pp[n]=p;
|
pp[n]=p;
|
||||||
if (!sk_push(ret->data,(char *)pp))
|
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");
|
fprintf(stderr,"failure in sk_push\n");
|
||||||
#endif
|
#endif
|
||||||
er=2;
|
er=2;
|
||||||
|
@ -176,7 +176,7 @@ err:
|
||||||
BUF_MEM_free(buf);
|
BUF_MEM_free(buf);
|
||||||
if (er)
|
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");
|
if (er == 1) fprintf(stderr,"OPENSSL_malloc failure\n");
|
||||||
#endif
|
#endif
|
||||||
if (ret->data != NULL) sk_free(ret->data);
|
if (ret->data != NULL) sk_free(ret->data);
|
||||||
|
|
10
ssl/kssl.c
10
ssl/kssl.c
|
@ -62,7 +62,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <openssl/opensslconf.h>
|
#include <openssl/opensslconf.h>
|
||||||
#ifndef NO_KRB5
|
#ifndef OPENSSL_NO_KRB5
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <openssl/ssl.h>
|
#include <openssl/ssl.h>
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
* and we do not link to a .LIB file.
|
* 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
|
* The purpose of the following pre-processor statements is to provide
|
||||||
* compatibility with different releases of MIT Kerberos for Windows.
|
* compatibility with different releases of MIT Kerberos for Windows.
|
||||||
|
@ -470,7 +470,7 @@ kssl_krb5_cc_get_principal
|
||||||
else
|
else
|
||||||
return(krb5_x ((cache)->ops->get_princ,(context, cache, principal)));
|
return(krb5_x ((cache)->ops->get_princ,(context, cache, principal)));
|
||||||
}
|
}
|
||||||
#endif /* WINDOWS || WIN32 */
|
#endif /* OPENSSL_SYS_WINDOWS || OPENSSL_SYS_WIN32 */
|
||||||
|
|
||||||
char
|
char
|
||||||
*kstring(char *string)
|
*kstring(char *string)
|
||||||
|
@ -1031,11 +1031,11 @@ void kssl_krb5_free_data_contents(krb5_context context, krb5_data *data)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* !NO_KRB5 */
|
#else /* !OPENSSL_NO_KRB5 */
|
||||||
|
|
||||||
#ifdef PEDANTIC
|
#ifdef PEDANTIC
|
||||||
static int dummy=(int)&dummy;
|
static int dummy=(int)&dummy;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* !NO_KRB5 */
|
#endif /* !OPENSSL_NO_KRB5 */
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ static int ssl23_client_hello(SSL *s);
|
||||||
static int ssl23_get_server_hello(SSL *s);
|
static int ssl23_get_server_hello(SSL *s);
|
||||||
static SSL_METHOD *ssl23_get_client_method(int ver)
|
static SSL_METHOD *ssl23_get_client_method(int ver)
|
||||||
{
|
{
|
||||||
#ifndef NO_SSL2
|
#ifndef OPENSSL_NO_SSL2
|
||||||
if (ver == SSL2_VERSION)
|
if (ver == SSL2_VERSION)
|
||||||
return(SSLv2_client_method());
|
return(SSLv2_client_method());
|
||||||
#endif
|
#endif
|
||||||
|
@ -322,7 +322,7 @@ static int ssl23_get_server_hello(SSL *s)
|
||||||
if ((p[0] & 0x80) && (p[2] == SSL2_MT_SERVER_HELLO) &&
|
if ((p[0] & 0x80) && (p[2] == SSL2_MT_SERVER_HELLO) &&
|
||||||
(p[5] == 0x00) && (p[6] == 0x02))
|
(p[5] == 0x00) && (p[6] == 0x02))
|
||||||
{
|
{
|
||||||
#ifdef NO_SSL2
|
#ifdef OPENSSL_NO_SSL2
|
||||||
SSLerr(SSL_F_SSL23_GET_SERVER_HELLO,SSL_R_UNSUPPORTED_PROTOCOL);
|
SSLerr(SSL_F_SSL23_GET_SERVER_HELLO,SSL_R_UNSUPPORTED_PROTOCOL);
|
||||||
goto err;
|
goto err;
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -110,7 +110,7 @@ SSL_METHOD *sslv23_base_method(void)
|
||||||
static int ssl23_num_ciphers(void)
|
static int ssl23_num_ciphers(void)
|
||||||
{
|
{
|
||||||
return(ssl3_num_ciphers()
|
return(ssl3_num_ciphers()
|
||||||
#ifndef NO_SSL2
|
#ifndef OPENSSL_NO_SSL2
|
||||||
+ ssl2_num_ciphers()
|
+ ssl2_num_ciphers()
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
|
@ -123,7 +123,7 @@ static SSL_CIPHER *ssl23_get_cipher(unsigned int u)
|
||||||
if (u < uu)
|
if (u < uu)
|
||||||
return(ssl3_get_cipher(u));
|
return(ssl3_get_cipher(u));
|
||||||
else
|
else
|
||||||
#ifndef NO_SSL2
|
#ifndef OPENSSL_NO_SSL2
|
||||||
return(ssl2_get_cipher(u-uu));
|
return(ssl2_get_cipher(u-uu));
|
||||||
#else
|
#else
|
||||||
return(NULL);
|
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];
|
((unsigned long)p[1]<<8L)|(unsigned long)p[2];
|
||||||
c.id=id;
|
c.id=id;
|
||||||
cp=ssl3_get_cipher_by_char(p);
|
cp=ssl3_get_cipher_by_char(p);
|
||||||
#ifndef NO_SSL2
|
#ifndef OPENSSL_NO_SSL2
|
||||||
if (cp == NULL)
|
if (cp == NULL)
|
||||||
cp=ssl2_get_cipher_by_char(p);
|
cp=ssl2_get_cipher_by_char(p);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -67,7 +67,7 @@ static SSL_METHOD *ssl23_get_server_method(int ver);
|
||||||
int ssl23_get_client_hello(SSL *s);
|
int ssl23_get_client_hello(SSL *s);
|
||||||
static SSL_METHOD *ssl23_get_server_method(int ver)
|
static SSL_METHOD *ssl23_get_server_method(int ver)
|
||||||
{
|
{
|
||||||
#ifndef NO_SSL2
|
#ifndef OPENSSL_NO_SSL2
|
||||||
if (ver == SSL2_VERSION)
|
if (ver == SSL2_VERSION)
|
||||||
return(SSLv2_server_method());
|
return(SSLv2_server_method());
|
||||||
#endif
|
#endif
|
||||||
|
@ -208,7 +208,7 @@ int ssl23_get_client_hello(SSL *s)
|
||||||
int n=0,j;
|
int n=0,j;
|
||||||
int type=0;
|
int type=0;
|
||||||
int v[2];
|
int v[2];
|
||||||
#ifndef NO_RSA
|
#ifndef OPENSSL_NO_RSA
|
||||||
int use_sslv2_strong=0;
|
int use_sslv2_strong=0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -474,7 +474,7 @@ int ssl23_get_client_hello(SSL *s)
|
||||||
|
|
||||||
if (type == 1)
|
if (type == 1)
|
||||||
{
|
{
|
||||||
#ifdef NO_SSL2
|
#ifdef OPENSSL_NO_SSL2
|
||||||
SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO,SSL_R_UNSUPPORTED_PROTOCOL);
|
SSLerr(SSL_F_SSL23_GET_CLIENT_HELLO,SSL_R_UNSUPPORTED_PROTOCOL);
|
||||||
goto err;
|
goto err;
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ssl_locl.h"
|
#include "ssl_locl.h"
|
||||||
#ifndef NO_SSL2
|
#ifndef OPENSSL_NO_SSL2
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <openssl/rand.h>
|
#include <openssl/rand.h>
|
||||||
#include <openssl/buffer.h>
|
#include <openssl/buffer.h>
|
||||||
|
@ -1001,7 +1001,7 @@ end:
|
||||||
EVP_PKEY_free(pkey);
|
EVP_PKEY_free(pkey);
|
||||||
return(i);
|
return(i);
|
||||||
}
|
}
|
||||||
#else /* !NO_SSL2 */
|
#else /* !OPENSSL_NO_SSL2 */
|
||||||
|
|
||||||
# if PEDANTIC
|
# if PEDANTIC
|
||||||
static void *dummy=&dummy;
|
static void *dummy=&dummy;
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ssl_locl.h"
|
#include "ssl_locl.h"
|
||||||
#ifndef NO_SSL2
|
#ifndef OPENSSL_NO_SSL2
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
int ssl2_enc_init(SSL *s, int client)
|
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);
|
EVP_DigestFinal(&c,md,NULL);
|
||||||
/* some would say I should zero the md context */
|
/* some would say I should zero the md context */
|
||||||
}
|
}
|
||||||
#else /* !NO_SSL2 */
|
#else /* !OPENSSL_NO_SSL2 */
|
||||||
|
|
||||||
# if PEDANTIC
|
# if PEDANTIC
|
||||||
static void *dummy=&dummy;
|
static void *dummy=&dummy;
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ssl_locl.h"
|
#include "ssl_locl.h"
|
||||||
#ifndef NO_SSL2
|
#ifndef OPENSSL_NO_SSL2
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <openssl/rsa.h>
|
#include <openssl/rsa.h>
|
||||||
#include <openssl/objects.h>
|
#include <openssl/objects.h>
|
||||||
|
@ -479,7 +479,7 @@ int ssl2_shutdown(SSL *s)
|
||||||
s->shutdown=(SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN);
|
s->shutdown=(SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN);
|
||||||
return(1);
|
return(1);
|
||||||
}
|
}
|
||||||
#else /* !NO_SSL2 */
|
#else /* !OPENSSL_NO_SSL2 */
|
||||||
|
|
||||||
# if PEDANTIC
|
# if PEDANTIC
|
||||||
static void *dummy=&dummy;
|
static void *dummy=&dummy;
|
||||||
|
|
|
@ -57,7 +57,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ssl_locl.h"
|
#include "ssl_locl.h"
|
||||||
#ifndef NO_SSL2
|
#ifndef OPENSSL_NO_SSL2
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <openssl/objects.h>
|
#include <openssl/objects.h>
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ SSL_METHOD *SSLv2_method(void)
|
||||||
}
|
}
|
||||||
return(&SSLv2_data);
|
return(&SSLv2_data);
|
||||||
}
|
}
|
||||||
#else /* !NO_SSL2 */
|
#else /* !OPENSSL_NO_SSL2 */
|
||||||
|
|
||||||
# if PEDANTIC
|
# if PEDANTIC
|
||||||
static void *dummy=&dummy;
|
static void *dummy=&dummy;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue