Skip to content

Commit

Permalink
FIX: order of structure initialization
Browse files Browse the repository at this point in the history
Starting with TSS 4.1.0 there's support for SM4 in the crypto backend.
This is currently not tested in CI (as the version on Ubuntu 22.04 is
older). Though, the order of initialization is important.
  • Loading branch information
reneme committed Dec 11, 2024
1 parent 6301a69 commit 224b820
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -877,12 +877,12 @@ void set_crypto_callbacks(ESYS_CONTEXT* ctx, void* callback_state) {
.get_ecdh_point = &get_ecdh_point,
.aes_encrypt = &aes_encrypt,
.aes_decrypt = &aes_decrypt,
.init = &init,
.userdata = callback_state,
#if defined(BOTAN_TSS2_SUPPORTS_SM4_IN_CRYPTO_CALLBACKS)
.sm4_encrypt = &sm4_encrypt,
.sm4_decrypt = &sm4_decrypt,
#endif
.init = &init,
.userdata = callback_state,
};
// clang-format on

Expand Down

0 comments on commit 224b820

Please sign in to comment.