]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
rustls: don't try printing the not provided file
authorYedaya Katsman <yedaya.ka@gmail.com>
Sun, 22 Jun 2025 13:02:28 +0000 (16:02 +0300)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 22 Jun 2025 20:31:11 +0000 (22:31 +0200)
Caught by gcc (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0:
```
vtls/rustls.c: In function ‘cr_connect’:
vtls/rustls.c:857:61: warning: ‘%s’ directive argument is null [-Wformat-overflow=]
  857 |     failf(data, "rustls: must provide certificate with key '%s'",
      |                                                             ^~
```

Closes #17704

lib/vtls/rustls.c

index 24f646078d8f6308cc6559f7a3467f4d8579ba14..ca318d5f4e6242cbe007ffb1adf2657b58c7236c 100644 (file)
@@ -855,7 +855,7 @@ init_config_builder_client_auth(struct Curl_easy *data,
   }
   else if(!conn_config->clientcert && ssl_config->key) {
     failf(data, "rustls: must provide certificate with key '%s'",
-          conn_config->clientcert);
+          ssl_config->key);
     return CURLE_SSL_CERTPROBLEM;
   }