Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix pctx leak with RAII wrapper #6845

Merged
merged 7 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
### Fixed

- CA certificate bundles used for JWT refresh and containing more than one certificate are now handled correctly (#6817).
- Memory leak during EC key creation is fixed (#6845).
- Fixed thread-safety issues when CCF nodes attempted to contact non-TLS servers. This previously could cause errors when running SNP builds with multiple worker threads (#6836).

## [6.0.0-dev19]
Expand Down
2 changes: 1 addition & 1 deletion src/crypto/openssl/public_key.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ namespace ccf::crypto
OSSL_PKEY_PARAM_PUB_KEY, (void*)raw.data(), raw.size());
params[2] = OSSL_PARAM_construct_end();

auto pctx = EVP_PKEY_CTX_new_from_name(NULL, "EC", NULL);
Unique_EVP_PKEY_CTX pctx("EC");
CHECK1(EVP_PKEY_fromdata_init(pctx));

EVP_PKEY* pkey = NULL;
Expand Down