Janos Follath d6dce9f4f3 Fix zero-length seed or label in TLS 1.2 PRF
The psa_tls12_prf_set_seed() and psa_tls12_prf_set_label() functions did
not work on platforms where malloc(0) returns NULL.

It does not affect the TLS use case but these PRFs are used in other
protocols as well and might not be used the same way. For example EAP
uses the TLS PRF with an empty secret. (This would not trigger the bug,
but is a strong indication that it is not safe to assume that certain
inputs to this function are not zero length.)

The conditional block includes the memcpy() call as well to avoid
passing a NULL pointer as a parameter resulting in undefined behaviour.

The current tests are already using zero length label and seed, there is
no need to add new test for this bug.
2019-07-04 09:11:38 +01:00
..
2019-02-19 17:59:00 +00:00
2019-04-02 10:07:28 -07:00
2019-02-19 17:59:00 +00:00
2019-02-19 17:59:00 +00:00
2019-04-30 16:47:36 +01:00
2019-02-19 17:59:00 +00:00
2019-03-11 16:46:20 +00:00
2015-09-04 14:21:07 +02:00
2019-02-19 17:59:00 +00:00
2019-02-19 17:59:00 +00:00