Skip to content

Support linking crypto library for unit test purposes #7118

@achamayou

Description

@achamayou

There is currently only a single way to consume libccf, to build full applications, but some of these applications, such as https://github.com/microsoft/scitt-ccf-ledger/, want to unit test functionality they are building that takes dependencies on individual CCF libraries, such as crypto.

In the specific case of crypto, there's an init function (openssl_sha256_init), which exists as a mitigation for OpenSSL 3.x digest context creation costs, which is not exposed in any public headers. Users have to resort to unfortunate workarounds.

We should:

  • Confirm the separate init() is still the way to go. This was done in the Open Enclave/3.1 days, we've moved on to 3.3/SymCrypt on Azure Linux, perhaps this is no longer necessary.
  • Have a clear, defined story for users who want to use ccfcrypto in their unit tests. That means a bit of doc with a list of headers, and updating at least some of the crypto unit tests to only include public headers/limited linking of ccfcrypto for demo purposes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions