summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCrypt
AgeCommit message (Collapse)Author
2022-12-20AK: Stop using `DeprecatedString` in Base64 encodingJelle Raaijmakers
2022-12-06AK+Everywhere: Rename String to DeprecatedStringLinus Groh
We have a new, improved string type coming up in AK (OOM aware, no null state), and while it's going to use UTF-8, the name UTF8String is a mouthful - so let's free up the String name by renaming the existing class. Making the old one have an annoying name will hopefully also help with quick adoption :^)
2022-11-24LibCrypt: Clean up `crypt_r`Jelle Raaijmakers
Remove an unused constant, use a C++-style `reinterpret_cast` and employ an early return to remove excessive indentation. No functional changes.
2022-11-01Everywhere: Mark dependencies of most targets as PRIVATETim Schumacher
Otherwise, we end up propagating those dependencies into targets that link against that library, which creates unnecessary link-time dependencies. Also included are changes to readd now missing dependencies to tools that actually need them.
2022-11-01Everywhere: Explicitly link all binaries against the LibC targetTim Schumacher
Even though the toolchain implicitly links against -lc, it does not know where it should get LibC from except for the sysroot. In the case of Clang this causes it to pick up the LibC stub instead, which might be slightly outdated and feature missing symbols. This is currently not an issue that manifests because we pass through the dependency on LibC and other libraries by accident, which causes CMake to link against the LibC target (instead of just the library), and thus points the linker at the build output directory. Since we are looking to fix that in the upcoming commits, let's make sure that everything will still be able to find the proper LibC first.
2022-11-01LibCrypt: Define it as a normal libraryTim Schumacher
LibCrypt has no need for being -nostdlib, especially since we just link in LibC manually anyways.
2022-07-12Everywhere: Explicitly specify the size in StringView constructorssin-ack
This commit moves the length calculations out to be directly on the StringView users. This is an important step towards the goal of removing StringView(char const*), as it moves the responsibility of calculating the size of the string to the user of the StringView (which will prevent naive uses causing OOB access).
2022-04-01Everywhere: Run clang-formatIdan Horowitz
2022-01-08LibCrypt: Link the SHA2 hash implementation into LibCrypt privatelyAndrew Kaster
Previously, we linked LibCrypt against LibCrypto. This creates a circular symbol dependency between LibCore, LibCrypto and LibCrypt. LibCrypto uses Core::DateTime, LibCrypt uses Crypto::SHA2, and LibCore uses crypt in Core::Account. The GNU toolchain massages the DT_NEEDED lines of each library and applications that use each library such that the Loader finds all the symbols as necessary. However, when using the Clang toolchain, the circular library dependency is not as tolerated. We get a symbol not found error in the Loader at runtime, and the app in question crashes. Now, we build the SHA2.cpp implementation file into LibCrypt using an object library and `-fvisibility=hidden -fvisibility-hidden-inlines`. This adds the implementation in a way that only creates STB_LOCAL symbols and should avoid nasty ODR problems in the future. An alternative approach to resolving this dependency would be to move Core::DateTime to AK, or to make Crypto::ASN1::parse_utc_date return a struct tm instead of a Core::DateTime. One of those approaches to remove the LibCore dependency from LibCrypto should probabably be investigated further in the future. The net effect of removing this circular library dependency is that one can now build and run the python3 port with the Clang toolchain :^)
2021-09-01Everywhere: Use my cool new @serenityos.org email addressPeter Elliott
2021-05-15Everywhere: Add a blank line after copyright header where missingLinus Groh
2021-05-01LibC: Move crypt() and crypt_r() to the right header fileGunnar Beutner
According to POSIX.1 these should be in <crypt.h>.
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling