aboutsummaryrefslogtreecommitdiff
path: root/tools/cert_create/include/key.h
diff options
context:
space:
mode:
authorJuan Castillo <juan.castillo@arm.com>2015-06-30 13:36:57 +0100
committerJuan Castillo <juan.castillo@arm.com>2015-07-01 12:37:00 +0100
commited2a76eab4842652408e483e5779a9d657e8d786 (patch)
treecbaf334d5b7fe0776fcbf669fb19edb6f38ada4f /tools/cert_create/include/key.h
parent84f95bed549eab4ca40fbd0505e0e3720384880c (diff)
downloadtrusted-firmware-a-ed2a76eab4842652408e483e5779a9d657e8d786.tar.gz
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
Diffstat (limited to 'tools/cert_create/include/key.h')
-rw-r--r--tools/cert_create/include/key.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/cert_create/include/key.h b/tools/cert_create/include/key.h
index dfb315086..165ffa1cf 100644
--- a/tools/cert_create/include/key.h
+++ b/tools/cert_create/include/key.h
@@ -47,7 +47,10 @@ enum {
/* Supported key algorithms */
enum {
KEY_ALG_RSA,
- KEY_ALG_ECDSA
+#ifndef OPENSSL_NO_EC
+ KEY_ALG_ECDSA,
+#endif /* OPENSSL_NO_EC */
+ KEY_ALG_MAX_NUM
};
/*