From 38dd4722c8789e19d91ae6a9eaf9e568eadc3625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Fri, 13 Jan 2006 08:41:06 +0000 Subject: [PATCH] (ENGINE_add_conf_module): Also load DH git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16540 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/des/engine.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/des/engine.c b/lib/des/engine.c index 574cfd834..c7f128d5f 100644 --- a/lib/des/engine.c +++ b/lib/des/engine.c @@ -305,11 +305,19 @@ ENGINE_add_conf_module(void) */ engine = ENGINE_by_dso("/usr/heimdal/lib/hc-modules/hc-gmp.so", NULL); - if (engine) { - const RSA_METHOD *rsamethod = ENGINE_get_RSA(engine); - if (rsamethod) - RSA_set_default_method(rsamethod); + if (engine == NULL) + return; + { + const RSA_METHOD *method = ENGINE_get_RSA(engine); + if (method) + RSA_set_default_method(method); } + { + const DH_METHOD *method = ENGINE_get_DH(engine); + if (method) + DH_set_default_method(method); + } + }