summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libcrypto/dsa/dsa.h5
-rw-r--r--lib/libcrypto/dsa/dsa_lib.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/lib/libcrypto/dsa/dsa.h b/lib/libcrypto/dsa/dsa.h
index 391f02c5a40..7a5c2cd1c03 100644
--- a/lib/libcrypto/dsa/dsa.h
+++ b/lib/libcrypto/dsa/dsa.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dsa.h,v 1.32 2022/01/05 20:33:49 tb Exp $ */
+/* $OpenBSD: dsa.h,v 1.33 2022/01/05 20:52:14 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -202,6 +202,9 @@ void DSA_free(DSA *r);
/* "up" the DSA object's reference count */
int DSA_up_ref(DSA *r);
int DSA_size(const DSA *);
+#if defined(LIBRESSL_OPAQUE_DSA) || defined(LIBRESSL_CRYPTO_INTERNAL)
+int DSA_bits(const DSA *d);
+#endif
/* 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,const unsigned char *dgst,int dlen,
diff --git a/lib/libcrypto/dsa/dsa_lib.c b/lib/libcrypto/dsa/dsa_lib.c
index 146d2cc5e05..84d0fdb320c 100644
--- a/lib/libcrypto/dsa/dsa_lib.c
+++ b/lib/libcrypto/dsa/dsa_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dsa_lib.c,v 1.30 2022/01/05 20:33:49 tb Exp $ */
+/* $OpenBSD: dsa_lib.c,v 1.31 2022/01/05 20:52:14 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -414,3 +414,9 @@ DSA_get0_engine(DSA *d)
{
return d->engine;
}
+
+int
+DSA_bits(const DSA *dsa)
+{
+ return BN_num_bits(dsa->p);
+}