envoyproxy / envoyproxy/envoy

TLS: Improve story with intermediate and/or multiple CAs

オープン
#1,220 コメント 19 件 リアクション 0 件 担当者 0 名 GitHub で見る
area/tls enhancement help wanted
主要言語
C++
スター
28.9k
フォーク
5.6k
平均マージ
1日 22時間
マージ済み PR(30日)
430

説明

(forked from #615)

Currently, Envoy assumes that:
- there is single CA in `ca_cert_file` (at least when it comes to client certificates, displaying CA information and calculating expiration dates),
- there are no intermediates in `cert_chain_file` (at least for the purpose of calculating expiration dates).

@mattklein123 How useful is the expiration date tracking in practice? Are you using this in production?

@timperrett Could you verify that this fixes the issues you described in #615?

```
diff --git a/source/common/ssl/context_impl.cc b/source/common/ssl/context_impl.cc
index 1ca93c4b7..aa94ba32f 100644
--- a/source/common/ssl/context_impl.cc
+++ b/source/common/ssl/context_impl.cc
@@ -45,9 +45,12 @@ ContextImpl::ContextImpl(ContextManagerImpl& parent, Stats::Scope& scope, Contex
fmt::format("Failed to load verify locations file {}", config.caCertFile()));
}

- // This will send an acceptable CA list to browsers which will prevent pop ups.
- rc = SSL_CTX_add_client_CA(ctx_.get(), ca_cert_.get());
- RELEASE_ASSERT(1 == rc);
+ bssl::UniquePtr list(SSL_load_client_CA_file(config.caCertFile().c_str()));
+ if (nullptr == list) {
+ throw EnvoyException(
+ fmt::format("Failed to load verify locations file {}", config.caCertFile()));
+ }
+ SSL_CTX_set_client_CA_list(ctx_.get(), list.release());

verify_mode = SSL_VERIFY_PEER;
}
```

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。