Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditional Error Code Review #150

Open
dccutrig opened this issue Apr 6, 2023 · 0 comments
Open

Conditional Error Code Review #150

dccutrig opened this issue Apr 6, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@dccutrig
Copy link
Contributor

dccutrig commented Apr 6, 2023

Wish to improve logic in scenarios such as follows in updated version of crypto_tm.c:

                if((*(sa_ptr->acs) == CRYPTO_MAC_CMAC_AES256 || *(sa_ptr->acs) == CRYPTO_MAC_HMAC_SHA256 || *(sa_ptr->acs) == CRYPTO_MAC_HMAC_SHA512) &&
                    sa_ptr->iv_len > 0 )
                    {
                        return CRYPTO_LIB_ERR_IV_NOT_SUPPORTED_FOR_ACS_ALGO;
                    }

The intent of above is to make sure that IV cannot be set in ACS only algorithms, however this check would fail if a new ACS was added functionally and not updated here. This might need re-written (and check for similar cases) to reduce future code maintenance.

Issue to be analyzed further after TM integration.

@dccutrig dccutrig added the bug Something isn't working label Apr 6, 2023
@dccutrig dccutrig self-assigned this Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

1 participant