mirror of
https://github.com/curl/curl.git
synced 2026-06-08 16:54:16 +03:00
Fix runtime error when ssl_cert_type is not set.
This commit is contained in:
parent
13efff80fb
commit
8f80ea1fad
1 changed files with 2 additions and 2 deletions
|
|
@ -551,7 +551,7 @@ mbed_connect_step1(struct Curl_cfilter *cf, struct Curl_easy *data)
|
|||
/* if DER or a null-terminated PEM just process using
|
||||
* mbedtls_x509_crt_parse().
|
||||
* */
|
||||
if(strcmp(ssl_cert_type, "DER") == 0
|
||||
if((ssl_cert_type && strcmp(ssl_cert_type, "DER") == 0)
|
||||
|| ((char *)(ca_info_blob->data))[ca_info_blob->len - 1] == '\0'
|
||||
) {
|
||||
ret = mbedtls_x509_crt_parse(&backend->cacert,
|
||||
|
|
@ -651,7 +651,7 @@ mbed_connect_step1(struct Curl_cfilter *cf, struct Curl_easy *data)
|
|||
/* if DER or a null-terminated PEM just process using
|
||||
* mbedtls_x509_crt_parse().
|
||||
* */
|
||||
if(strcmp(ssl_cert_type, "DER") == 0
|
||||
if((ssl_cert_type && strcmp(ssl_cert_type, "DER") == 0)
|
||||
|| ((char *)(ssl_cert_blob->data))[ssl_cert_blob->len - 1] == '\0'
|
||||
) {
|
||||
ret = mbedtls_x509_crt_parse(&backend->clicert,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue