mirror of
https://github.com/curl/curl.git
synced 2026-08-24 11:03:36 +03:00
mbedtls: fix CURLOPT_SSLCERT_BLOB (again)
- Increase the buffer length passed to mbedtls_x509_crt_parse to account for the null byte appended to the temporary blob. Follow-up to867ad1cwhich uses a null terminated copy of the certificate blob, because mbedtls_x509_crt_parse requires PEM data to be null terminated. Ref:867ad1c (r63439893)Ref: https://github.com/curl/curl/pull/8146 Closes https://github.com/curl/curl/pull/8260
This commit is contained in:
parent
3aee3612b4
commit
6c084fd47c
2 changed files with 6 additions and 5 deletions
|
|
@ -388,7 +388,7 @@ mbed_connect_step1(struct Curl_easy *data, struct connectdata *conn,
|
|||
memcpy(newblob, ssl_cert_blob->data, ssl_cert_blob->len);
|
||||
newblob[ssl_cert_blob->len] = 0; /* null terminate */
|
||||
ret = mbedtls_x509_crt_parse(&backend->clicert, newblob,
|
||||
ssl_cert_blob->len);
|
||||
ssl_cert_blob->len + 1);
|
||||
free(newblob);
|
||||
|
||||
if(ret) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue