Make the remaining LHASH macro changes. This should leave no remaining
[openssl.git] / crypto / dsa / dsagen.c
index 3422d877f4136438f4f46497786a79a8985d8ebe..a0b097664086384f9d67736efde77aa1a53985e2 100644 (file)
@@ -1,5 +1,5 @@
 /* crypto/dsa/dsagen.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
@@ -57,7 +57,7 @@
  */
 
 #include <stdio.h>
-#include "dsa.h"
+#include <openssl/dsa.h>
 
 #define TEST
 #define GENUINE_DSA
@@ -77,8 +77,7 @@ unsigned char seed[20]={
        0xe0,0x42,0x7d,LAST_VALUE};
 #endif
 
-int cb(p,n)
-int p,n;
+int cb(int p, int n)
        {
        char c='*';
 
@@ -98,8 +97,15 @@ main()
        unsigned char seed_buf[20];
        DSA *dsa;
        int counter,h;
+       BIO *bio_err=NULL;
+
+       if (bio_err == NULL)
+               bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
 
        memcpy(seed_buf,seed,20);
-       dsa=DSA_generate_key(1024,seed,20,&counter,&h,cb);
+       dsa=DSA_generate_parameters(1024,seed,20,&counter,&h,cb);
+
+       if (dsa == NULL)
+               DSA_print(bio_err,dsa,0);
        }