Skip to content

Comments

Ossl: Ensure libctx is freed on drop#312

Merged
simo5 merged 2 commits intolatchset:mainfrom
simo5:osslctx_free
Jul 31, 2025
Merged

Ossl: Ensure libctx is freed on drop#312
simo5 merged 2 commits intolatchset:mainfrom
simo5:osslctx_free

Conversation

@simo5
Copy link
Member

@simo5 simo5 commented Jul 31, 2025

Description

As pointed out in #311 we do not free the Context on drop.
When this code was embedded in kryoptic this was not really necessary as Kryoptic uses a single global context in a lazyly initialized static variable.

But now Ossl exposes the ability to create as many as you want, so they need to be freed on drop.

Checklist

  • Test suite updated with functionality tests
  • Test suite updated with negative tests
  • Rustdoc string were added or updated
  • CHANGELOG and/or other documentation added or updated
  • This is not a code change

Reviewer's checklist:

  • Any issues marked for closing are fully addressed
  • There is a test suite reasonably covering new functionality or modifications
  • This feature/change has adequate documentation added
  • A changelog entry is added if the change is significant
  • Code conform to coding style that today cannot yet be enforced via the check style test
  • Commits have short titles and sensible text
  • Doc string are properly updated

Signed-off-by: Simo Sorce <simo@redhat.com>
@simo5 simo5 requested a review from Jakuje July 31, 2025 15:21
Copy link
Contributor

@Jakuje Jakuje left a comment

Choose a reason for hiding this comment

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

looks straightforward enough

Enables pqc in the build

Signed-off-by: Simo Sorce <simo@redhat.com>
Copy link
Contributor

@Jakuje Jakuje left a comment

Choose a reason for hiding this comment

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

still ack. The failed test is the flaky one

@simo5 simo5 merged commit 41a3887 into latchset:main Jul 31, 2025
86 of 87 checks passed
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.

2 participants