@@ -792,60 +792,60 @@ static void wp_des3_block_init_ctx(wp_Des3BlockCtx* ctx, size_t kBits,
792792}
793793
794794/** Implement the get params API for a block cipher. */
795- #define IMPLEMENT_DES3_BLOCK_GET_PARAMS (lcmode , UCMODE , kBits , ivBits ) \
795+ #define IMPLEMENT_DES3_BLOCK_GET_PARAMS (lcmode , UCMODE , kBits , ivBits ) \
796796/** \
797- * Get the values from the DES3 block context for the parameters. \
797+ * Get the values from the DES3 block context for the parameters. \
798798 * \
799799 * @param [in, out] params Array of parameters to retrieve. \
800800 * @return 1 on success. \
801801 * @return 0 on failure. \
802802 */ \
803803static int wp_des3_##lcmode##_get_params(OSSL_PARAM params[]) \
804804{ \
805- return wp_des3_block_get_params(params, EVP_CIPH_##UCMODE##_MODE, kBits, \
805+ return wp_des3_block_get_params(params, EVP_CIPH_##UCMODE##_MODE, kBits, \
806806 ivBits); \
807807}
808808
809809/** Implement the new context API for a block cipher. */
810- #define IMPLEMENT_DES3_BLOCK_NEWCTX (lcmode , UCMODE , kBits , ivBits ) \
810+ #define IMPLEMENT_DES3_BLOCK_NEWCTX (lcmode , UCMODE , kBits , ivBits ) \
811811/** \
812812 * Create a new block cipher context object. \
813813 * \
814814 * @param [in] provCtx Provider context object. \
815815 * @return NULL on failure. \
816816 * @return AEAD context object on success. \
817817 */ \
818- static wp_Des3BlockCtx* wp_des3_block_##lcmode##_newctx( \
818+ static wp_Des3BlockCtx* wp_des3_block_##lcmode##_newctx( \
819819 WOLFPROV_CTX *provCtx) \
820820{ \
821- wp_Des3BlockCtx *ctx = NULL; \
821+ wp_Des3BlockCtx *ctx = NULL; \
822822 (void)provCtx; \
823823 if (wolfssl_prov_is_running()) { \
824824 ctx = OPENSSL_zalloc(sizeof(*ctx)); \
825825 } \
826826 if (ctx != NULL) { \
827- wp_des3_block_init_ctx(ctx, kBits, ivBits, EVP_CIPH_##UCMODE##_MODE); \
827+ wp_des3_block_init_ctx(ctx, kBits, ivBits, EVP_CIPH_##UCMODE##_MODE); \
828828 } \
829829 return ctx; \
830830}
831831
832832/** Implement the dispatch table for a block cipher. */
833- #define IMPLEMENT_DES3_BLOCK_DISPATCH (mode , kBits , ivBits ) \
833+ #define IMPLEMENT_DES3_BLOCK_DISPATCH (mode , kBits , ivBits ) \
834834const OSSL_DISPATCH wp_des3##mode##_functions[] = { \
835835 { OSSL_FUNC_CIPHER_NEWCTX, \
836- (DFUNC)wp_des3_block_##mode##_newctx }, \
837- { OSSL_FUNC_CIPHER_FREECTX, (DFUNC)wp_des3_block_freectx }, \
838- { OSSL_FUNC_CIPHER_DUPCTX, (DFUNC)wp_des3_block_dupctx }, \
839- { OSSL_FUNC_CIPHER_ENCRYPT_INIT, (DFUNC)wp_des3_block_einit }, \
840- { OSSL_FUNC_CIPHER_DECRYPT_INIT, (DFUNC)wp_des3_block_dinit }, \
841- { OSSL_FUNC_CIPHER_UPDATE, (DFUNC)wp_des3_block_update }, \
842- { OSSL_FUNC_CIPHER_FINAL, (DFUNC)wp_des3_block_final }, \
843- { OSSL_FUNC_CIPHER_CIPHER, (DFUNC)wp_des3_block_cipher }, \
836+ (DFUNC)wp_des3_block_##mode##_newctx }, \
837+ { OSSL_FUNC_CIPHER_FREECTX, (DFUNC)wp_des3_block_freectx }, \
838+ { OSSL_FUNC_CIPHER_DUPCTX, (DFUNC)wp_des3_block_dupctx }, \
839+ { OSSL_FUNC_CIPHER_ENCRYPT_INIT, (DFUNC)wp_des3_block_einit }, \
840+ { OSSL_FUNC_CIPHER_DECRYPT_INIT, (DFUNC)wp_des3_block_dinit }, \
841+ { OSSL_FUNC_CIPHER_UPDATE, (DFUNC)wp_des3_block_update }, \
842+ { OSSL_FUNC_CIPHER_FINAL, (DFUNC)wp_des3_block_final }, \
843+ { OSSL_FUNC_CIPHER_CIPHER, (DFUNC)wp_des3_block_cipher }, \
844844 { OSSL_FUNC_CIPHER_GET_PARAMS, \
845- (DFUNC)wp_des3_##mode##_get_params }, \
846- { OSSL_FUNC_CIPHER_GET_CTX_PARAMS, (DFUNC)wp_des3_block_get_ctx_params }, \
847- { OSSL_FUNC_CIPHER_SET_CTX_PARAMS, (DFUNC)wp_des3_block_set_ctx_params }, \
848- { OSSL_FUNC_CIPHER_GETTABLE_PARAMS, (DFUNC)wp_cipher_gettable_params }, \
845+ (DFUNC)wp_des3_##mode##_get_params }, \
846+ { OSSL_FUNC_CIPHER_GET_CTX_PARAMS, (DFUNC)wp_des3_block_get_ctx_params }, \
847+ { OSSL_FUNC_CIPHER_SET_CTX_PARAMS, (DFUNC)wp_des3_block_set_ctx_params }, \
848+ { OSSL_FUNC_CIPHER_GETTABLE_PARAMS, (DFUNC)wp_cipher_gettable_params }, \
849849 { OSSL_FUNC_CIPHER_GETTABLE_CTX_PARAMS, \
850850 (DFUNC)wp_cipher_gettable_ctx_params }, \
851851 { OSSL_FUNC_CIPHER_SETTABLE_CTX_PARAMS, \
@@ -854,9 +854,9 @@ const OSSL_DISPATCH wp_des3##mode##_functions[] = { \
854854};
855855
856856/** Implements the functions calling base functions for a block cipher. */
857- #define IMPLEMENT_DES3_BLOCK (lcmode , UCMODE , kBits , ivBits ) \
858- IMPLEMENT_DES3_BLOCK_GET_PARAMS(lcmode, UCMODE, kBits, ivBits) \
859- IMPLEMENT_DES3_BLOCK_NEWCTX(lcmode, UCMODE, kBits, ivBits) \
857+ #define IMPLEMENT_DES3_BLOCK (lcmode , UCMODE , kBits , ivBits ) \
858+ IMPLEMENT_DES3_BLOCK_GET_PARAMS(lcmode, UCMODE, kBits, ivBits) \
859+ IMPLEMENT_DES3_BLOCK_NEWCTX(lcmode, UCMODE, kBits, ivBits) \
860860IMPLEMENT_DES3_BLOCK_DISPATCH(lcmode, kBits, ivBits)
861861
862862/*
0 commit comments