X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fdsa%2Fdsa.h;h=a231c199b72db655ded8c8bd3d688fa5be8a1be5;hb=1efa9c33c0ba939b91f0c16bc5a672bc8febd161;hp=e5dfafe214b0f960ba963f25ce396fdd595007a9;hpb=b7896b3cb86d80206af14a14d69b0717786f2729;p=oweals%2Fopenssl.git diff --git a/crypto/dsa/dsa.h b/crypto/dsa/dsa.h index e5dfafe214..a231c199b7 100644 --- a/crypto/dsa/dsa.h +++ b/crypto/dsa/dsa.h @@ -1,5 +1,5 @@ /* crypto/dsa/dsa.h */ -/* 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 @@ -71,6 +71,8 @@ extern "C" { #include "bn.h" +#define DSA_FLAG_CACHE_MONT_P 0x01 + typedef struct dsa_st { /* This first variable is used to pick up errors where @@ -88,6 +90,10 @@ typedef struct dsa_st BIGNUM *kinv; /* Signing pre-calc */ BIGNUM *r; /* Signing pre-calc */ + int flags; + /* Normally used to cache montgomery values */ + char *method_mont_p; + int references; } DSA; @@ -106,7 +112,6 @@ typedef struct dsa_st DSA * DSA_new(void); int DSA_size(DSA *); - /* DSA * DSA_generate_key(int bits, void (*callback)()); */ /* next 4 return -1 on error */ int DSA_sign_setup( DSA *dsa,BN_CTX *ctx_in,BIGNUM **kinvp,BIGNUM **rp); int DSA_sign(int type,unsigned char *dgst,int dlen, @@ -121,7 +126,8 @@ DSA * d2i_DSAPublicKey(DSA **a, unsigned char **pp, long length); DSA * d2i_DSAPrivateKey(DSA **a, unsigned char **pp, long length); DSA * d2i_DSAparams(DSA **a, unsigned char **pp, long length); DSA * DSA_generate_parameters(int bits, unsigned char *seed,int seed_len, - int *counter_ret, unsigned long *h_ret,void (*callback)()); + int *counter_ret, unsigned long *h_ret,void + (*callback)(),char *cb_arg); int DSA_generate_key(DSA *a); int i2d_DSAPublicKey(DSA *a, unsigned char **pp); int i2d_DSAPrivateKey(DSA *a, unsigned char **pp); @@ -131,12 +137,12 @@ int i2d_DSAparams(DSA *a,unsigned char **pp); int DSAparams_print(BIO *bp, DSA *x); int DSA_print(BIO *bp, DSA *x, int off); #endif -#ifndef WIN16 +#ifndef NO_FP_API int DSAparams_print_fp(FILE *fp, DSA *x); int DSA_print_fp(FILE *bp, DSA *x, int off); #endif -int DSA_is_prime(BIGNUM *q,void (*callback)()); +int DSA_is_prime(BIGNUM *q,void (*callback)(),char *cb_arg); #else @@ -163,7 +169,7 @@ int DSA_is_prime(); int DSAparams_print(); int DSA_print(); -#ifndef WIN16 +#ifndef NO_FP_API int DSAparams_print_fp(); int DSA_print_fp(); #endif