Rename MBEDTLS_CIPHER_ENCRYPT_ONLY as MBEDTLS_BLOCK_CIPHER_NO_DECRYPT
Signed-off-by: Yanray Wang <yanray.wang@arm.com>
This commit is contained in:
parent
4b6595aa83
commit
b67b47425e
21 changed files with 132 additions and 132 deletions
|
@ -238,7 +238,7 @@ static int aes_crypt_xts_wrap(void *ctx, mbedtls_operation_t operation,
|
|||
}
|
||||
#endif /* MBEDTLS_CIPHER_MODE_XTS */
|
||||
|
||||
#if !defined(MBEDTLS_CIPHER_ENCRYPT_ONLY)
|
||||
#if !defined(MBEDTLS_BLOCK_CIPHER_NO_DECRYPT)
|
||||
static int aes_setkey_dec_wrap(void *ctx, const unsigned char *key,
|
||||
unsigned int key_bitlen)
|
||||
{
|
||||
|
@ -293,7 +293,7 @@ static const mbedtls_cipher_base_t aes_info = {
|
|||
NULL,
|
||||
#endif
|
||||
aes_setkey_enc_wrap,
|
||||
#if !defined(MBEDTLS_CIPHER_ENCRYPT_ONLY)
|
||||
#if !defined(MBEDTLS_BLOCK_CIPHER_NO_DECRYPT)
|
||||
aes_setkey_dec_wrap,
|
||||
#endif
|
||||
aes_ctx_alloc,
|
||||
|
@ -603,7 +603,7 @@ static const mbedtls_cipher_base_t gcm_aes_info = {
|
|||
NULL,
|
||||
#endif
|
||||
gcm_aes_setkey_wrap,
|
||||
#if !defined(MBEDTLS_CIPHER_ENCRYPT_ONLY)
|
||||
#if !defined(MBEDTLS_BLOCK_CIPHER_NO_DECRYPT)
|
||||
gcm_aes_setkey_wrap,
|
||||
#endif
|
||||
gcm_ctx_alloc,
|
||||
|
@ -676,7 +676,7 @@ static const mbedtls_cipher_base_t ccm_aes_info = {
|
|||
NULL,
|
||||
#endif
|
||||
ccm_aes_setkey_wrap,
|
||||
#if !defined(MBEDTLS_CIPHER_ENCRYPT_ONLY)
|
||||
#if !defined(MBEDTLS_BLOCK_CIPHER_NO_DECRYPT)
|
||||
ccm_aes_setkey_wrap,
|
||||
#endif
|
||||
ccm_ctx_alloc,
|
||||
|
@ -795,7 +795,7 @@ static int camellia_crypt_ctr_wrap(void *ctx, size_t length, size_t *nc_off,
|
|||
}
|
||||
#endif /* MBEDTLS_CIPHER_MODE_CTR */
|
||||
|
||||
#if !defined(MBEDTLS_CIPHER_ENCRYPT_ONLY)
|
||||
#if !defined(MBEDTLS_BLOCK_CIPHER_NO_DECRYPT)
|
||||
static int camellia_setkey_dec_wrap(void *ctx, const unsigned char *key,
|
||||
unsigned int key_bitlen)
|
||||
{
|
||||
|
@ -851,7 +851,7 @@ static const mbedtls_cipher_base_t camellia_info = {
|
|||
NULL,
|
||||
#endif
|
||||
camellia_setkey_enc_wrap,
|
||||
#if !defined(MBEDTLS_CIPHER_ENCRYPT_ONLY)
|
||||
#if !defined(MBEDTLS_BLOCK_CIPHER_NO_DECRYPT)
|
||||
camellia_setkey_dec_wrap,
|
||||
#endif
|
||||
camellia_ctx_alloc,
|
||||
|
@ -1026,7 +1026,7 @@ static const mbedtls_cipher_base_t gcm_camellia_info = {
|
|||
NULL,
|
||||
#endif
|
||||
gcm_camellia_setkey_wrap,
|
||||
#if !defined(MBEDTLS_CIPHER_ENCRYPT_ONLY)
|
||||
#if !defined(MBEDTLS_BLOCK_CIPHER_NO_DECRYPT)
|
||||
gcm_camellia_setkey_wrap,
|
||||
#endif
|
||||
gcm_ctx_alloc,
|
||||
|
@ -1097,7 +1097,7 @@ static const mbedtls_cipher_base_t ccm_camellia_info = {
|
|||
NULL,
|
||||
#endif
|
||||
ccm_camellia_setkey_wrap,
|
||||
#if !defined(MBEDTLS_CIPHER_ENCRYPT_ONLY)
|
||||
#if !defined(MBEDTLS_BLOCK_CIPHER_NO_DECRYPT)
|
||||
ccm_camellia_setkey_wrap,
|
||||
#endif
|
||||
ccm_ctx_alloc,
|
||||
|
@ -1213,7 +1213,7 @@ static int aria_crypt_ctr_wrap(void *ctx, size_t length, size_t *nc_off,
|
|||
}
|
||||
#endif /* MBEDTLS_CIPHER_MODE_CTR */
|
||||
|
||||
#if !defined(MBEDTLS_CIPHER_ENCRYPT_ONLY)
|
||||
#if !defined(MBEDTLS_BLOCK_CIPHER_NO_DECRYPT)
|
||||
static int aria_setkey_dec_wrap(void *ctx, const unsigned char *key,
|
||||
unsigned int key_bitlen)
|
||||
{
|
||||
|
@ -1269,7 +1269,7 @@ static const mbedtls_cipher_base_t aria_info = {
|
|||
NULL,
|
||||
#endif
|
||||
aria_setkey_enc_wrap,
|
||||
#if !defined(MBEDTLS_CIPHER_ENCRYPT_ONLY)
|
||||
#if !defined(MBEDTLS_BLOCK_CIPHER_NO_DECRYPT)
|
||||
aria_setkey_dec_wrap,
|
||||
#endif
|
||||
aria_ctx_alloc,
|
||||
|
@ -1444,7 +1444,7 @@ static const mbedtls_cipher_base_t gcm_aria_info = {
|
|||
NULL,
|
||||
#endif
|
||||
gcm_aria_setkey_wrap,
|
||||
#if !defined(MBEDTLS_CIPHER_ENCRYPT_ONLY)
|
||||
#if !defined(MBEDTLS_BLOCK_CIPHER_NO_DECRYPT)
|
||||
gcm_aria_setkey_wrap,
|
||||
#endif
|
||||
gcm_ctx_alloc,
|
||||
|
@ -1515,7 +1515,7 @@ static const mbedtls_cipher_base_t ccm_aria_info = {
|
|||
NULL,
|
||||
#endif
|
||||
ccm_aria_setkey_wrap,
|
||||
#if !defined(MBEDTLS_CIPHER_ENCRYPT_ONLY)
|
||||
#if !defined(MBEDTLS_BLOCK_CIPHER_NO_DECRYPT)
|
||||
ccm_aria_setkey_wrap,
|
||||
#endif
|
||||
ccm_ctx_alloc,
|
||||
|
@ -1625,7 +1625,7 @@ static int des3_crypt_cbc_wrap(void *ctx, mbedtls_operation_t operation, size_t
|
|||
}
|
||||
#endif /* MBEDTLS_CIPHER_MODE_CBC */
|
||||
|
||||
#if !defined(MBEDTLS_CIPHER_ENCRYPT_ONLY)
|
||||
#if !defined(MBEDTLS_BLOCK_CIPHER_NO_DECRYPT)
|
||||
static int des_setkey_dec_wrap(void *ctx, const unsigned char *key,
|
||||
unsigned int key_bitlen)
|
||||
{
|
||||
|
@ -1643,7 +1643,7 @@ static int des_setkey_enc_wrap(void *ctx, const unsigned char *key,
|
|||
return mbedtls_des_setkey_enc((mbedtls_des_context *) ctx, key);
|
||||
}
|
||||
|
||||
#if !defined(MBEDTLS_CIPHER_ENCRYPT_ONLY)
|
||||
#if !defined(MBEDTLS_BLOCK_CIPHER_NO_DECRYPT)
|
||||
static int des3_set2key_dec_wrap(void *ctx, const unsigned char *key,
|
||||
unsigned int key_bitlen)
|
||||
{
|
||||
|
@ -1661,7 +1661,7 @@ static int des3_set2key_enc_wrap(void *ctx, const unsigned char *key,
|
|||
return mbedtls_des3_set2key_enc((mbedtls_des3_context *) ctx, key);
|
||||
}
|
||||
|
||||
#if !defined(MBEDTLS_CIPHER_ENCRYPT_ONLY)
|
||||
#if !defined(MBEDTLS_BLOCK_CIPHER_NO_DECRYPT)
|
||||
static int des3_set3key_dec_wrap(void *ctx, const unsigned char *key,
|
||||
unsigned int key_bitlen)
|
||||
{
|
||||
|
@ -1740,7 +1740,7 @@ static const mbedtls_cipher_base_t des_info = {
|
|||
NULL,
|
||||
#endif
|
||||
des_setkey_enc_wrap,
|
||||
#if !defined(MBEDTLS_CIPHER_ENCRYPT_ONLY)
|
||||
#if !defined(MBEDTLS_BLOCK_CIPHER_NO_DECRYPT)
|
||||
des_setkey_dec_wrap,
|
||||
#endif
|
||||
des_ctx_alloc,
|
||||
|
@ -1793,7 +1793,7 @@ static const mbedtls_cipher_base_t des_ede_info = {
|
|||
NULL,
|
||||
#endif
|
||||
des3_set2key_enc_wrap,
|
||||
#if !defined(MBEDTLS_CIPHER_ENCRYPT_ONLY)
|
||||
#if !defined(MBEDTLS_BLOCK_CIPHER_NO_DECRYPT)
|
||||
des3_set2key_dec_wrap,
|
||||
#endif
|
||||
des3_ctx_alloc,
|
||||
|
@ -1846,7 +1846,7 @@ static const mbedtls_cipher_base_t des_ede3_info = {
|
|||
NULL,
|
||||
#endif
|
||||
des3_set3key_enc_wrap,
|
||||
#if !defined(MBEDTLS_CIPHER_ENCRYPT_ONLY)
|
||||
#if !defined(MBEDTLS_BLOCK_CIPHER_NO_DECRYPT)
|
||||
des3_set3key_dec_wrap,
|
||||
#endif
|
||||
des3_ctx_alloc,
|
||||
|
@ -1949,7 +1949,7 @@ static const mbedtls_cipher_base_t chacha20_base_info = {
|
|||
chacha20_stream_wrap,
|
||||
#endif
|
||||
chacha20_setkey_wrap,
|
||||
#if !defined(MBEDTLS_CIPHER_ENCRYPT_ONLY)
|
||||
#if !defined(MBEDTLS_BLOCK_CIPHER_NO_DECRYPT)
|
||||
chacha20_setkey_wrap,
|
||||
#endif
|
||||
chacha20_ctx_alloc,
|
||||
|
@ -2026,7 +2026,7 @@ static const mbedtls_cipher_base_t chachapoly_base_info = {
|
|||
NULL,
|
||||
#endif
|
||||
chachapoly_setkey_wrap,
|
||||
#if !defined(MBEDTLS_CIPHER_ENCRYPT_ONLY)
|
||||
#if !defined(MBEDTLS_BLOCK_CIPHER_NO_DECRYPT)
|
||||
chachapoly_setkey_wrap,
|
||||
#endif
|
||||
chachapoly_ctx_alloc,
|
||||
|
@ -2096,7 +2096,7 @@ static const mbedtls_cipher_base_t null_base_info = {
|
|||
null_crypt_stream,
|
||||
#endif
|
||||
null_setkey,
|
||||
#if !defined(MBEDTLS_CIPHER_ENCRYPT_ONLY)
|
||||
#if !defined(MBEDTLS_BLOCK_CIPHER_NO_DECRYPT)
|
||||
null_setkey,
|
||||
#endif
|
||||
null_ctx_alloc,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue