Skip to content

refactor: rename OpenSSLObjectWrapper to CryptoObjectWrapper#1651

Closed
hk2166 wants to merge 2 commits into
hiero-ledger:mainfrom
hk2166:refactor/rename-openssl-object-wrapper-to-crypto-object-wrapper
Closed

refactor: rename OpenSSLObjectWrapper to CryptoObjectWrapper#1651
hk2166 wants to merge 2 commits into
hiero-ledger:mainfrom
hk2166:refactor/rename-openssl-object-wrapper-to-crypto-object-wrapper

Conversation

@hk2166

@hk2166 hk2166 commented May 14, 2026

Copy link
Copy Markdown
Contributor

Description:

Rename OpenSSLObjectWrapper to CryptoObjectWrapper and move it out of openssl_utils/

The generic RAII wrapper is not OpenSSL-specific — it wraps any C handle with a custom deleter/copier and is also used by libsecp256k1 types (Secp256k1Context). This is option (b) from the maintainer review on PR #1595.

Create impl/CryptoObjectWrapper.h with the renamed class at a neutral location
Delete impl/openssl_utils/OpenSSLObjectWrapper.h
Update all 12 subclass headers to use the new include path and inherit from CryptoObjectWrapper
Update all docstrings to say "crypto object" instead of "OpenSSL object"
Related issue(s):

Fixes #1614

Notes for reviewer:

This is a pure mechanical rename + move — no behavioral changes.
The namespace Hiero::internal::OpenSSLUtils was intentionally left unchanged to keep the diff scoped. A namespace rename would cascade into every .cc file and is a separate concern.
No CMake changes were needed — the project uses glob patterns, not explicit file lists.
The name CryptoObjectWrapper was chosen as suggested in the issue.
The file is placed flat in impl/ (not a new subdirectory), matching the existing layout convention.
Checklist

Rename the generic RAII wrapper from OpenSSLObjectWrapper to
CryptoObjectWrapper and move it from impl/openssl_utils/ to impl/,
since the wrapper is not OpenSSL-specific and is also used by
libsecp256k1 types (Secp256k1Context).

Changes:
- Created impl/CryptoObjectWrapper.h with the renamed class
- Deleted impl/openssl_utils/OpenSSLObjectWrapper.h
- Updated all 12 subclass headers to use the new include path
  and inherit from CryptoObjectWrapper instead
- Updated all docstrings to say 'crypto object' instead of
  'OpenSSL object'

Signed-off-by: hk2166 <9610hemant@gmail.com>
@hk2166
hk2166 requested review from a team as code owners May 14, 2026 15:22
@hk2166
hk2166 requested a review from gsstoykov May 14, 2026 15:22
@github-actions

github-actions Bot commented May 14, 2026

Copy link
Copy Markdown

Hey @hk2166 👋 thanks for the PR!
I'm your friendly PR Helper Bot 🤖 and I'll be riding shotgun on this one, keeping track of your PR's status to help you get it approved and merged.

This comment updates automatically as you push changes -- think of it as your PR's live scoreboard!
Here's the latest:


PR Checks

DCO Sign-off -- All commits have valid sign-offs. Nice work!


GPG Signature -- All commits have verified GPG signatures. Locked and loaded!


Merge Conflicts -- No merge conflicts detected. Smooth sailing!


Issue Link -- Linked to #1614 (assigned to you).


🎉 All checks passed! Your PR is ready for review. Great job!

@github-actions github-actions Bot added status: needs review The pull request is ready for maintainer review status: needs revision The pull request requires changes from the author before it can be reviewed or merged and removed status: needs review The pull request is ready for maintainer review labels May 14, 2026
… openssl_utils

Signed-off-by: hk2166 <9610hemant@gmail.com>
@hk2166
hk2166 force-pushed the refactor/rename-openssl-object-wrapper-to-crypto-object-wrapper branch from f9658d1 to 39c0dd5 Compare May 14, 2026 18:05
@github-actions github-actions Bot added status: needs review The pull request is ready for maintainer review and removed status: needs revision The pull request requires changes from the author before it can be reviewed or merged labels May 14, 2026
@hk2166 hk2166 closed this Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: needs review The pull request is ready for maintainer review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Beginner]: Rename OpenSSLObjectWrapper to neutral CryptoObjectWrapper and move out of openssl_utils/

1 participant