• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1include_directories(../../include)
2
3if (${ARCH} STREQUAL "x86_64")
4  set(
5    CIPHER_ARCH_SOURCES
6
7    chacha20_poly1305_x86_64.${ASM_EXT}
8  )
9endif()
10
11add_library(
12  cipher
13
14  OBJECT
15
16  cipher.c
17  derive_key.c
18  aead.c
19
20  e_null.c
21  e_rc2.c
22  e_rc4.c
23  e_des.c
24  e_aes.c
25  e_chacha20poly1305.c
26
27  tls_cbc.c
28  e_tls.c
29  e_ssl3.c
30
31  ${CIPHER_ARCH_SOURCES}
32)
33
34add_executable(
35  cipher_test
36
37  cipher_test.cc
38  $<TARGET_OBJECTS:test_support>
39)
40
41add_executable(
42  aead_test
43
44  aead_test.cc
45  $<TARGET_OBJECTS:test_support>
46)
47
48perlasm(chacha20_poly1305_x86_64.${ASM_EXT} asm/chacha20_poly1305_x86_64.pl)
49
50target_link_libraries(cipher_test crypto)
51target_link_libraries(aead_test crypto)
52add_dependencies(all_tests cipher_test aead_test)
53