Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(704)

Unified Diff: webrtc/rtc_base/opensslidentity.h

Issue 3010363002: Implement GetChain for OpenSSLCertificate.
Patch Set: Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/rtc_base/opensslidentity.cc » ('j') | webrtc/rtc_base/opensslidentity.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/rtc_base/opensslidentity.h
diff --git a/webrtc/rtc_base/opensslidentity.h b/webrtc/rtc_base/opensslidentity.h
index ed7c07299a40fef713c6bff8e0bb0fed1e082a4c..fbbc0667493f1c47c4e3468e8d7cd569a9a33265 100644
--- a/webrtc/rtc_base/opensslidentity.h
+++ b/webrtc/rtc_base/opensslidentity.h
@@ -62,9 +62,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 +101,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_;
RTC_DISALLOW_COPY_AND_ASSIGN(OpenSSLCertificate);
};
« no previous file with comments | « no previous file | webrtc/rtc_base/opensslidentity.cc » ('j') | webrtc/rtc_base/opensslidentity.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698