Added support for ESSCertIDv2
[openssl.git] / crypto / dsa / dsa_locl.h
index d488951a16f26ec8d7291ca97248513b35f2e553..a81a4b49788d790d061006656c60393201893ac6 100644 (file)
@@ -8,6 +8,7 @@
  */
 
 #include <openssl/dsa.h>
+#include "internal/refcount.h"
 
 struct dsa_st {
     /*
@@ -15,7 +16,7 @@ struct dsa_st {
      * instead of of a EVP_PKEY
      */
     int pad;
-    long version;
+    int32_t version;
     BIGNUM *p;
     BIGNUM *q;                  /* == 20 */
     BIGNUM *g;
@@ -24,7 +25,7 @@ struct dsa_st {
     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 */
@@ -32,6 +33,11 @@ struct dsa_st {
     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);
@@ -39,11 +45,11 @@ struct dsa_method {
                            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);