Skip to content

Commit

Permalink
Update rules_iota, fixed compiling errors on kerl. (#22)
Browse files Browse the repository at this point in the history
* Update rules_iota, fixed compiling errors on kerl.

* Update keccak cmake script.
  • Loading branch information
Sam Chen authored Mar 11, 2020
1 parent ec56494 commit 1b56a52
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ target_include_directories(common PUBLIC
"${PROJECT_BINARY_DIR}" # looking for generated sources
#"${PROJECT_BINARY_DIR}/include"
"${CMAKE_INSTALL_PREFIX}/include"
"${CMAKE_INSTALL_PREFIX}/include/keccak"
)

if(NOT YOCTO)
Expand Down
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ bazel_skylib_workspace()

git_repository(
name = "rules_iota",
commit = "49b2674474dedd77d46fddf75330ea7dcd23f0d3",
commit = "2d15c55f12cff0db106f45866312f61314c583cd",
remote = "https://github.com/iotaledger/rules_iota.git",
)

Expand Down
4 changes: 2 additions & 2 deletions cmake/keccak.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ if (NOT __KECCAK_INCLUDED)
PREFIX ${PROJECT_BINARY_DIR}/keccak
DOWNLOAD_DIR ${PROJECT_BINARY_DIR}/download
DOWNLOAD_NAME keccak_87944d97ee18978a.tar.gz
URL https://github.com/XKCP/XKCP/archive/87944d97ee18978aa0ea8486edbb7acb08a8564a.tar.gz
URL_HASH SHA256=e6434f08d14ef46bce79d4c99e120430c843288003fe5d5d20dcbcb182b73c31
URL https://github.com/XKCP/XKCP/archive/a7a105cefc172178c3c9bb7e5f0768e0b226016b.tar.gz
URL_HASH SHA256=245418d6dd84c7eabfa77c93c5b0eff32c405e691048589bb8d6a253d139bfa3
CONFIGURE_COMMAND ""
INSTALL_COMMAND ""
BUILD_COMMAND ""
Expand Down
2 changes: 1 addition & 1 deletion common/crypto/kerl/kerl.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#define SUFFIX 0x01

void kerl_init(Kerl* const ctx) {
uint8_t succ = Keccak_HashInitialize(&ctx->keccak, 832, 768, 384, 0x01) == SUCCESS;
uint8_t succ = Keccak_HashInitialize(&ctx->keccak, 832, 768, 384, 0x01) == KECCAK_SUCCESS;
assert(succ);
(void)succ;
}
Expand Down
4 changes: 0 additions & 4 deletions common/crypto/kerl/kerl.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@
#ifndef __COMMON_CRYPTO_KERL_KERL_H__
#define __COMMON_CRYPTO_KERL_KERL_H__

#ifdef __XTENSA__
#include "FIPS202/KeccakHash.h"
#else
#include <keccak/KeccakHash.h>
#endif

#include "common/stdint.h"
#include "common/trinary/trits.h"
Expand Down

0 comments on commit 1b56a52

Please sign in to comment.