From c518117b99bc4aad62990e8a31b7bc1dae06d16c Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Sat, 29 Feb 2020 08:57:34 +0100 Subject: DH: add internal dh_get_method() This should have been publically present a long time ago, to be consistent with the RSA, DSA and EC_KEY APIs. However, since we've now deprecated that kind of function for the other key types, there's no point in adding a public function, but we still need it internally. Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/11193) --- crypto/dh/dh_lib.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'crypto/dh') diff --git a/crypto/dh/dh_lib.c b/crypto/dh/dh_lib.c index 29152dc..7666e77 100644 --- a/crypto/dh/dh_lib.c +++ b/crypto/dh/dh_lib.c @@ -45,6 +45,11 @@ int DH_set_method(DH *dh, const DH_METHOD *meth) return 1; } +const DH_METHOD *dh_get_method(const DH *dh) +{ + return dh->meth; +} + DH *DH_new(void) { return dh_new_intern(NULL, NULL); -- cgit v1.1