/* crypto/dsa/dsatest.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
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
-#ifdef WIN16
-#define APPS_WIN16
-#endif
#include "crypto.h"
#include "rand.h"
#include "bio.h"
#include "err.h"
#include "dsa.h"
-
-#ifdef WIN16
+#ifdef WINDOWS
#include "../bio/bss_file.c"
#endif
#endif
#ifndef NOPROTO
-static void MS_CALLBACK dsa_cb(int p, int n);
+static void MS_CALLBACK dsa_cb(int p, int n, char *arg);
#else
static void MS_CALLBACK dsa_cb();
#endif
BIO_printf(bio_err,"test generation of DSA parameters\n");
BIO_printf(bio_err,"expect '.*' followed by 5 lines of '.'s and '+'s\n");
- dsa=DSA_generate_parameters(512,seed,20,&counter,&h,dsa_cb);
+ dsa=DSA_generate_parameters(512,seed,20,&counter,&h,dsa_cb,
+ (char *)bio_err);
BIO_printf(bio_err,"seed\n");
for (i=0; i<20; i+=4)
return(0);
}
-static void MS_CALLBACK dsa_cb(p, n)
+static void MS_CALLBACK dsa_cb(p, n, arg)
int p;
int n;
+char *arg;
{
char c='*';
static int ok=0,num=0;
if (p == 1) c='+';
if (p == 2) { c='*'; ok++; }
if (p == 3) c='\n';
- BIO_write(bio_err,&c,1);
- BIO_flush(bio_err);
+ BIO_write((BIO *)arg,&c,1);
+ BIO_flush((BIO *)arg);
if (!ok && (p == 0) && (num > 1))
{
- BIO_printf(bio_err,"error in dsatest\n");
+ BIO_printf((BIO *)arg,"error in dsatest\n");
exit(1);
}
}