summaryrefslogtreecommitdiffstats
path: root/crypto/dsa
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/dsa')
-rw-r--r--crypto/dsa/dsa_lib.c4
-rw-r--r--crypto/dsa/dsa_locl.h3
2 files changed, 4 insertions, 3 deletions
diff --git a/crypto/dsa/dsa_lib.c b/crypto/dsa/dsa_lib.c
index 42324c70fb..e24c6b526f 100644
--- a/crypto/dsa/dsa_lib.c
+++ b/crypto/dsa/dsa_lib.c
@@ -120,7 +120,7 @@ void DSA_free(DSA *r)
if (r == NULL)
return;
- CRYPTO_atomic_add(&r->references, -1, &i, r->lock);
+ CRYPTO_DOWN_REF(&r->references, &i, r->lock);
REF_PRINT_COUNT("DSA", r);
if (i > 0)
return;
@@ -148,7 +148,7 @@ int DSA_up_ref(DSA *r)
{
int i;
- if (CRYPTO_atomic_add(&r->references, 1, &i, r->lock) <= 0)
+ if (CRYPTO_UP_REF(&r->references, &i, r->lock) <= 0)
return 0;
REF_PRINT_COUNT("DSA", r);
diff --git a/crypto/dsa/dsa_locl.h b/crypto/dsa/dsa_locl.h
index 9021fce0bf..f575195c37 100644
--- a/crypto/dsa/dsa_locl.h
+++ b/crypto/dsa/dsa_locl.h
@@ -8,6 +8,7 @@
*/
#include <openssl/dsa.h>
+#include "internal/refcount.h"
struct dsa_st {
/*
@@ -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 */