Replumbing: Add the Provider Object, type OSSL_PROVIDER#8287
Replumbing: Add the Provider Object, type OSSL_PROVIDER#8287levitte wants to merge 20 commits intoopenssl:masterfrom
Conversation
|
TODO: docs and test. That will be for tomorrow |
5f22da9 to
38b9f0e
Compare
|
This now includes a few tests that contain a very simple provider that provides nothing but a greeting. This simple provider gets to act both as a built in provider and as a loadable provider module. Count this as official |
|
TODO: documentation |
|
Hmmm, Travis fails the loaded provider module test with a segfault. The tests work right on all machines I can get my hands on for the moment... so does anyone else have a clue? |
|
Never mind that, found myself a clue |
|
Travis errors are relevant. |
Yeah, I discovered that as well |
084a852 to
84cdd85
Compare
|
The CIs finally approve :-) |
|
Back in WIP, I forgot that I need to add docs as well |
mspncp
left a comment
There was a problem hiding this comment.
I'm in doubt whether it is a good idea to introduce a new naming convention for C source code files by using the dash as a word separator. Traditionally, C source files have been in lowercase with underscores and the OpenSSL code base already has many of those files. Introducing a new separator would only make sense if it would have a different semantic meaning (like separating a package name from the module name) and only if it would be used throughout the entire project. Also, there should be a good reason for it, because the mixing of separators makes the code base look a bit untidy.
(Note that I am not talking about dashes in POD or Perl files)
|
Glad you picked up on that... personally, I find the use of underscore when not absolutely required (like in the limitations of symbol names) incredibly ugly. Furthermore, it's interesting that you mention packaging in relation to this. See, in the Debian universe, underscores are used as delimiters in package file names, to separate between the package name (which can and frequently does include dashes), the package version, and the applicable architecture. Here are a couple of example from my cache:
|
|
Don't get me wrong: I'm not opposed to using the dash per se. (I love them in Lisp code ;-) ). I am just against The debian packages are actually a good example for having two separate kinds of separators, because in this case both separators serve different purposes. So if you can give a good justification of why and when to use dashes instead of underscores, and if this convention gets accepted by all other project members, that's ok for me. But just thinking that it looks nicer is not enough of a reason. |
|
If it were a new project, it would be ok (though uncommon) to use the dash throughout. But we already have a lot of files containing underscores. |
|
Actually, we do use underscore as a sub-system / prefix delimiter, although not entirely consistently. In I have no intention to make "provider" a prefix or otherwise sub-system indicator. The only reason I have for two file names is that I wanted to separate the public API implementation from the internal API implementation. So "provider" and "provider-core" are just two names, with no other meaning intended. |
|
However, if everyone else would prefer "provider_core" over "provider-core", I can change that. It's not like I'm very attached to either form. |
|
My preferences are clear, I think ;-) |
|
Yeah, so maybe a second opinion, 'cause if it's left to just you and I, I fear we may get nowhere... |
6d869b8 to
b704120
Compare
|
That's ok for me. Since I braught up the subject, I'll |
59cd281 to
ec42361
Compare
|
I have a slight tendency to agree with @mspncp on the underscore vs dashes issue. |
mattcaswell
left a comment
There was a problem hiding this comment.
One minor issue noted. Approved whether or not a change is made in response to that.
crypto/provider_core.c
Outdated
| } | ||
|
|
||
| /* | ||
| * Provider loader. |
There was a problem hiding this comment.
Should this comment really be talking about Provider activation?
|
Merged. c453283 Add documentation |
…able These will be used to point out general OpenSSL modules directory. ENGINE modules are kept apart for backward compatibility. Reviewed-by: Matt Caswell <[email protected]> (Merged from #8287)
The OSSL_PROVIDER is the core object involved in loading a provider module, initialize a provider and do the initial communication of provider wide and core wide dispatch tables. Reviewed-by: Matt Caswell <[email protected]> (Merged from #8287)
Adding a provider means creating an internal provier object and adding it to the store. This allows the addition of built in providers, be it in the OpenSSL libraries or in any application. "Loading" a provider is defined broadly. A built in provider is already "loaded" in essence and only needs activating, while a provider in a dynamically loadable module requires actually loading the module itself. In this API, "loading" a provider does both. Reviewed-by: Matt Caswell <[email protected]> (Merged from #8287)
Reviewed-by: Matt Caswell <[email protected]> (Merged from #8287)
Two tests are added, one that tests the internal API, the other tests the public API. Those two tests both test the same provider, which acts both as a built-in provider and as a loadable provider module. Reviewed-by: Matt Caswell <[email protected]> (Merged from #8287)
Reviewed-by: Matt Caswell <[email protected]> (Merged from #8287)
featuring 6x"horizontal" code path which is up to 25% faster than present 4x"vertical" for larger blocks. Signed-off-by: Patrick Steuer <[email protected]> Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Richard Levitte <[email protected]> (Merged from #8287)
featuring 6x"horizontal" code path which is up to 25% faster than present 4x"vertical" for larger blocks. Signed-off-by: Patrick Steuer <[email protected]> Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Richard Levitte <[email protected]> (Merged from openssl#8287) (cherry picked from commit d122919)
featuring 6x"horizontal" code path which is up to 25% faster than present 4x"vertical" for larger blocks. Signed-off-by: Patrick Steuer <[email protected]> Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Richard Levitte <[email protected]> (Merged from openssl#8287) (cherry picked from commit d122919)
featuring 6x"horizontal" code path which is up to 25% faster than present 4x"vertical" for larger blocks. Signed-off-by: Patrick Steuer <[email protected]> Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Richard Levitte <[email protected]> (Merged from openssl#8287) (cherry picked from commit d122919)
featuring 6x"horizontal" code path which is up to 25% faster than present 4x"vertical" for larger blocks. Signed-off-by: Patrick Steuer <[email protected]> Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Richard Levitte <[email protected]> (Merged from openssl/openssl#8287) (cherry picked from commit d1229190bfbb19439589557e4d65f9bccab09b2d) [Yilin: rebase babassl master] Signed-off-by: YiLin.Li <[email protected]>
featuring 6x"horizontal" code path which is up to 25% faster than present 4x"vertical" for larger blocks. Signed-off-by: Patrick Steuer <[email protected]> Reviewed-by: Matt Caswell <[email protected]> Reviewed-by: Richard Levitte <[email protected]> (Merged from openssl/openssl#8287) (cherry picked from commit d1229190bfbb19439589557e4d65f9bccab09b2d) [Yilin: rebase babassl master] Signed-off-by: YiLin.Li <[email protected]>
The OSSL_PROVIDER is the core object involved in loading a provider
module, initialize a provider and do the initial communication of
provider wide and core wide dispatch tables.
Checklist
Note: this is made on top of #8286, ensure that you know which is which