From 72ae60d055703fb32f548b1239438d96e3da9d10 Mon Sep 17 00:00:00 2001 From: Mitch Lindgren Date: Fri, 12 Nov 2021 14:44:31 -0800 Subject: [PATCH] Set SCOSSL methods as default RSA/ECC methods --- SymCryptEngine/src/scossl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SymCryptEngine/src/scossl.c b/SymCryptEngine/src/scossl.c index 5db82a1..fa63d6f 100644 --- a/SymCryptEngine/src/scossl.c +++ b/SymCryptEngine/src/scossl.c @@ -172,6 +172,11 @@ static SCOSSL_STATUS scossl_bind_engine(ENGINE* e) goto end; } + // Also set our engine as the global default for ECC/RSA so that other engines which call through + // the default methods will call into our methods + RSA_set_default_method(ENGINE_get_RSA(e)); + EC_KEY_set_default_method(ENGINE_get_EC(e)); + // Initialize hidden static variables once at Engine load time if( !scossl_ecc_init_static() || !scossl_dh_init_static()