Home | History | Annotate | Download | only in cipher
      1 include_directories(../../include)
      2 
      3 if (${ARCH} STREQUAL "x86_64")
      4   set(
      5     CIPHER_ARCH_SOURCES
      6 
      7     chacha20_poly1305_x86_64.${ASM_EXT}
      8   )
      9 endif()
     10 
     11 add_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 
     34 add_executable(
     35   cipher_test
     36 
     37   cipher_test.cc
     38   $<TARGET_OBJECTS:test_support>
     39 )
     40 
     41 add_executable(
     42   aead_test
     43 
     44   aead_test.cc
     45   $<TARGET_OBJECTS:test_support>
     46 )
     47 
     48 perlasm(chacha20_poly1305_x86_64.${ASM_EXT} asm/chacha20_poly1305_x86_64.pl)
     49 
     50 target_link_libraries(cipher_test crypto)
     51 target_link_libraries(aead_test crypto)
     52 add_dependencies(all_tests cipher_test aead_test)
     53