From: Arturo Buzarra <arturo.buzarra@digi.com>
Date: Thu, 31 Jan 2019 18:01:02 +0100
Subject: [PATCH] Modify openssl.cnf to automatically load the cryptochip
 engine

https://jira.digi.com/browse/DEL-5592

Signed-off-by: Gabriel Valcazar <gabriel.valcazar@digi.com>
Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
---
 apps/openssl.cnf | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/apps/openssl.cnf b/apps/openssl.cnf
index 6df2878d50..762582f4d0 100644
--- a/apps/openssl.cnf
+++ b/apps/openssl.cnf
@@ -3,6 +3,8 @@
 # This is mostly being used for generation of certificate requests.
 #

+openssl_conf = openssl_init
+
 # Note that you can include other files from the main configuration
 # file using the .include directive.
 #.include filename
@@ -348,3 +350,14 @@ ess_cert_id_chain	= no	# Must the ESS cert id chain be included?
 				# (optional, default: no)
 ess_cert_id_alg		= sha1	# algorithm to compute certificate
 				# identifier (optional, default: sha1)
+
+[ openssl_init ]
+engines = engine_section
+
+[ engine_section ]
+ateccx08 = ateccx08_config
+
+[ ateccx08_config ]
+engine_id = ateccx08
+dynamic_path = /usr/lib/ssl/engines/libateccssl.so
+init = 0
