Add crypt.h, base64.h, time.h#6
Conversation
|
Assertion failing for macos build. Need to add libssl |
|
Hey, thanks for the PR! Great to see contributions to the runtime. Here's a review with some things that need to be addressed before merging: OpenSSL linkage is missing - crypto.h includes <openssl/sha.h> and <openssl/md5.h>, but neither the Makefile nor CI install or link against OpenSSL. This breaks the build on all platforms. Makefile: -lssl -lcrypto (and on macOS likely -I/opt/homebrew/opt/openssl/include -L/opt/homebrew/opt/openssl/lib) And change other CI accordingly. Other thing is deprecated OpenSSL API - SHA256_Init/Update/Final and MD5_Init/Update/Final are deprecated since OpenSSL 3.0. Should use EVP_DigestInit_ex / EVP_DigestUpdate / EVP_DigestFinal_ex with EVP_sha256() / EVP_md5(). The old API emits compiler warnings and may be removed in future OpenSSL versions. The final thing is design approach on openssl dependency. Including crypto.h from lavina.h means every Lavina program now requires OpenSSL to compile, even if it doesn't use crypto at all. This is a heavy dependency to impose on all users. Crypto should be opt-in (separate import / conditional include). |
tions, and added inline keyword to improve performance.
…fic defines for random number generation in core.h
No description provided.