[openssl/openssl] 95b56b: OSSL_FN: Expose BN OSSL_FN acquire helpers

"'Richard Levitte' via openssl-commits" <[email protected]> Sun, 12 Jul 2026 01:39:36 -0700
Newsgroups gmane.comp.encryption.openssl.cvs
Message-ID <openssl/openssl/push/refs/heads/feature/ossl_fn/[email protected]>
  Branch: refs/heads/feature/ossl_fn
  Home:   https://github.com/openssl/openssl
  Commit: 95b56b68f30889ab1f4686bc3e429aadfec3a409
      https://github.com/openssl/openssl/commit/95b56b68f30889ab1f4686bc3e429aadfec3a409
  Author: Richard Levitte <[email protected]>
  Date:   2026-07-10 (Fri, 10 Jul 2026)

  Changed paths:
    M crypto/bn/bn_lib.c
    M crypto/bn/bn_local.h
    M include/crypto/bn.h

  Log Message:
  -----------
  OSSL_FN: Expose BN OSSL_FN acquire helpers

Move the BIGNUM to OSSL_FN acquire/release helpers out of
bn_local.h and declare them in the internal BN header.  This makes
them available to call sites that need to operate temporarily on the
fixed-width representation.

Assisted-by: Pi:openai/gpt-5.5
Signed-off-by: Richard Levitte <[email protected]>

Reviewed-by: Igor Ustinov <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
MergeDate: Sun Jul 12 08:37:00 2026
(Merged from https://github.com/openssl/openssl/pull/31881)


  Commit: f7021b86c20badf03f77a12bb14b3704ee2cb40f
      https://github.com/openssl/openssl/commit/f7021b86c20badf03f77a12bb14b3704ee2cb40f
  Author: Richard Levitte <[email protected]>
  Date:   2026-07-10 (Fri, 10 Jul 2026)

  Changed paths:
    M crypto/bn/bn_lib.c
    M include/crypto/bn.h

  Log Message:
  -----------
  OSSL_FN: Add read-only BIGNUM OSSL_FN accessor

Add bn_get_ossl_fn(), a read-only counterpart to bn_acquire_ossl_fn().
Unlike the latter, it neither acquires nor resizes the BIGNUM: the
BIGNUM stays usable with BN_ functions, no bn_release() is needed, and
the returned OSSL_FN keeps the BIGNUM's current allocated width.  This
suits read-only operands at OSSL_FN call sites.

Assisted-by: Pi:openai/gpt-5.5
Signed-off-by: Richard Levitte <[email protected]>

Reviewed-by: Igor Ustinov <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
MergeDate: Sun Jul 12 08:37:02 2026
(Merged from https://github.com/openssl/openssl/pull/31881)


  Commit: 7360ae77bce5465a570faa2b34d42fa4f9083588
      https://github.com/openssl/openssl/commit/7360ae77bce5465a570faa2b34d42fa4f9083588
  Author: Richard Levitte <[email protected]>
  Date:   2026-07-12 (Sun, 12 Jul 2026)

  Changed paths:
    M test/build.info
    A test/fntest.c
    A test/recipes/11-test_fn.t
    M test/recipes/11-test_fn_api.t

  Log Message:
  -----------
  OSSL_FN: Add OSSL_FN stanza arithmetic test

Add fntest as a stanza-driven arithmetic test for the OSSL_FN
operations currently available in this branch.  The test reuses the
existing BN input files and reports known but unsupported stanza types
as skipped.

Wire the new test program into the build and add a test_fn recipe for
sum, multiplication, square, and left-shift coverage.

Assisted-by: Pi:openai/gpt-5.5
Assisted-by: Pi:z-ai/glm-5.2
Signed-off-by: Richard Levitte <[email protected]>
Resolves: https://github.com/openssl/project/issues/2021

Reviewed-by: Igor Ustinov <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
MergeDate: Sun Jul 12 08:37:03 2026
(Merged from https://github.com/openssl/openssl/pull/31881)


Compare: https://github.com/openssl/openssl/compare/d45453c42805...7360ae77bce5

To unsubscribe from these emails, change your notification settings at https://github.com/openssl/openssl/settings/notifications

-- 
You received this message because you are subscribed to the Google Groups "openssl-commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/a/openssl.org/d/msgid/openssl-commits/openssl/openssl/push/refs/heads/feature/ossl_fn/d45453-7360ae%40github.com.