diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache index 59337953359..899cb22ef7a 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache @@ -447,8 +447,8 @@ void apiClient_invoke(apiClient_t *apiClient, curl_easy_setopt(handle, CURLOPT_SSL_VERIFYHOST, 2L); } } else { - curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 0L); - curl_easy_setopt(handle, CURLOPT_SSL_VERIFYHOST, 0L); + curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 1L); + curl_easy_setopt(handle, CURLOPT_SSL_VERIFYHOST, 2L); } } diff --git a/samples/client/others/c/bearerAuth/src/apiClient.c b/samples/client/others/c/bearerAuth/src/apiClient.c index fafdcd49df8..6614016d27a 100644 --- a/samples/client/others/c/bearerAuth/src/apiClient.c +++ b/samples/client/others/c/bearerAuth/src/apiClient.c @@ -363,8 +363,8 @@ void apiClient_invoke(apiClient_t *apiClient, curl_easy_setopt(handle, CURLOPT_SSL_VERIFYHOST, 2L); } } else { - curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 0L); - curl_easy_setopt(handle, CURLOPT_SSL_VERIFYHOST, 0L); + curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 1L); + curl_easy_setopt(handle, CURLOPT_SSL_VERIFYHOST, 2L); } } diff --git a/samples/client/petstore/c-useJsonUnformatted/src/apiClient.c b/samples/client/petstore/c-useJsonUnformatted/src/apiClient.c index 943e43915a9..302cb8bff34 100644 --- a/samples/client/petstore/c-useJsonUnformatted/src/apiClient.c +++ b/samples/client/petstore/c-useJsonUnformatted/src/apiClient.c @@ -390,8 +390,8 @@ void apiClient_invoke(apiClient_t *apiClient, curl_easy_setopt(handle, CURLOPT_SSL_VERIFYHOST, 2L); } } else { - curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 0L); - curl_easy_setopt(handle, CURLOPT_SSL_VERIFYHOST, 0L); + curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 1L); + curl_easy_setopt(handle, CURLOPT_SSL_VERIFYHOST, 2L); } } diff --git a/samples/client/petstore/c/src/apiClient.c b/samples/client/petstore/c/src/apiClient.c index 943e43915a9..302cb8bff34 100644 --- a/samples/client/petstore/c/src/apiClient.c +++ b/samples/client/petstore/c/src/apiClient.c @@ -390,8 +390,8 @@ void apiClient_invoke(apiClient_t *apiClient, curl_easy_setopt(handle, CURLOPT_SSL_VERIFYHOST, 2L); } } else { - curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 0L); - curl_easy_setopt(handle, CURLOPT_SSL_VERIFYHOST, 0L); + curl_easy_setopt(handle, CURLOPT_SSL_VERIFYPEER, 1L); + curl_easy_setopt(handle, CURLOPT_SSL_VERIFYHOST, 2L); } }