1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-08 05:27:14 +09:00
ladybird/Libraries/LibCrypto/CMakeLists.txt
devgianlu 4b3715ccba LibCrypto: Replace {Unsigned,Signed}BigInteger impl with LibTomMath
Replace the implementation of maths in `UnsignedBigInteger`
and `SignedBigInteger` with LibTomMath. This gives benefits in terms of
less code to maintain, correctness and speed.

These changes also remove now-unsued methods and improve the error
propagation for functions allocating lots of memory. Additionally, the
new implementation is always trimmed and won't have dangling zeros when
exporting it.
2025-05-23 11:57:21 +02:00

35 lines
838 B
CMake

add_cxx_compile_options(-Wvla)
set(SOURCES
OpenSSL.cpp
ASN1/ASN1.cpp
ASN1/DER.cpp
ASN1/PEM.cpp
Authentication/HMAC.cpp
BigFraction/BigFraction.cpp
BigInt/SignedBigInteger.cpp
BigInt/UnsignedBigInteger.cpp
Certificate/Certificate.cpp
Cipher/AES.cpp
Curves/EdwardsCurve.cpp
Curves/SECPxxxr1.cpp
Hash/BLAKE2b.cpp
Hash/HKDF.cpp
Hash/MD5.cpp
Hash/PBKDF2.cpp
Hash/SHA1.cpp
Hash/SHA2.cpp
PK/RSA.cpp
PK/EC.cpp
SecureRandom.cpp
)
serenity_lib(LibCrypto crypto)
target_link_libraries(LibCrypto PRIVATE LibCore)
find_package(PkgConfig REQUIRED)
pkg_check_modules(libtommath REQUIRED IMPORTED_TARGET libtommath)
target_link_libraries(LibCrypto PRIVATE PkgConfig::libtommath)
find_package(OpenSSL REQUIRED)
target_link_libraries(LibCrypto PUBLIC OpenSSL::Crypto)