1
0
mirror of https://github.com/CPunch/Laika.git synced 2025-11-17 01:30:08 +00:00

Refactored how CMake passes version & settings info

- keys can now be passed per-build passing -DLAIKA_PUBKEY=[pubkey] & -LAIKA_PRIVKEY=[pubkey] to `cmake -B`
- if those definitions aren't passed, the default public & private key will be used (for quick testing)
This commit is contained in:
2022-01-30 01:15:51 -06:00
parent 7481431551
commit 6fb8aa9b8a
8 changed files with 72 additions and 23 deletions

View File

@@ -63,6 +63,7 @@ struct sLaika_cnc *laikaC_newCNC(uint16_t port) {
LAIKA_ERROR("LibSodium failed to initialize!\n");
}
LAIKA_DEBUG(LAIKA_PUBKEY);
if (sodium_hex2bin(cnc->pub, crypto_box_PUBLICKEYBYTES, LAIKA_PUBKEY, strlen(LAIKA_PUBKEY), NULL, &_unused, NULL) != 0) {
laikaC_freeCNC(cnc);
LAIKA_ERROR("Failed to init cnc public key!\n");