Hanno Becker def4305168 Perform CRT writing in-place on the output buffer
The CRT writing routine mbedtls_x509write_crt_der() prepares the TBS
(to-be-signed) part of the CRT in a temporary stack-allocated buffer,
copying it to the actual output buffer at the end of the routine.

This comes at the cost of a very large stack buffer. Moreover, its size
must be hardcoded to an upper bound for the lengths of all CRTs to be
written through the routine. So far, this upper bound was set to 2Kb, which
isn't sufficient some larger certificates, as was reported e.g. in #2631.

This commit fixes this by changing mbedtls_x509write_crt_der() to write
the certificate in-place in the output buffer, thereby avoiding the use
of a statically sized stack buffer for the TBS.

Fixes #2631.
2019-05-04 07:54:36 +01:00
..
2019-02-19 17:59:00 +00:00
2019-04-02 10:07:28 -07: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
2015-09-04 14:21:07 +02:00
2019-02-05 05:09:05 -05: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