Changeset 110


Ignore:
Timestamp:
06/15/09 13:17:14 (14 years ago)
Author:
smurzch2
Message:

Use our own AES functions if we don't detect them.

Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/CMakeLists.txt

    r109 r110  
    8383#----------------------- subdirectories ------------------------------
    8484
     85include (CheckIncludeFile)
     86check_include_file ("openssl/aes.h" HAVE_AES)
     87if (HAVE_AES)
     88    set (HAVE_AES 1)
     89    add_definitions ("-DHAVE_AES")
     90else (HAVE_AES)
     91    set (HAVE_AES 0)
     92endif (HAVE_AES)
     93
     94#----------------------- subdirectories ------------------------------
     95
    8596add_subdirectory (csctapi)
    8697add_subdirectory (cscrypt)
     
    117128set (exe_name "oscam")
    118129add_executable (${exe_name} ${exe_srcs} ${exe_hdrs})
    119 target_link_libraries (${exe_name} crypto pthread ${csoscam} ${csmodules} ${csreaders} csctapi cscrypt)
     130if (HAVE_AES)
     131    target_link_libraries (${exe_name} crypto)
     132endif (HAVE_AES)
     133target_link_libraries (${exe_name} pthread ${csoscam} ${csmodules} ${csreaders} csctapi cscrypt)
    120134add_dependencies (${exe_name} ${csoscam} ${csreaders} ${csmodules})
    121135
     
    149163message (STATUS "  cpu: ${CS_OS_CPU}")
    150164message (STATUS "  hw: ${CS_OS_HW}")
     165if (HAVE_AES)
     166    message (STATUS "  use system aes functions")
     167else (HAVE_AES)
     168    message (STATUS "  use built-in aes functions")
     169endif (HAVE_AES)
    151170message (STATUS "")
  • trunk/cscrypt/CMakeLists.txt

    r102 r110  
    44file (GLOB cscrypt_hdrs "*.h")
    55
     6if (NOT HAVE_AES)
     7    file (GLOB aes_srcs "aes/*.c")
     8    file (GLOB aes_hdrs "aes/*.h")
     9endif (NOT HAVE_AES)
     10
    611set (lib_name "cscrypt")
    712
    8 add_library (${lib_name} STATIC ${cscrypt_srcs} ${cscrypt_hdrs})
     13add_library (${lib_name} STATIC ${cscrypt_srcs} ${aes_srcs} ${cscrypt_hdrs} ${aes_hdrs})
    914
  • trunk/cscrypt/cscrypt.h

    r10 r110  
     1#ifdef HAVE_AES
    12#include <openssl/aes.h>
     3#else
     4#include "aes/aes.h"
     5#endif
     6
    27#include "des.h"
    38#include "bn.h"
Note: See TracChangeset for help on using the changeset viewer.