OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
21.98k stars 6.6k forks source link

[BUG] [Rust Server] Rust Server generated code HTTPS/SSL not work. #6040

Open paladinzh opened 4 years ago

paladinzh commented 4 years ago

Bug Report Checklist

Description

On the example project openapi-v3,

  1. One Shell run "cargo run --example server -- --https "
  2. Another Shell run "cargo run --example client -- --https UuidGet" Fail with the following error: Err(ApiError("No response received: The OpenSSL library reported an error: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed:s3_clnt.c:1264:")) (X-Span-ID: XSpanIdString("4f9b1d61-d15e-453c-a7f3-7e4679213549"))
openapi-generator version

5.0.x and master both fail

OpenAPI declaration file content or url

example openapi-v3.yaml

Command line used for generation

One Shell run "cargo run --example server -- --https " Another Shell run "cargo run --example client -- --https UuidGet"

Steps to reproduce

On the example project openapi-v3, 1.One Shell run "cargo run --example server -- --https "

  1. Another Shell run "cargo run --example client -- --https UuidGet" Fail with the following error: Err(ApiError("No response received: The OpenSSL library reported an error: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed:s3_clnt.c:1264:")) (X-Span-ID: XSpanIdString("4f9b1d61-d15e-453c-a7f3-7e4679213549"))
Related issues/PRs
Suggest a fix

After replace the ca.pem/server-chain.pem/server-key.pem to new self signed CA, it works. Can someone update the pem in the code.

paladinzh commented 4 years ago

After replace the ca.pem/server-chain.pem/server-key.pem to new self signed CA, it works. Can someone update the pem in the code.