Skip to content

Conversation

@mamckee
Copy link
Collaborator

@mamckee mamckee commented Feb 9, 2026

This PR adds the provider context copy function for newer versions of OpenSSL. This function copies the state into an existing context object instead of creating a new context object like context duplication.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for OpenSSL’s newer digest “copy context into an existing ctx” provider callback (OSSL_FUNC_DIGEST_COPYCTX) to complement the existing “duplicate context” (DUPCTX) implementation.

Changes:

  • Introduces p_scossl_digest_copy_ctx for copying digest state into an existing SCOSSL_DIGEST_CTX when OSSL_FUNC_DIGEST_COPYCTX is available.
  • Updates digest dispatch table macro generation to conditionally include OSSL_FUNC_DIGEST_COPYCTX for newer OpenSSL versions.
  • Refactors the shared digest macro to separate “common helper function implementations” from “dispatch table construction”.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
SymCryptProvider/src/digests/p_scossl_digest_common.h Declares copyctx and conditionally adds it to the digest dispatch macro.
SymCryptProvider/src/digests/p_scossl_digest_common.c Implements p_scossl_digest_copy_ctx using SymCrypt’s stateCopyFunc.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

1 participant