summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authortb <>2022-01-05 20:52:14 +0000
committertb <>2022-01-05 20:52:14 +0000
commit6374ad4e43d13b83a40757c4aabea3a9a4d40c07 (patch)
treed97b55a8463b32f67d8c3b0c133809eb96fb742a /src/lib
parenteef6ddcccaf5fe42f6d86ba338a40717dad95c4c (diff)
downloadopenbsd-6374ad4e43d13b83a40757c4aabea3a9a4d40c07.tar.gz
openbsd-6374ad4e43d13b83a40757c4aabea3a9a4d40c07.tar.bz2
openbsd-6374ad4e43d13b83a40757c4aabea3a9a4d40c07.zip
Prepare to provide DSA_bits()
Used by Qt5 and Qt6 and slightly reduces the patching in there. ok inoguchi jsing
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/dsa/dsa.h5
-rw-r--r--src/lib/libcrypto/dsa/dsa_lib.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/src/lib/libcrypto/dsa/dsa.h b/src/lib/libcrypto/dsa/dsa.h
index 391f02c5a4..7a5c2cd1c0 100644
--- a/src/lib/libcrypto/dsa/dsa.h
+++ b/src/lib/libcrypto/dsa/dsa.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa.h,v 1.32 2022/01/05 20:33:49 tb Exp $ */ 1/* $OpenBSD: dsa.h,v 1.33 2022/01/05 20:52:14 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -202,6 +202,9 @@ void DSA_free(DSA *r);
202/* "up" the DSA object's reference count */ 202/* "up" the DSA object's reference count */
203int DSA_up_ref(DSA *r); 203int DSA_up_ref(DSA *r);
204int DSA_size(const DSA *); 204int DSA_size(const DSA *);
205#if defined(LIBRESSL_OPAQUE_DSA) || defined(LIBRESSL_CRYPTO_INTERNAL)
206int DSA_bits(const DSA *d);
207#endif
205 /* next 4 return -1 on error */ 208 /* next 4 return -1 on error */
206int DSA_sign_setup( DSA *dsa,BN_CTX *ctx_in,BIGNUM **kinvp,BIGNUM **rp); 209int DSA_sign_setup( DSA *dsa,BN_CTX *ctx_in,BIGNUM **kinvp,BIGNUM **rp);
207int DSA_sign(int type,const unsigned char *dgst,int dlen, 210int DSA_sign(int type,const unsigned char *dgst,int dlen,
diff --git a/src/lib/libcrypto/dsa/dsa_lib.c b/src/lib/libcrypto/dsa/dsa_lib.c
index 146d2cc5e0..84d0fdb320 100644
--- a/src/lib/libcrypto/dsa/dsa_lib.c
+++ b/src/lib/libcrypto/dsa/dsa_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: dsa_lib.c,v 1.30 2022/01/05 20:33:49 tb Exp $ */ 1/* $OpenBSD: dsa_lib.c,v 1.31 2022/01/05 20:52:14 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -414,3 +414,9 @@ DSA_get0_engine(DSA *d)
414{ 414{
415 return d->engine; 415 return d->engine;
416} 416}
417
418int
419DSA_bits(const DSA *dsa)
420{
421 return BN_num_bits(dsa->p);
422}