mirror of
https://github.com/openssl/openssl.git
synced 2026-01-25 02:56:43 +00:00
OSSL_FN_mul() multiplies two operands. The result OSSL_FN may be of any size, and if it's smaller than the result of multiplying the two operands, the result is truncated to that size. This also adds the function OSSL_FN_copy(), a counterpart for BN_copy(), as well as an OSSL_FN API test program. Finally, test/fn_api_test.c is updated with a 'struct test_case_st', used to instruct test functions what numbers to operate on, and some conditions, and the 'add' and 'sub' test functions are upgraded to use that structure for their input. Related-to: doc/designs/fixed-size-large-numbers.md Resolves: https://github.com/openssl/openssl/issues/28934 Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/29203)