mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
ca8fcc823c
SHA256 was chosen because it is reasonably standard, the file names don't explode in length (this rules out SHA512) and it is supported by basically all versions of OpenSSL (this rules out SHA512/256 and SHA3). The protocol is changed in a backward compatible way: The supporting server sends the SHA256 corresponding to the map in the `MAP_DETAILS` message prior to sending the `MAP_CHANGE` message. The client saves the SHA256 obtained from the `MAP_DETAILS` message until the next `MAP_CHANGE` message. For servers not supporting this protocol, the client falls back to simply opening maps like in the previous scheme. Remove the `map_version` tool, it is not being used and would have been a little bit effort to update. Use the OpenSSL implementation of SHA256 if it is supported, otherwise fall back to a public domain one. Fix #1127.
20 lines
538 B
CMake
20 lines
538 B
CMake
if(NOT PREFER_BUNDLED_LIBS)
|
|
find_package(OpenSSL)
|
|
if(OPENSSL_FOUND)
|
|
set(CRYPTO_FOUND ON)
|
|
set(CRYPTO_BUNDLED OFF)
|
|
set(CRYPTO_LIBRARY ${OPENSSL_CRYPTO_LIBRARY})
|
|
set(CRYPTO_INCLUDEDIR ${OPENSSL_INCLUDE_DIR})
|
|
endif()
|
|
endif()
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
find_package_handle_standard_args(Crypto DEFAULT_MSG CRYPTO_LIBRARY CRYPTO_INCLUDEDIR)
|
|
|
|
mark_as_advanced(CRYPTO_LIBRARY CRYPTO_INCLUDEDIR)
|
|
|
|
if(CRYPTO_FOUND)
|
|
set(CRYPTO_LIBRARIES ${CRYPTO_LIBRARY})
|
|
set(CRYPTO_INCLUDE_DIRS ${CRYPTO_INCLUDEDIR})
|
|
endif()
|