diff options
author | 2018-02-20 17:45:44 +0000 | |
---|---|---|
committer | 2018-02-20 17:45:44 +0000 | |
commit | cee30fc5602eb4964f0ed5fe88e6ecb6328a4070 (patch) | |
tree | 6dd0f33964564a8de00597cd6e9ff40a7af40803 | |
parent | Provide RSA_{clear,set,test}_flasg() (diff) | |
download | wireguard-openbsd-cee30fc5602eb4964f0ed5fe88e6ecb6328a4070.tar.xz wireguard-openbsd-cee30fc5602eb4964f0ed5fe88e6ecb6328a4070.zip |
Provide DSA_{clear,set,test}_flags()
ok jsing
-rw-r--r-- | lib/libcrypto/Symbols.list | 3 | ||||
-rw-r--r-- | lib/libcrypto/dsa/dsa.h | 5 | ||||
-rw-r--r-- | lib/libcrypto/dsa/dsa_lib.c | 20 |
3 files changed, 26 insertions, 2 deletions
diff --git a/lib/libcrypto/Symbols.list b/lib/libcrypto/Symbols.list index a6137ca95da..0cb1c381065 100644 --- a/lib/libcrypto/Symbols.list +++ b/lib/libcrypto/Symbols.list @@ -800,6 +800,7 @@ DSA_OpenSSL DSA_SIG_free DSA_SIG_it DSA_SIG_new +DSA_clear_flags DSA_do_sign DSA_do_verify DSA_dup_DH @@ -820,10 +821,12 @@ DSA_set0_key DSA_set0_pqg DSA_set_default_method DSA_set_ex_data +DSA_set_flags DSA_set_method DSA_sign DSA_sign_setup DSA_size +DSA_test_flags DSA_up_ref DSA_verify DSAparams_dup diff --git a/lib/libcrypto/dsa/dsa.h b/lib/libcrypto/dsa/dsa.h index 20db7f91c17..6d618113fdb 100644 --- a/lib/libcrypto/dsa/dsa.h +++ b/lib/libcrypto/dsa/dsa.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dsa.h,v 1.26 2018/02/18 14:58:12 tb Exp $ */ +/* $OpenBSD: dsa.h,v 1.27 2018/02/20 17:45:44 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -262,6 +262,9 @@ void DSA_get0_pqg(const DSA *d, const BIGNUM **p, const BIGNUM **q, int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g); void DSA_get0_key(const DSA *d, const BIGNUM **pub_key, const BIGNUM **priv_key); int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key); +void DSA_clear_flags(DSA *d, int flags); +int DSA_test_flags(const DSA *d, int flags); +void DSA_set_flags(DSA *d, int flags); #define EVP_PKEY_CTX_set_dsa_paramgen_bits(ctx, nbits) \ EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA, EVP_PKEY_OP_PARAMGEN, \ diff --git a/lib/libcrypto/dsa/dsa_lib.c b/lib/libcrypto/dsa/dsa_lib.c index 772c939d314..a43b142b6ec 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.26 2018/02/18 14:58:12 tb Exp $ */ +/* $OpenBSD: dsa_lib.c,v 1.27 2018/02/20 17:45:44 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -364,3 +364,21 @@ DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key) return 1; } + +void +DSA_clear_flags(DSA *d, int flags) +{ + d->flags &= ~flags; +} + +int +DSA_test_flags(const DSA *d, int flags) +{ + return d->flags & flags; +} + +void +DSA_set_flags(DSA *d, int flags) +{ + d->flags |= flags; +} |