Conversation
00d3174 to
ae3784f
Compare
crypto/evp/evp_fetch.c
Outdated
There was a problem hiding this comment.
Would it make sense to include this from evp_locl.h if it is needed there?
|
CI errors are relevant. |
|
@paulidale, in #8341 (comment), I mention that this needs #8286, #8287 and #8340. Only #8286 has yet made it into master. |
|
Okay, I'll look at them too. |
2996ee6 to
35774f1
Compare
|
I've rebased this on top of a fresh master. I'll go through any remaining comments tomorrow |
crypto/evp/evp_fetch.c
Outdated
There was a problem hiding this comment.
Do we need some locking here?
There was a problem hiding this comment.
No, not here. Locking for this should be part of the object database code, possibly through a function that anyone can call.
That should be done in a separate PR, and locking calls should be added in all places where things are added to the object database if necessary, not just here.
There was a problem hiding this comment.
(and for anyone listening, PR welcome!)
There was a problem hiding this comment.
We should raise an issue for this
|
Please note, btw, that this won't work without #8340... |
|
#8340 is now merged, and this has been rebased on top. |
|
Travis errors look relevant: |
|
CIs are happy now |
crypto/evp/evp_fetch.c
Outdated
There was a problem hiding this comment.
We should raise an issue for this
|
The work done today was to correct some refcounting that wasn't quite right. |
All relevant OSSL_METHOD_CONSTRUCT_METHOD callbacks got the callback data passed to them, except 'destruct'. There's no reason why it shouldn't get that pointer passed, so we make a small adjustment.
Fully assume that the method constructors use reference counting. Otherwise, we may leak memory, or loose track and do a double free.
This is an interface between Core dispatch table fetching and
EVP_{method}_fetch(). All that's needed from the diverse method
fetchers are the functions to create a method structure from a
dispatch table, a function that ups the method reference counter and a
function to free the method (in case of failure).
This routine is internal to the EVP API andis therefore only made
accessible within crypto/evp, by including evp_locl.h
mattcaswell
left a comment
There was a problem hiding this comment.
Approved assuming the minor typo is fixed. I also think an issue should be raised for the OBJ locking stuff before it gets forgotten about.
| * Note regarding putting the method in stores: | ||
| * | ||
| * we don't need to care if it actually got in or not here. | ||
| * If it didn't get it, it will simply not be available when |
All relevant OSSL_METHOD_CONSTRUCT_METHOD callbacks got the callback data passed to them, except 'destruct'. There's no reason why it shouldn't get that pointer passed, so we make a small adjustment. Reviewed-by: Matt Caswell <[email protected]> (Merged from #8341)
Fully assume that the method constructors use reference counting. Otherwise, we may leak memory, or loose track and do a double free. Reviewed-by: Matt Caswell <[email protected]> (Merged from #8341)
This is an interface between Core dispatch table fetching and
EVP_{method}_fetch(). All that's needed from the diverse method
fetchers are the functions to create a method structure from a
dispatch table, a function that ups the method reference counter and a
function to free the method (in case of failure).
This routine is internal to the EVP API andis therefore only made
accessible within crypto/evp, by including evp_locl.h
Reviewed-by: Matt Caswell <[email protected]>
(Merged from #8341)
This is an interface between Core dispatch table fetching and
EVP_{method}_fetch(). All that's needed from the diverse method
fetchers are the functions to create a method structure from a
dispatch table, a function that ups the method reference counter and a
function to free the method (in case of failure).
This routine is internal to the EVP API andis therefore only made
accessible within crypto/evp, by including evp_locl.h
Checklist