diff options
-rw-r--r-- | crypto/dh/dh_lib.c | 5 | ||||
-rw-r--r-- | include/crypto/dh.h | 2 |
2 files changed, 7 insertions, 0 deletions
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); diff --git a/include/crypto/dh.h b/include/crypto/dh.h index 3af3c52..7c7cebd 100644 --- a/include/crypto/dh.h +++ b/include/crypto/dh.h @@ -23,3 +23,5 @@ int dh_get0_nid(const DH *dh); int dh_check_pub_key_partial(const DH *dh, const BIGNUM *pub_key, int *ret); int dh_check_priv_key(const DH *dh, const BIGNUM *priv_key, int *ret); int dh_check_pairwise(DH *dh); + +const DH_METHOD *dh_get_method(const DH *dh); |