mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02:00
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.
36 lines
838 B
CMake
36 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)
|