mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-12-23 23:05:38 +00:00
edb7ed3a43
* commit 'd7e2483': (57 commits) Skip signature_algorithms ext if PSK only Fix bug in ssl_client2 reconnect option Cosmetics in ssl_server2 Improve debugging message. Fix net_usleep for durations greater than 1 second Use pk_load_file() in X509 Create ticket keys only if enabled Fix typo in #ifdef Clarify documentation a bit Fix comment on resumption Update comment from draft to RFC Use more #ifdef's on CLI_C and SRV_C in ssl_tls.c Add recursion.pl to all.sh Allow x509_crt_verify_child() in recursion.pl Set a compile-time limit to X.509 chain length Fix 3DES -> DES in all.sh (+ time estimates) Add curves.pl to all.sh Rework all.sh to use MSan instead of valgrind Fix depends on individual curves in tests Add script to test depends on individual curves ... Conflicts: CMakeLists.txt programs/ssl/ssl_client2.c
137 lines
3.3 KiB
CMake
137 lines
3.3 KiB
CMake
option(USE_STATIC_POLARSSL_LIBRARY "Build PolarSSL static library." ON)
|
|
option(USE_SHARED_POLARSSL_LIBRARY "Build PolarSSL shared library." OFF)
|
|
option(LINK_WITH_PTHREAD "Explicitly link PolarSSL library to pthread." OFF)
|
|
|
|
set(src
|
|
aes.c
|
|
aesni.c
|
|
arc4.c
|
|
asn1parse.c
|
|
asn1write.c
|
|
base64.c
|
|
bignum.c
|
|
blowfish.c
|
|
camellia.c
|
|
ccm.c
|
|
certs.c
|
|
cipher.c
|
|
cipher_wrap.c
|
|
ctr_drbg.c
|
|
debug.c
|
|
des.c
|
|
dhm.c
|
|
ecp.c
|
|
ecp_curves.c
|
|
ecdh.c
|
|
ecdsa.c
|
|
entropy.c
|
|
entropy_poll.c
|
|
error.c
|
|
gcm.c
|
|
havege.c
|
|
hmac_drbg.c
|
|
md.c
|
|
md_wrap.c
|
|
md2.c
|
|
md4.c
|
|
md5.c
|
|
memory_buffer_alloc.c
|
|
net.c
|
|
oid.c
|
|
padlock.c
|
|
pbkdf2.c
|
|
pem.c
|
|
pkcs5.c
|
|
pkcs11.c
|
|
pkcs12.c
|
|
pk.c
|
|
pk_wrap.c
|
|
pkparse.c
|
|
pkwrite.c
|
|
platform.c
|
|
ripemd160.c
|
|
rsa.c
|
|
sha1.c
|
|
sha256.c
|
|
sha512.c
|
|
ssl_cache.c
|
|
ssl_cookie.c
|
|
ssl_ciphersuites.c
|
|
ssl_cli.c
|
|
ssl_srv.c
|
|
ssl_tls.c
|
|
threading.c
|
|
timing.c
|
|
version.c
|
|
version_features.c
|
|
x509.c
|
|
x509_crt.c
|
|
x509_crl.c
|
|
x509_csr.c
|
|
x509_create.c
|
|
x509write_crt.c
|
|
x509write_csr.c
|
|
xtea.c
|
|
)
|
|
|
|
if(WIN32)
|
|
set(libs ws2_32)
|
|
endif(WIN32)
|
|
|
|
if(CMAKE_COMPILER_IS_GNUCC)
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-declarations -Wmissing-prototypes")
|
|
endif(CMAKE_COMPILER_IS_GNUCC)
|
|
|
|
if(CMAKE_COMPILER_IS_CLANG)
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wmissing-declarations -Wmissing-prototypes -Wdocumentation -Wno-documentation-deprecated-sync -Wunreachable-code")
|
|
endif(CMAKE_COMPILER_IS_CLANG)
|
|
|
|
if (NOT USE_STATIC_POLARSSL_LIBRARY AND NOT USE_SHARED_POLARSSL_LIBRARY)
|
|
message(FATAL_ERROR "Need to choose static or shared polarssl build!")
|
|
endif(NOT USE_STATIC_POLARSSL_LIBRARY AND NOT USE_SHARED_POLARSSL_LIBRARY)
|
|
|
|
if(USE_STATIC_POLARSSL_LIBRARY AND USE_SHARED_POLARSSL_LIBRARY)
|
|
# if we build both static an shared, then let
|
|
# tests and programs link to the shared lib target
|
|
set(polarssl_static_target "polarssl_static")
|
|
elseif(USE_STATIC_POLARSSL_LIBRARY)
|
|
set(polarssl_static_target "polarssl")
|
|
endif()
|
|
|
|
if(USE_STATIC_POLARSSL_LIBRARY)
|
|
add_library(${polarssl_static_target} STATIC ${src})
|
|
set_target_properties(${polarssl_static_target} PROPERTIES OUTPUT_NAME polarssl)
|
|
target_link_libraries(${polarssl_static_target} ${libs})
|
|
|
|
if(ZLIB_FOUND)
|
|
target_link_libraries(${polarssl_static_target} ${ZLIB_LIBRARIES})
|
|
endif(ZLIB_FOUND)
|
|
|
|
if(LINK_WITH_PTHREAD)
|
|
target_link_libraries(${polarssl_static_target} pthread)
|
|
endif()
|
|
|
|
install(TARGETS ${polarssl_static_target}
|
|
DESTINATION ${LIB_INSTALL_DIR}
|
|
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
|
endif()
|
|
|
|
if(USE_SHARED_POLARSSL_LIBRARY)
|
|
add_library(polarssl SHARED ${src})
|
|
set_target_properties(polarssl PROPERTIES VERSION 1.4.0 SOVERSION 8)
|
|
|
|
target_link_libraries(polarssl ${libs})
|
|
|
|
if(ZLIB_FOUND)
|
|
target_link_libraries(polarssl ${ZLIB_LIBRARIES})
|
|
endif(ZLIB_FOUND)
|
|
|
|
if(LINK_WITH_PTHREAD)
|
|
target_link_libraries(polarssl pthread)
|
|
endif()
|
|
|
|
install(TARGETS polarssl
|
|
DESTINATION ${LIB_INSTALL_DIR}
|
|
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
|
endif(USE_SHARED_POLARSSL_LIBRARY)
|