Richard Levitte 247a1786e2 OSSL_PARAM: Correct the assumptions on the UTF8 string length
When the string "ABCDEFGH" is passed, what's considered its data, this?

    { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H' }

or this?

    { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', '\0' }

If it's passed as a pass phrase, should the terminating NUL byte be
considered part of the pass phrase, or not?

Our treatment of OSSL_PARAMs with the data type OSSL_PARAM_UTF8_STRING
set the length of the string to include the terminating NUL byte,
which is quite confusing.  What should the recipient of such a string
believe?

Instead of perpetuating this confusion, we change the assumption to
set the OSSL_PARAM to the length of the string, not including the
terminating NUL byte, thereby giving it the same value as a strlen()
call would give.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14168)
2021-02-18 16:58:17 +01:00
..
2019-10-11 15:30:57 +02:00
2021-02-18 15:05:17 +00:00
2021-01-28 13:54:57 +01:00
2021-02-18 15:05:17 +00:00
2020-05-27 00:35:00 +02:00
2021-02-18 15:05:17 +00:00
2021-01-28 13:54:57 +01:00
2020-06-17 11:33:16 +10:00
2020-08-07 14:16:47 +10:00
2020-07-16 14:47:04 +02:00
2020-06-25 14:13:12 +01:00
2021-01-28 13:54:57 +01:00
2019-10-11 15:30:57 +02:00
2019-10-11 15:30:57 +02:00
2020-04-23 13:55:52 +01:00
2021-01-28 13:54:57 +01:00
2021-01-28 13:54:57 +01:00
2021-02-18 15:05:17 +00:00
2021-02-18 15:05:17 +00:00
2021-02-18 15:05:17 +00:00
2021-02-18 15:05:17 +00:00
2021-02-18 15:05:17 +00:00
2021-01-28 13:54:57 +01:00
2020-06-04 14:33:57 +01:00
2020-10-15 14:10:06 +01:00
2019-11-06 19:38:32 +01:00
2020-07-24 22:53:27 +10:00
2020-04-23 13:55:52 +01:00