From 51f3021d974f32539a2727908018664963695b5d Mon Sep 17 00:00:00 2001 From: Nicola Tuveri Date: Fri, 13 Jul 2018 11:48:29 +0300 Subject: [PATCH] Remove stale SM2 error codes Run `make update ERROR_REBUILD=-rebuild` to remove some stale error codes for SM2 (which is now using its own submodule for error codes, i.e., `SM2_*`). Reviewed-by: Andy Polyakov Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/6690) --- crypto/ec/ec_err.c | 6 ------ crypto/include/internal/sm2err.h | 3 +++ include/internal/dsoerr.h | 3 +++ include/openssl/ecerr.h | 6 ------ 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/crypto/ec/ec_err.c b/crypto/ec/ec_err.c index 342b84fecb..b0bd3be2c1 100644 --- a/crypto/ec/ec_err.c +++ b/crypto/ec/ec_err.c @@ -261,12 +261,6 @@ static const ERR_STRING_DATA EC_str_functs[] = { {ERR_PACK(ERR_LIB_EC, EC_F_PKEY_EC_KEYGEN, 0), "pkey_ec_keygen"}, {ERR_PACK(ERR_LIB_EC, EC_F_PKEY_EC_PARAMGEN, 0), "pkey_ec_paramgen"}, {ERR_PACK(ERR_LIB_EC, EC_F_PKEY_EC_SIGN, 0), "pkey_ec_sign"}, - {ERR_PACK(ERR_LIB_EC, EC_F_PKEY_SM2_CTRL, 0), "pkey_sm2_ctrl"}, - {ERR_PACK(ERR_LIB_EC, EC_F_PKEY_SM2_CTRL_STR, 0), "pkey_sm2_ctrl_str"}, - {ERR_PACK(ERR_LIB_EC, EC_F_PKEY_SM2_INIT, 0), "pkey_sm2_init"}, - {ERR_PACK(ERR_LIB_EC, EC_F_PKEY_SM2_KEYGEN, 0), "pkey_sm2_keygen"}, - {ERR_PACK(ERR_LIB_EC, EC_F_PKEY_SM2_PARAMGEN, 0), "pkey_sm2_paramgen"}, - {ERR_PACK(ERR_LIB_EC, EC_F_PKEY_SM2_SIGN, 0), "pkey_sm2_sign"}, {ERR_PACK(ERR_LIB_EC, EC_F_VALIDATE_ECX_DERIVE, 0), "validate_ecx_derive"}, {0, NULL} }; diff --git a/crypto/include/internal/sm2err.h b/crypto/include/internal/sm2err.h index f32d26c04b..9a7e2b6275 100644 --- a/crypto/include/internal/sm2err.h +++ b/crypto/include/internal/sm2err.h @@ -15,6 +15,9 @@ # ifndef OPENSSL_NO_SM2 +# ifdef __cplusplus +extern "C" +# endif int ERR_load_SM2_strings(void); /* diff --git a/include/internal/dsoerr.h b/include/internal/dsoerr.h index ac6bdcd038..a54a18545e 100644 --- a/include/internal/dsoerr.h +++ b/include/internal/dsoerr.h @@ -15,6 +15,9 @@ # ifndef OPENSSL_NO_DSO +# ifdef __cplusplus +extern "C" +# endif int ERR_load_DSO_strings(void); /* diff --git a/include/openssl/ecerr.h b/include/openssl/ecerr.h index 8db7967697..6ed80ca5e6 100644 --- a/include/openssl/ecerr.h +++ b/include/openssl/ecerr.h @@ -183,12 +183,6 @@ int ERR_load_EC_strings(void); # define EC_F_PKEY_EC_KEYGEN 199 # define EC_F_PKEY_EC_PARAMGEN 219 # define EC_F_PKEY_EC_SIGN 218 -# define EC_F_PKEY_SM2_CTRL 284 -# define EC_F_PKEY_SM2_CTRL_STR 285 -# define EC_F_PKEY_SM2_INIT 287 -# define EC_F_PKEY_SM2_KEYGEN 288 -# define EC_F_PKEY_SM2_PARAMGEN 289 -# define EC_F_PKEY_SM2_SIGN 290 # define EC_F_VALIDATE_ECX_DERIVE 278 /* -- 2.25.1