include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
+include $(INCLUDE_DIR)/openssl-engine.mk
PKG_UNPACK:=$(HOST_TAR) -C "$(PKG_BUILD_DIR)" --strip-components=1 -xzf "$(DL_DIR)/$(PKG_SOURCE)"
PKG_INSTALL:=
-ENGINES_DIR:=engines-1.1
-
define Package/gost_engine/Default
+ $(call Package/openssl/engine/Default)
TITLE:=GOST engine for OpenSSL
URL:=http://www.openssl.org/
- SECTION:=libs
- CATEGORY:=Libraries
endef
define Package/gost_engine/Default/description
Russian GOST crypto algorithms for OpenSSL.
endef
+$(eval $(call Package/openssl/add-engine,gost,libopenssl-gost_engine))
define Package/libopenssl-gost_engine
$(call Package/gost_engine/Default)
- SUBMENU:=SSL
+ $(call Package/openssl/engine/Default)
TITLE+= (library)
URL:=https://github.com/gost-engine/engine/
- DEPENDS:=libopenssl @OPENSSL_ENGINE +libopenssl-conf
endef
define Package/libopenssl-gost_engine/description
CMAKE_OPTIONS += -DOPENSSL_ENGINES_DIR=/usr/lib/$(ENGINES_DIR)
define Package/libopenssl-gost_engine/install
- $(INSTALL_DIR) $(1)/usr/lib/$(ENGINES_DIR)
+ $(INSTALL_DIR) $(1)/usr/lib/$(ENGINES_DIR) $(1)/etc/ssl/engines.cnf.d
$(INSTALL_DATA) $(PKG_BUILD_DIR)/bin/gost.so \
$(1)/usr/lib/$(ENGINES_DIR)/
+ $(INSTALL_DATA) ./files/gost.cnf $(1)/etc/ssl/engines.cnf.d/
endef
define Package/gost_engine-util/install
--- /dev/null
+[gost]
+default_algorithms = ALL
+# CRYPT_PARAMS: OID of default GOST 28147-89 parameters It allows the
+# user to choose between different parameter sets of symmetric cipher
+# algorithm. RFC 4357 specifies several parameters for the
+# GOST 28147-89 algorithm, but OpenSSL doesn't provide user interface
+# to choose one when encrypting. So use engine configuration parameter
+# instead.
+# Value of this parameter can be either short name, defined in OpenSSL
+# obj_dat.h header file or numeric representation of OID, defined in
+# RFC 4357. Defaults to id-tc26-gost-28147-param-Z
+#CRYPT_PARAMS = id-tc26-gost-28147-param-Z
+
+# PBE_PARAMS: Shortname of default digest alg for PBE
+#PBE_PARAMS =
+