Skip to content

Commit

Permalink
Merge pull request #1684 from maximluo/dev-sm2
Browse files Browse the repository at this point in the history
move ENABLE_SM2_ENC_PRE_COMPUTE to CMakeLists as an option
  • Loading branch information
guanzhi authored May 29, 2024
2 parents 5d7d5cb + 475cb77 commit e9e2d27
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ option(ENABLE_ASM_UNDERSCORE_PREFIX "Add prefix `_` to assembly symbols" ON)

option(ENABLE_TLS_DEBUG "Enable TLS and TLCP print debug message" OFF)


option (ENABLE_SM2_ENC_PRE_COMPUTE "Enable SM2 encryption precomputing" ON)

set(src
src/version.c
Expand Down
1 change: 0 additions & 1 deletion src/sdf/sdf_sm2_enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,6 @@ int sm2_encrypt_init(SM2_ENC_CTX *ctx)
return -1;
}

#define ENABLE_SM2_ENC_PRE_COMPUTE 1
#if ENABLE_SM2_ENC_PRE_COMPUTE
if (sm2_encrypt_pre_compute(ctx->pre_comp) != 1) {
error_print();
Expand Down
1 change: 0 additions & 1 deletion src/sm2_enc.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,6 @@ int sm2_encrypt_init(SM2_ENC_CTX *ctx)
return -1;
}

#define ENABLE_SM2_ENC_PRE_COMPUTE 1
#if ENABLE_SM2_ENC_PRE_COMPUTE
if (sm2_encrypt_pre_compute(ctx->pre_comp) != 1) {
error_print();
Expand Down

0 comments on commit e9e2d27

Please sign in to comment.