You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently created a transparent proxy project that includes the ability to decrypt https streams,
I use mbedtls to dynamically generate certificates,
(Obtain the original certificate of the domain name from website, extract the necessary information from it, and then use these information and my own root certificate to generate a new certificate.)
I found that mbedtls_x509write_crt_der returns the error value MBEDTLS_ERR_ASN1_BUF_TOO_SMALL when regenerating a certificate for some domain names.
After debugging, I found that the problem is related to a fixed-size array in mbedtls_x509write_crt_der unsigned char tmp_buf[2048];
If there is too much content in the certificate of a domain name (I tested the domain name 'www.xiami.com', it contains more than one hundred DNS names!), the array size is not enough to handle them.
The text was updated successfully, but these errors were encountered:
@raprepo Thank you for reporting this issue!
As you know, Mbed TLS main purpose targeting embedded systems, where stack and heap usage are limited.
Increasing the size of the tmp_buf might help you, but it will affect many other users.
I agree the size limit should probably be documented better though.
Nonetheless, we will take your case into consideration.
Description
Bug
I recently created a transparent proxy project that includes the ability to decrypt https streams,
I use mbedtls to dynamically generate certificates,
(Obtain the original certificate of the domain name from website, extract the necessary information from it, and then use these information and my own root certificate to generate a new certificate.)
I found that mbedtls_x509write_crt_der returns the error value MBEDTLS_ERR_ASN1_BUF_TOO_SMALL when regenerating a certificate for some domain names.
After debugging, I found that the problem is related to a fixed-size array in mbedtls_x509write_crt_der
unsigned char tmp_buf[2048];
If there is too much content in the certificate of a domain name (I tested the domain name 'www.xiami.com', it contains more than one hundred DNS names!), the array size is not enough to handle them.
The text was updated successfully, but these errors were encountered: