Skip to content

Commit

Permalink
lib/openssl/UniqueEC: add UniqueEC_GROUP
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Oct 24, 2023
1 parent 5196d76 commit 8082f7a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib/openssl/UniqueEC.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ struct ECDeleter {
}
#endif

void operator()(EC_GROUP *group) noexcept {
EC_GROUP_free(group);
}

void operator()(EC_POINT *p) noexcept {
EC_POINT_free(p);
}
Expand All @@ -24,4 +28,5 @@ struct ECDeleter {
using UniqueEC_KEY = std::unique_ptr<EC_KEY, ECDeleter>;
#endif

using UniqueEC_GROUP = std::unique_ptr<EC_GROUP, ECDeleter>;
using UniqueEC_POINT = std::unique_ptr<EC_POINT, ECDeleter>;

0 comments on commit 8082f7a

Please sign in to comment.