What should be the size for the buffer to store the X509 Certificate and CSR?

Hello,

I am using mbedTLS for signing and verifying certificate requests.

I am storing the certificate and the CSR files in the buffer before/after writing to file to perform operations.

My question is, what should be the max length for the buffers?

Note: I am experimenting with the curves, for now I am using one of the curves of 256-bits.

Thanks