Skip to content

Commit 84635fa

Browse files
committed
Extract grasshopper implementation into a separate independent module
1 parent 71204aa commit 84635fa

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

CMakeLists.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ set(GOST_TLS12_ADDITIONAL_SOURCE_FILES
144144
gost_tls12_additional_tlstree.c
145145
)
146146

147-
set(GOST_GRASSHOPPER_SOURCE_FILES
147+
set(GOST_GRASSHOPPER_CORE_SOURCE_FILES
148148
gost_grasshopper.h
149149
gost_grasshopper_core.h
150150
gost_grasshopper_core.c
@@ -153,8 +153,6 @@ set(GOST_GRASSHOPPER_SOURCE_FILES
153153
gost_grasshopper_math.h
154154
gost_grasshopper_galois_precompiled.c
155155
gost_grasshopper_precompiled.c
156-
gost_grasshopper_cipher.h
157-
gost_grasshopper_cipher.c
158156
)
159157

160158
set(GOST_ERR_SOURCE_FILES
@@ -178,6 +176,7 @@ set(GOST_LEGACY_CORE_SOURCE_FILES
178176
gost_lcl.h
179177
gost_params.c
180178
gost_keyexpimp.c
179+
gost_grasshopper_cipher.c
181180
)
182181

183182
set(GOST_NEW_CORE_DIGEST_SOURCE_FILES
@@ -418,10 +417,13 @@ add_library(gostcmacacpkm STATIC ${GOST_CMAC_ACPKM_SOURCE_FILES})
418417
set_target_properties(gostcmacacpkm PROPERTIES POSITION_INDEPENDENT_CODE ON)
419418
target_link_libraries(gostcmacacpkm PRIVATE OpenSSL::Crypto gost_err)
420419

420+
add_library(gostgrasshopper STATIC ${GOST_GRASSHOPPER_CORE_SOURCE_FILES})
421+
set_target_properties(gostgrasshopper PROPERTIES POSITION_INDEPENDENT_CODE ON)
422+
421423
add_library(gost_core STATIC ${GOST_LIB_SOURCE_FILES})
422424
set_target_properties(gost_core PROPERTIES POSITION_INDEPENDENT_CODE ON)
423425
target_link_libraries(gost_core PRIVATE OpenSSL::Crypto gost89 gosthash gosthash2012
424-
gosttls12additional gostcmacacpkm)
426+
gosttls12additional gostcmacacpkm gostgrasshopper)
425427

426428
add_library(gost_err STATIC ${GOST_ERR_SOURCE_FILES})
427429
set_target_properties(gost_err PROPERTIES POSITION_INDEPENDENT_CODE ON)

gost_grasshopper.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ extern "C" {
1212

1313
#include "gost_grasshopper_defines.h"
1414
#include "gost_grasshopper_math.h"
15-
#include "gost_grasshopper_cipher.h"
1615
#include "gost_grasshopper_precompiled.h"
1716
#include "gost_grasshopper_core.h"
1817

0 commit comments

Comments
 (0)