| Index: third_party/WebKit/public/platform/WebRTCCertificate.h
|
| diff --git a/third_party/WebKit/public/platform/WebRTCCertificate.h b/third_party/WebKit/public/platform/WebRTCCertificate.h
|
| index 809839266a611882b6fed88293bb59a7d6e43ba6..9e067500c00b6b81ff2e255503d6dc803458a080 100644
|
| --- a/third_party/WebKit/public/platform/WebRTCCertificate.h
|
| +++ b/third_party/WebKit/public/platform/WebRTCCertificate.h
|
| @@ -11,6 +11,29 @@
|
|
|
| namespace blink {
|
|
|
| +// Corresponds to |rtc::RTCCertificatePEM| in WebRTC.
|
| +// See |WebRTCCertificate::toPEM| and |WebRTCCertificateGenerator::fromPEM|.
|
| +class WebRTCCertificatePEM {
|
| +public:
|
| + WebRTCCertificatePEM(std::string privateKey, std::string certificate)
|
| + : m_privateKey(privateKey), m_certificate(certificate)
|
| + {
|
| + }
|
| +
|
| + const std::string& privateKey() const
|
| + {
|
| + return m_privateKey;
|
| + }
|
| + const std::string& certificate() const
|
| + {
|
| + return m_certificate;
|
| + }
|
| +
|
| +private:
|
| + std::string m_privateKey;
|
| + std::string m_certificate;
|
| +};
|
| +
|
| // WebRTCCertificate is an interface defining what Blink needs to know about certificates,
|
| // hiding Chromium and WebRTC layer implementation details. It is possible to create
|
| // shallow copies of the WebRTCCertificate. When all copies are destroyed, the
|
| @@ -26,10 +49,14 @@ public:
|
| // data is freed.
|
| virtual std::unique_ptr<WebRTCCertificate> shallowCopy() const = 0;
|
|
|
| - virtual const WebRTCKeyParams& keyParams() const = 0;
|
| -
|
| // Returns the expiration time in ms relative to epoch, 1970-01-01T00:00:00Z.
|
| virtual uint64_t expires() const = 0;
|
| + // Creates a PEM strings representation of the certificate. See also
|
| + // |WebRTCCertificateGenerator::fromPEM|.
|
| + virtual WebRTCCertificatePEM toPEM() const = 0;
|
| + // Checks if the two certificate objects represent the same certificate value,
|
| + // as should be the case for a clone and the original.
|
| + virtual bool equals(const WebRTCCertificate& other) const = 0;
|
|
|
| private:
|
| WebRTCCertificate(const WebRTCCertificate&) = delete;
|
|
|