Fix dsaparam -genkey with DER outform
[openssl.git] / crypto / ec / ec_curve.c
index 01d56543dbd58a81cc92f4269bd8ac58a88ec719..7d56d26ba9b4365febe916f26d262c5c81b65b4a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2002-2018 The OpenSSL Project Authors. All Rights Reserved.
  * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
  *
  * Licensed under the OpenSSL license (the "License").  You may not use
@@ -2751,6 +2751,7 @@ static const struct {
     }
 };
 
+#ifndef OPENSSL_NO_SM2
 static const struct {
     EC_CURVE_DATA h;
     unsigned char data[0 + 32 * 6];
@@ -2787,6 +2788,7 @@ static const struct {
         0x53, 0xbb, 0xf4, 0x09, 0x39, 0xd5, 0x41, 0x23,
     }
 };
+#endif /* OPENSSL_NO_SM2 */
 
 typedef struct _ec_list_element_st {
     int nid;
@@ -2997,8 +2999,10 @@ static const ec_list_element curve_list[] = {
      "RFC 5639 curve over a 512 bit prime field"},
     {NID_brainpoolP512t1, &_EC_brainpoolP512t1.h, 0,
      "RFC 5639 curve over a 512 bit prime field"},
+#ifndef OPENSSL_NO_SM2
     {NID_sm2, &_EC_sm2p256v1.h, 0,
      "SM2 curve over a 256 bit prime field"},
+#endif
 };
 
 #define curve_list_length OSSL_NELEM(curve_list)