Index: webrtc/rtc_base/opensslidentity.h |
diff --git a/webrtc/rtc_base/opensslidentity.h b/webrtc/rtc_base/opensslidentity.h |
index ed7c07299a40fef713c6bff8e0bb0fed1e082a4c..1154edb28282eb898d037de8379dc85e3f3d3f6c 100644 |
--- a/webrtc/rtc_base/opensslidentity.h |
+++ b/webrtc/rtc_base/opensslidentity.h |
@@ -16,6 +16,7 @@ |
#include <memory> |
#include <string> |
+#include <vector> |
#include "webrtc/rtc_base/checks.h" |
#include "webrtc/rtc_base/constructormagic.h" |
@@ -62,9 +63,10 @@ class OpenSSLKeyPair { |
class OpenSSLCertificate : public SSLCertificate { |
public: |
// Caller retains ownership of the X509 object. |
- explicit OpenSSLCertificate(X509* x509) : x509_(x509) { |
- AddReference(); |
- } |
+ explicit OpenSSLCertificate(X509* x509); |
+ |
+ // Caller retains owership of STACK_OF(X509). |
+ explicit OpenSSLCertificate(STACK_OF(X509)* chain); |
static OpenSSLCertificate* Generate(OpenSSLKeyPair* key_pair, |
const SSLIdentityParams& params); |
@@ -100,9 +102,11 @@ class OpenSSLCertificate : public SSLCertificate { |
int64_t CertificateExpirationTime() const override; |
private: |
- void AddReference() const; |
+ void AddReference(X509* x509) const; |
X509* x509_; |
+ // Non-leaf certificate chain. |
+ std::vector<OpenSSLCertificate*> cert_chain_; |
davidben_webrtc
2017/09/26 23:21:46
You don't seem to free this in the destructor. Thi
|
RTC_DISALLOW_COPY_AND_ASSIGN(OpenSSLCertificate); |
}; |