GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||
GeezerVison is showing github.com — src: eliminate ManagedEVPPkey by jasnell · Pull Request #54751 · nodejs/node Conversation
|
|
Review requested:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
2ab5842 to
5e64139
Compare
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Thanks for working on simplifying this @jasnell! I just want to make sure my understanding is correct. IIRC, I added these types some years ago. From what I remember, Does that seem accurate to you? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Well, further simplification can be made here. The KeyObjectData holds a shared_ptr internally just for the ease of things since it also has to deal with symmetric key data. I think the slightly more inefficient shared_ptr usage is worth the e reduction in complexity but I can be swayed to make further changes here. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I am not asking for further simplification -- I am just trying to understand my own original motivation behind |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Yeah I've been having to refresh my memory on a lot of this also lol. It's been a good exercise. There's really tons of opportunity to simplify things in here. Moving things out to ncrypto is a great motivator to go through in detail. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
3e12b70 to
ab5fcbf
Compare
ab5fcbf to
a413907
Compare
Prior to this change, the ManagedEVPPkey class added an
additional layer of abstraction to the EVP_PKEY class
that wasn't strictly necessary.
Previously we had:
KeyObjectHandle ->
std::shared_ptr<KeyObjectData> ->
ManagedEVPPkey ->
EVPKeyPointer
After this change we have:
KeyObjectHandle ->
KeyObjectData ->
EVPKeyPointer
The `KeyObjectData` class no longer needs to be wrapped in
std::shared_ptr but it will hold the underlying EVPKeyPointer
in a std::shared_ptr.
This greatly simplifies the abstraction and provides an overall
reduction in code and complexity, although the changeset in this
PR is fairly extensive to get there.
This refactor is being done to simplify the codebase as part
of the process of extracting crypto functionality to the
separate ncrypto dep.
a413907 to
99dcd77
Compare
There was an error while loading. Please reload this page.
|
CI: https://ci.nodejs.org/job/node-test-pull-request/62211/ 💛 FINALLY! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Prior to this change, the ManagedEVPPkey class added an
additional layer of abstraction to the EVP_PKEY class
that wasn't strictly necessary.
Previously we had:
KeyObjectHandle ->
std::shared_ptr<KeyObjectData> ->
ManagedEVPPkey ->
EVPKeyPointer
After this change we have:
KeyObjectHandle ->
KeyObjectData ->
EVPKeyPointer
The `KeyObjectData` class no longer needs to be wrapped in
std::shared_ptr but it will hold the underlying EVPKeyPointer
in a std::shared_ptr.
This greatly simplifies the abstraction and provides an overall
reduction in code and complexity, although the changeset in this
PR is fairly extensive to get there.
This refactor is being done to simplify the codebase as part
of the process of extracting crypto functionality to the
separate ncrypto dep.
PR-URL: #54751
Reviewed-By: Yagiz Nizipli <[email protected]>
Prior to this change, the ManagedEVPPkey class added an
additional layer of abstraction to the EVP_PKEY class
that wasn't strictly necessary.
Previously we had:
KeyObjectHandle ->
std::shared_ptr<KeyObjectData> ->
ManagedEVPPkey ->
EVPKeyPointer
After this change we have:
KeyObjectHandle ->
KeyObjectData ->
EVPKeyPointer
The `KeyObjectData` class no longer needs to be wrapped in
std::shared_ptr but it will hold the underlying EVPKeyPointer
in a std::shared_ptr.
This greatly simplifies the abstraction and provides an overall
reduction in code and complexity, although the changeset in this
PR is fairly extensive to get there.
This refactor is being done to simplify the codebase as part
of the process of extracting crypto functionality to the
separate ncrypto dep.
PR-URL: #54751
Reviewed-By: Yagiz Nizipli <[email protected]>
Prior to this change, the ManagedEVPPkey class added an
additional layer of abstraction to the EVP_PKEY class
that wasn't strictly necessary.
Previously we had:
KeyObjectHandle ->
std::shared_ptr<KeyObjectData> ->
ManagedEVPPkey ->
EVPKeyPointer
After this change we have:
KeyObjectHandle ->
KeyObjectData ->
EVPKeyPointer
The `KeyObjectData` class no longer needs to be wrapped in
std::shared_ptr but it will hold the underlying EVPKeyPointer
in a std::shared_ptr.
This greatly simplifies the abstraction and provides an overall
reduction in code and complexity, although the changeset in this
PR is fairly extensive to get there.
This refactor is being done to simplify the codebase as part
of the process of extracting crypto functionality to the
separate ncrypto dep.
PR-URL: #54751
Reviewed-By: Yagiz Nizipli <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.