summaryrefslogtreecommitdiff
path: root/crypto/dh/dhtest.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/dh/dhtest.c')
-rw-r--r--crypto/dh/dhtest.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/crypto/dh/dhtest.c b/crypto/dh/dhtest.c
index b338715880..488f10fd41 100644
--- a/crypto/dh/dhtest.c
+++ b/crypto/dh/dhtest.c
@@ -1,5 +1,5 @@
/* crypto/dh/dhtest.c */
-/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
* This package is an SSL implementation written
@@ -59,8 +59,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#ifdef WIN16
-#define APPS_WIN16
+#ifdef WINDOWS
+#include "../bio/bss_file.c"
#endif
#include "crypto.h"
#include "bio.h"
@@ -74,14 +74,14 @@
#endif
#ifndef NOPROTO
-static void MS_CALLBACK cb(int p, int n);
+static void MS_CALLBACK cb(int p, int n, char *arg);
#else
static void MS_CALLBACK cb();
#endif
-#ifdef WIN16
+#ifdef NO_STDIO
#define APPS_WIN16
-#include "../bio/bss_file.c"
+#include "bss_file.c"
#endif
BIO *out=NULL;
@@ -103,7 +103,7 @@ char *argv[];
if (out == NULL) exit(1);
BIO_set_fp(out,stdout,BIO_NOCLOSE);
- a=DH_generate_parameters(64,DH_GENERATOR_5,cb);
+ a=DH_generate_parameters(64,DH_GENERATOR_5,cb,(char *)out);
if (a == NULL) goto err;
BIO_puts(out,"\np =");
@@ -170,9 +170,10 @@ err:
return(ret);
}
-static void MS_CALLBACK cb(p, n)
+static void MS_CALLBACK cb(p, n,arg)
int p;
int n;
+char *arg;
{
char c='*';
@@ -180,7 +181,7 @@ int n;
if (p == 1) c='+';
if (p == 2) c='*';
if (p == 3) c='\n';
- BIO_write(out,&c,1);
+ BIO_write((BIO *)arg,&c,1);
#ifdef LINT
p=n;
#endif