cert_tool: update for compatibility with OpenSSL v1.1

This patch fixes incompatibility issues that prevent building the cert_tool
with OpenSSL >= v1.1.0. The changes introduced are still backwards
compatible with OpenSSL v1.0.2.

Fixes arm-software/trusted-fw#521

Signed-off-by: Michalis Pappas <mpappas@fastmail.fm>
diff --git a/tools/cert_create/src/main.c b/tools/cert_create/src/main.c
index df59961..741242f 100644
--- a/tools/cert_create/src/main.c
+++ b/tools/cert_create/src/main.c
@@ -244,7 +244,7 @@
 int main(int argc, char *argv[])
 {
 	STACK_OF(X509_EXTENSION) * sk;
-	X509_EXTENSION *cert_ext;
+	X509_EXTENSION *cert_ext = NULL;
 	ext_t *ext;
 	key_t *key;
 	cert_t *cert;