Skip to content

Commit

Permalink
core/crypto/crypto.c: fix compile errors when _CFG_CRYPTO_WITH_CIPHER=n
Browse files Browse the repository at this point in the history
Although _CFG_CRYPTO_WITH_CIPHER=n does not seem to be a valid
configuration (both the REE and RPMB FS use AES and at least one has to
be enabled currently), fix build errors triggered by:

  make _CFG_CRYPTO_WITH_CIPHER=n \
       out/arm-plat-vexpress/core/crypto/crypto.o

Signed-off-by: Jerome Forissier <[email protected]>
Reviewed-by: Jens Wiklander <[email protected]>
  • Loading branch information
jforissier committed Nov 27, 2017
1 parent 947cfee commit 1c5fdd1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions core/crypto/crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@ TEE_Result crypto_hash_final(void *ctx __unused, uint32_t algo __unused,
#endif /*_CFG_CRYPTO_WITH_HASH*/

#if !defined(_CFG_CRYPTO_WITH_CIPHER)
TEE_Result crypto_cipher_get_ctx_size(uint32_t algo, size_t *size)
TEE_Result crypto_cipher_get_ctx_size(uint32_t algo __unused,
size_t *size __unused)
{
return TEE_ERROR_NOT_IMPLEMENTED
return TEE_ERROR_NOT_IMPLEMENTED;
}

TEE_Result crypto_cipher_init(void *ctx __unused, uint32_t algo __unused,
Expand All @@ -49,7 +50,7 @@ TEE_Result crypto_cipher_init(void *ctx __unused, uint32_t algo __unused,
const uint8_t *iv __unused,
size_t iv_len __unused)
{
return TEE_ERROR_NOT_IMPLEMENTED
return TEE_ERROR_NOT_IMPLEMENTED;
}

TEE_Result crypto_cipher_update(void *ctx __unused, uint32_t algo __unused,
Expand All @@ -58,7 +59,7 @@ TEE_Result crypto_cipher_update(void *ctx __unused, uint32_t algo __unused,
const uint8_t *data __unused,
size_t len __unused, uint8_t *dst __unused)
{
return TEE_ERROR_NOT_IMPLEMENTED
return TEE_ERROR_NOT_IMPLEMENTED;
}

void crypto_cipher_final(void *ctx __unused, uint32_t algo __unused)
Expand All @@ -68,7 +69,7 @@ void crypto_cipher_final(void *ctx __unused, uint32_t algo __unused)
TEE_Result crypto_cipher_get_block_size(uint32_t algo __unused,
size_t *size __unused)
{
return TEE_ERROR_NOT_IMPLEMENTED
return TEE_ERROR_NOT_IMPLEMENTED;
}
#endif /*_CFG_CRYPTO_WITH_CIPHER*/

Expand Down

0 comments on commit 1c5fdd1

Please sign in to comment.