X-Git-Url: https://git.openssl.org/?a=blobdiff_plain;f=crypto%2Fdsa%2Fdsagen.c;h=a0b097664086384f9d67736efde77aa1a53985e2;hb=97b1719583b3b0e096fdba29573678ac6fd6bae3;hp=3422d877f4136438f4f46497786a79a8985d8ebe;hpb=eda1f21f1af8b6f77327e7b37573af9c1ba73726;p=openssl.git diff --git a/crypto/dsa/dsagen.c b/crypto/dsa/dsagen.c index 3422d877f4..a0b0976640 100644 --- a/crypto/dsa/dsagen.c +++ b/crypto/dsa/dsagen.c @@ -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 -#include "dsa.h" +#include #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); }