case "$enable_gost" in
yes)
AC_MSG_CHECKING(for GOST)
- AC_CHECK_LIB(crypto, ENGINE_load_gost,, [
- AC_MSG_ERROR([GOST enabled, but no GOST functions found in OpenSSL. Need openssl-1.0.0 or later.])
- ])
AC_DEFINE_UNQUOTED([USE_GOST], [1], [Define this to enable GOST support.])
;;
no|*)
case "$enable_gost" in
yes)
AC_MSG_CHECKING(for GOST)
- AC_CHECK_LIB(crypto, ENGINE_load_gost,, [
- AC_MSG_ERROR([GOST enabled, but no GOST functions found in OpenSSL. Need openssl-1.0.0 or later.])
- ])
AC_DEFINE_UNQUOTED([USE_GOST], [1], [Define this to enable GOST support.])
;;
no|*)
if(gost_id) return gost_id;
- /* loaded already */
+ /* see if configuration loaded gost implementation from other engine*/
+ meth = EVP_PKEY_asn1_find_str(NULL, "gost2001", -1);
+ if(meth) {
+ EVP_PKEY_asn1_get0_info(&gost_id, NULL, NULL, NULL, NULL, meth);
+ return gost_id;
+ }
+
+ /* see if engine can be loaded already */
e = ENGINE_by_id("gost");
if(!e) {
- /* load it ourself */
- ENGINE_load_gost();
+ /* load it ourself, in case statically linked */
+ ENGINE_load_builtin_engines();
+ ENGINE_load_dynamic();
e = ENGINE_by_id("gost");
}
if(!e) {