Revert "Modernize rtc::SSLCertificate"
This reverts commit 55cd3ac804811e02b9b14026c683f9b30ea0c0bb.
Reason for revert: Breaks Chrome compile: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8932588150164377824/+/steps/compile__with_patch_/0/stdout
Original change's description:
> Modernize rtc::SSLCertificate
>
> Bug: webrtc:9860
> Change-Id: Idfce546ded500d957397c5bd873200565d3e6b64
> Reviewed-on: https://webrtc-review.googlesource.com/c/105280
> Reviewed-by: Benjamin Wright <benwright@webrtc.org>
> Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
> Commit-Queue: Steve Anton <steveanton@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25150}
TBR=steveanton@webrtc.org,qingsi@webrtc.org,benwright@webrtc.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: webrtc:9860
Change-Id: I4ff090f2612252cd656a34a0181aff81488c6edf
Reviewed-on: https://webrtc-review.googlesource.com/c/105946
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Commit-Queue: Niklas Enbom <niklas.enbom@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25182}
diff --git a/rtc_base/opensslcertificate.h b/rtc_base/opensslcertificate.h
index 3b49f93..b7ecc3b 100644
--- a/rtc_base/opensslcertificate.h
+++ b/rtc_base/opensslcertificate.h
@@ -36,15 +36,13 @@
// OpenSSLCertificate share ownership.
explicit OpenSSLCertificate(X509* x509);
- static std::unique_ptr<OpenSSLCertificate> Generate(
- OpenSSLKeyPair* key_pair,
- const SSLIdentityParams& params);
- static std::unique_ptr<OpenSSLCertificate> FromPEMString(
- const std::string& pem_string);
+ static OpenSSLCertificate* Generate(OpenSSLKeyPair* key_pair,
+ const SSLIdentityParams& params);
+ static OpenSSLCertificate* FromPEMString(const std::string& pem_string);
~OpenSSLCertificate() override;
- std::unique_ptr<SSLCertificate> Clone() const override;
+ OpenSSLCertificate* GetReference() const override;
X509* x509() const { return x509_; }
@@ -71,6 +69,8 @@
int64_t CertificateExpirationTime() const override;
private:
+ void AddReference() const;
+
X509* x509_; // NOT OWNED
RTC_DISALLOW_COPY_AND_ASSIGN(OpenSSLCertificate);
};