*/
#include <openssl/dsa.h>
+#include "internal/refcount.h"
struct dsa_st {
/*
* instead of of a EVP_PKEY
*/
int pad;
- long version;
+ int32_t version;
BIGNUM *p;
BIGNUM *q; /* == 20 */
BIGNUM *g;
int flags;
/* Normally used to cache montgomery values */
BN_MONT_CTX *method_mont_p;
- int references;
+ CRYPTO_REF_COUNT references;
CRYPTO_EX_DATA ex_data;
const DSA_METHOD *meth;
/* functional reference if 'meth' is ENGINE-provided */
CRYPTO_RWLOCK *lock;
};
+struct DSA_SIG_st {
+ BIGNUM *r;
+ BIGNUM *s;
+};
+
struct dsa_method {
char *name;
DSA_SIG *(*dsa_do_sign) (const unsigned char *dgst, int dlen, DSA *dsa);
BIGNUM **rp);
int (*dsa_do_verify) (const unsigned char *dgst, int dgst_len,
DSA_SIG *sig, DSA *dsa);
- int (*dsa_mod_exp) (DSA *dsa, BIGNUM *rr, BIGNUM *a1, BIGNUM *p1,
- BIGNUM *a2, BIGNUM *p2, BIGNUM *m, BN_CTX *ctx,
- BN_MONT_CTX *in_mont);
+ int (*dsa_mod_exp) (DSA *dsa, BIGNUM *rr, const BIGNUM *a1,
+ const BIGNUM *p1, const BIGNUM *a2, const BIGNUM *p2,
+ const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *in_mont);
/* Can be null */
- int (*bn_mod_exp) (DSA *dsa, BIGNUM *r, BIGNUM *a, const BIGNUM *p,
+ int (*bn_mod_exp) (DSA *dsa, BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
int (*init) (DSA *dsa);
int (*finish) (DSA *dsa);