Skip to content

Fix evp SM cipherType check#6980

Merged
SparkiDev merged 2 commits intowolfSSL:masterfrom
gojimmypi:SM-cipher-type-PR
Nov 19, 2023
Merged

Fix evp SM cipherType check#6980
SparkiDev merged 2 commits intowolfSSL:masterfrom
gojimmypi:SM-cipher-type-PR

Conversation

@gojimmypi
Copy link
Copy Markdown
Contributor

@gojimmypi gojimmypi commented Nov 16, 2023

Description

wolfcrypt evp.c appears to have an incorrect value for SM Ciphers during ctx->cipherType check. The gating WOLFSSL_SM4_GCM is used, whereas I believe they need to be the macros in this PR.

Edit: updates wolfSSL_EVP_CIPHER_CTX_ctrl() for EVP_CTRL_AEAD_SET_TAG and EVP_CTRL_AEAD_GET_TAG conditions when using SM Ciphers with WOLFSSL_SM4_GCM and/or WOLFSSL_SM4_CCM enabled.

Fixes zd# n/a

Testing

How did you test?

Tested only on embedded Espressif device.

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

Copy link
Copy Markdown
Contributor

@SparkiDev SparkiDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CCM with SM4 as well.
Thanks.

@SparkiDev SparkiDev removed their assignment Nov 16, 2023
@gojimmypi
Copy link
Copy Markdown
Contributor Author

I've updated the other section, not previously detected as there was a gating problem (also fixed).

There's also a spelling correction in an ssl.c comment included here.

@SparkiDev SparkiDev merged commit 9ed0018 into wolfSSL:master Nov 19, 2023
@gojimmypi gojimmypi deleted the SM-cipher-type-PR branch November 20, 2023 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants