-- 
Dr Paul Dale | Cryptographer | Network Security & Encryption 
Phone +61 7 3031 7217
Oracle Australia



> On 5 Jun 2019, at 12:47 pm, Richard Levitte <levi...@openssl.org> wrote:

> But you're talking about allocating the whole OSSL_PARAM array on the
> heap, aren't you?  While not structly opposed (even though I think
> that's wasteful), I think this should be done with a separate set of
> functions (intuitively, having names with '_alloc_' rather than
> '_construct_' could be an idea).

Not the whole OSSL_PARAM array, just the data pointed to by (some) of the 
elements of one.
_alloc_ instead of _construct_ makes sense and is better than NULL.

I’m fine with `OSSL_PARAM params[20]` in code and filling as many slots as 
desired.

To do entirely heap allocated arrays, we’d want to go via a stack (which is 
something we shouldn’t require providers to depend on) or use a linked list of 
some kind.


Pauli
-- 
Dr Paul Dale | Cryptographer | Network Security & Encryption 
Phone +61 7 3031 7217
Oracle Australia



Reply via email to