From ed2a76eab4842652408e483e5779a9d657e8d786 Mon Sep 17 00:00:00 2001 From: Juan Castillo Date: Tue, 30 Jun 2015 13:36:57 +0100 Subject: TBB: build 'cert_create' with ECDSA only if OpenSSL supports it Some Linux distributions include an OpenSSL library which has been built without ECDSA support. Trying to build the certificate generation tool on those distributions will result in a build error. This patch fixes that issue by including ECDSA support only if OpenSSL has been built with ECDSA. In that case, the OpenSSL configuration file does not define the OPENSSL_NO_EC macro. The tool will build successfully, although the resulting binary will not support ECDSA keys. Change-Id: I4627d1abd19eef7ad3251997d8218599187eb902 --- tools/cert_create/src/main.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools/cert_create/src/main.c') diff --git a/tools/cert_create/src/main.c b/tools/cert_create/src/main.c index 77faf42e..c78d87ad 100644 --- a/tools/cert_create/src/main.c +++ b/tools/cert_create/src/main.c @@ -142,7 +142,9 @@ static char *strdup(const char *str) static const char *key_algs_str[] = { [KEY_ALG_RSA] = "rsa", +#ifndef OPENSSL_NO_EC [KEY_ALG_ECDSA] = "ecdsa" +#endif /* OPENSSL_NO_EC */ }; /* Command line options */ -- cgit