The branch master has been updated via 27df4597316c28a03c73bacb4095e86e41da65bb (commit) via 98020023a46e4c32a468bf16e826da09e5547d37 (commit) from 3830c1943b6b7411134a28c5801e57d1b5b2dca2 (commit)
- Log ----------------------------------------------------------------- commit 27df4597316c28a03c73bacb4095e86e41da65bb Author: Todd Short <tsh...@akamai.com> Date: Mon Mar 19 14:22:56 2018 -0400 Fix no-sm3/no-sm2 (with strict-warnings) Reviewed-by: Richard Levitte <levi...@openssl.org> Reviewed-by: Matt Caswell <m...@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5677) commit 98020023a46e4c32a468bf16e826da09e5547d37 Author: Todd Short <tsh...@akamai.com> Date: Mon Mar 19 13:21:13 2018 -0400 Fix no-sm3 (and no-sm2) Reviewed-by: Richard Levitte <levi...@openssl.org> Reviewed-by: Matt Caswell <m...@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5677) ----------------------------------------------------------------------- Summary of changes: Configure | 1 + crypto/ec/ec_curve.c | 4 ++++ include/openssl/sm2.h | 8 ++++++++ 3 files changed, 13 insertions(+) diff --git a/Configure b/Configure index a85beea..0934088 100755 --- a/Configure +++ b/Configure @@ -486,6 +486,7 @@ my @disable_cascades = ( "tests" => [ "external-tests" ], "comp" => [ "zlib" ], "ec" => [ "tls1_3", "sm2" ], + "sm3" => [ "sm2" ], sub { !$disabled{"unit-test"} } => [ "heartbeats" ], sub { !$disabled{"msan"} } => [ "asm" ], diff --git a/crypto/ec/ec_curve.c b/crypto/ec/ec_curve.c index 01d5654..851e6a4 100644 --- a/crypto/ec/ec_curve.c +++ b/crypto/ec/ec_curve.c @@ -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) diff --git a/include/openssl/sm2.h b/include/openssl/sm2.h index a3c055b..24ee765 100644 --- a/include/openssl/sm2.h +++ b/include/openssl/sm2.h @@ -15,6 +15,10 @@ # ifndef OPENSSL_NO_SM2 +# ifdef __cplusplus +extern "C" { +# endif + # include <openssl/ec.h> /* The default user id as specified in GM/T 0009-2012 */ @@ -74,5 +78,9 @@ int SM2_decrypt(const EC_KEY *key, int ERR_load_SM2_strings(void); +# ifdef __cplusplus +} +# endif + # endif /* OPENSSL_NO_SM2 */ #endif _____ openssl-commits mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-commits