decoder memory-management question

D. J. Bernstein posting-openssl-users at box.cr.yp.to
Fri Mar 8 15:44:22 UTC 2024


Richard Levitte writes:
> For all I know, a provider could just as well choose to place the key in
> an internal cache and pass the cache index in an "data" OSSL_PARAM
> (OSSL_OBJECT_PARAM_DATA), and have the keymgmt "load" function pick up
> that cache index through the reference argument.

Aha, got it. I now understand that the "same provider" comment in
provider-object(7) is also guaranteeing that the meaning of reference
bytes is entirely up to the provider, and that the "can be called" part
of provider-decoder(7) is talking about what the core is doing (inside
decoder_construct_pkey()) in the case where a provider is decoding keys
for another provider, rather than what the decoder is doing.

> All things considered, it may be time for us to write some encoder /
> decoder guidelines...  ossl-guide-encoder(7) and ossl-guide-decoder(7),
> perhaps?

Sounds useful. I'm curious what I should be doing instead of calling the
private asn1_d2i_read_bio() function, for example. There are probably a
bunch of other things that I'm doing suboptimally.

---Dan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://mta.openssl.org/pipermail/openssl-users/attachments/20240308/c62ca950/attachment.sig>


More information about the openssl-users mailing list