summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/dsa
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/dsa')
-rw-r--r--src/lib/libcrypto/dsa/dsa.h5
-rw-r--r--src/lib/libcrypto/dsa/dsa_lib.c20
2 files changed, 23 insertions, 2 deletions
diff --git a/src/lib/libcrypto/dsa/dsa.h b/src/lib/libcrypto/dsa/dsa.h
index 20db7f91c1..6d618113fd 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.26 2018/02/18 14:58:12 tb Exp $ */ 1/* $OpenBSD: dsa.h,v 1.27 2018/02/20 17:45:44 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 *
@@ -262,6 +262,9 @@ void DSA_get0_pqg(const DSA *d, const BIGNUM **p, const BIGNUM **q,
262int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g); 262int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g);
263void DSA_get0_key(const DSA *d, const BIGNUM **pub_key, const BIGNUM **priv_key); 263void DSA_get0_key(const DSA *d, const BIGNUM **pub_key, const BIGNUM **priv_key);
264int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key); 264int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key);
265void DSA_clear_flags(DSA *d, int flags);
266int DSA_test_flags(const DSA *d, int flags);
267void DSA_set_flags(DSA *d, int flags);
265 268
266#define EVP_PKEY_CTX_set_dsa_paramgen_bits(ctx, nbits) \ 269#define EVP_PKEY_CTX_set_dsa_paramgen_bits(ctx, nbits) \
267 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA, EVP_PKEY_OP_PARAMGEN, \ 270 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA, EVP_PKEY_OP_PARAMGEN, \
diff --git a/src/lib/libcrypto/dsa/dsa_lib.c b/src/lib/libcrypto/dsa/dsa_lib.c
index 772c939d31..a43b142b6e 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.26 2018/02/18 14:58:12 tb Exp $ */ 1/* $OpenBSD: dsa_lib.c,v 1.27 2018/02/20 17:45:44 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 *
@@ -364,3 +364,21 @@ DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key)
364 364
365 return 1; 365 return 1;
366} 366}
367
368void
369DSA_clear_flags(DSA *d, int flags)
370{
371 d->flags &= ~flags;
372}
373
374int
375DSA_test_flags(const DSA *d, int flags)
376{
377 return d->flags & flags;
378}
379
380void
381DSA_set_flags(DSA *d, int flags)
382{
383 d->flags |= flags;
384}