summaryrefslogtreecommitdiffstats
path: root/crypto/x509
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2020-02-06 15:17:28 +0000
committerMatt Caswell <matt@openssl.org>2020-02-07 23:26:43 +0000
commitad5b71be73f0450a9eb51c8b845796fe4183601f (patch)
tree5dc74329a973f113db3e4d3008ba65fdd4db373a /crypto/x509
parent34675b2ba942f81a74bd8bc46b937604dca0a645 (diff)
Fix no-ec
Recent SM2 related changes were not properly guarded with OPENSSL_NO_EC Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/11029)
Diffstat (limited to 'crypto/x509')
-rw-r--r--crypto/x509/x_all.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/x509/x_all.c b/crypto/x509/x_all.c
index 5a5f098558..89940a0cc9 100644
--- a/crypto/x509/x_all.c
+++ b/crypto/x509/x_all.c
@@ -44,12 +44,14 @@ static EVP_MD_CTX *make_id_ctx(EVP_PKEY *r, ASN1_OCTET_STRING *id)
goto error;
}
+#ifndef OPENSSL_NO_EC
if (id != NULL) {
if (EVP_PKEY_CTX_set1_id(pctx, id->data, id->length) <= 0) {
X509err(0, ERR_R_MALLOC_FAILURE);
goto error;
}
}
+#endif
EVP_MD_CTX_set_pkey_ctx(ctx, pctx);