Implement certificate chain stats.

There was an implementation, but it relied on SSLCertificate::GetChain,
which was never implemented. Except in the fake certificate classes
used by the stats collector tests, hence the tests were passing.

Instead of implementing GetChain, we decided (in
https://webrtc-review.googlesource.com/c/src/+/6500) to add
methods that return a SSLCertChain directly, since it results in a
somewhat cleaner object model.

So this CL switches everything to use the "chain" methods, and gets
rid of the obsolete methods and member variables.

Bug: webrtc:8920
Change-Id: Ie9d7d53654ba859535462521b54c788adec7badf
Reviewed-on: https://webrtc-review.googlesource.com/56961
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Zhi Huang <zhihuang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22177}
This commit is contained in:
Taylor Brandstetter
2018-02-23 13:04:51 -08:00
committed by Commit Bot
parent 29ef9f066c
commit c392866d86
34 changed files with 241 additions and 314 deletions

View File

@ -92,7 +92,6 @@ class OpenSSLCertificate : public SSLCertificate {
size_t* length);
bool GetSignatureDigestAlgorithm(std::string* algorithm) const override;
std::unique_ptr<SSLCertChain> GetChain() const override;
int64_t CertificateExpirationTime() const override;
@ -118,6 +117,7 @@ class OpenSSLIdentity : public SSLIdentity {
~OpenSSLIdentity() override;
const OpenSSLCertificate& certificate() const override;
const SSLCertChain& cert_chain() const override;
OpenSSLIdentity* GetReference() const override;
// Configure an SSL context object to use our key and certificate.