Add text to OSSL_PARAM constructors#9303
Conversation
|
Is any of #9305 relevant here? |
|
Kicking the CIs, they didn't catch the last fixup |
|
... or I forgot to commit the latest fixup. D'oh.. |
3e1d586 to
b149ac9
Compare
slontis
left a comment
There was a problem hiding this comment.
memory leaks on error cases need addressing
2016098 to
1ddb503
Compare
|
Kicking the bots |
They do the same thing as OPENSSL_hexstr2buf() and OPENSSL_buf2hexstr(), except they take a result buffer from the caller. We take the opportunity to break out the documentation of the hex to / from buffer conversion routines from the OPENSSL_malloc() file to its own file. These routines aren't memory allocation routines per se.
These are utility functions that can be used to replace calls to ctrl_str type functions with get_params / set_params types of calls. They work by translating text values to something more suitable for OSSL_PARAM, and by interpretting parameter keys in a compatible fashion.
1ddb503 to
9115759
Compare
|
Ping! |
|
.. or perhaps not so ping... I suspect a rebase is in order first |
|
It was a function code clash.... but wait, |
|
NOW it seems to build right. So, ping! |
paulidale
left a comment
There was a problem hiding this comment.
Does this need test cases?
|
Are unit tests coming? |
I'm using this in #8877, so they do get tested by using... I was hoping to get away with that ;-) |
|
It seems to be missing negative tests ... e.g. an odd number of hex digits and non-hex digits. |
They do the same thing as OPENSSL_hexstr2buf() and OPENSSL_buf2hexstr(), except they take a result buffer from the caller. We take the opportunity to break out the documentation of the hex to / from buffer conversion routines from the OPENSSL_malloc() file to its own file. These routines aren't memory allocation routines per se. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from #9303)
These are utility functions that can be used to replace calls to ctrl_str type functions with get_params / set_params types of calls. They work by translating text values to something more suitable for OSSL_PARAM, and by interpretting parameter keys in a compatible fashion. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from #9303)
richsalz
left a comment
There was a problem hiding this comment.
It was a function code clash.... but wait,
mkerr.plstill adds new function codes??? @richsalz, is this deliberate?
Yes it was deliberate to not remove function codes because editing mkerr was too complex to just keep the old codes while not adding new ones. See https://github.com/openssl/openssl/blob/master/util/mkerr.pl#L125
crypto/o_str.c
Outdated
There was a problem hiding this comment.
should explicitly test against '\0'
This adds
OSSL_PARAM_construct_from_text()andOSSL_PARAM_allocate_from_text()These are utility functions that can be used to replace calls to
ctrl_str type functions with get_params / set_params types of calls.
They work by translating text values to something more suitable for
OSSL_PARAM, and by interpretting parameter keys in a compatible
fashion.