-
Notifications
You must be signed in to change notification settings - Fork 579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove raw pointers from the public interface #3216
Comments
See also: #2677 |
For Unfortunately
|
I can see a few possible return types
I'm really not sure what the right thing is.
|
Proposed |
I think this has been resolved now? |
Yes. Thanks a lot! |
X509_Object::check_signature(const Public_Key*)
did give us a run for our money yesterday. In some application code we (accidentially) switched from the overload that takes aconst Public_Key&
and suddenly started seeing segfaults. One might say, we should have read the documentation:Should we try and get such things out of the API before 3.0?
Other places where raw pointers without "clear" ownership contracts are used:
Public_Key* X509::load_key(...)
Public_Key* X509::copy_key(...)
Private_Key* PKCS8::load_key(...)
(raw pointer overloads are deprecated, but could be removed)
bool X509_Object::check_signature(const Public_Key*)
(takes ownership and deletes the pointer 😨)
Public_Key* PKCS10_Request::subject_public_key()
Private_Key* Credentials_Manager::private_key_for()
Unfortunately, some of those APIs aren't deprecated, yet. Still, I think we should see what to do with them.
The text was updated successfully, but these errors were encountered: