Hi @AhmedHamza
There isn’t a general rule for computing the buf size, as it varies from the components you are using.
An RSA certificate is large enough, and considering the server may send a certificate chain, it may be that you need several KB in your buffer.
Note that you can use ecdsa signed certificates with similar security strength, and smaller size, if RAM is an issue for you.
Regards,
Mbed TLS Support
Ron