Remove deprecated SSLIdentity methods that return raw pointers.

Bug: webrtc:11410
Change-Id: I40e5549cb7c1082eebd870e0f133a3be0918dcaf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173571
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Taylor <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31092}
This commit is contained in:
Taylor Brandstetter
2020-04-14 16:36:29 -07:00
committed by Commit Bot
parent 9acc18d1fe
commit 4479a822c0
3 changed files with 2 additions and 22 deletions

View File

@ -246,11 +246,6 @@ std::unique_ptr<OpenSSLIdentity> OpenSSLIdentity::CreateForTest(
return CreateInternal(params);
}
OpenSSLIdentity* OpenSSLIdentity::GenerateForTest(
const SSLIdentityParams& params) {
return CreateInternal(params).release();
}
std::unique_ptr<SSLIdentity> OpenSSLIdentity::CreateFromPEMStrings(
const std::string& private_key,
const std::string& certificate) {
@ -272,11 +267,6 @@ std::unique_ptr<SSLIdentity> OpenSSLIdentity::CreateFromPEMStrings(
new OpenSSLIdentity(std::move(key_pair), std::move(cert)));
}
SSLIdentity* OpenSSLIdentity::FromPEMStrings(const std::string& private_key,
const std::string& certificate) {
return CreateFromPEMStrings(private_key, certificate).release();
}
std::unique_ptr<SSLIdentity> OpenSSLIdentity::CreateFromPEMChainStrings(
const std::string& private_key,
const std::string& certificate_chain) {
@ -319,12 +309,6 @@ std::unique_ptr<SSLIdentity> OpenSSLIdentity::CreateFromPEMChainStrings(
std::move(key_pair), std::make_unique<SSLCertChain>(std::move(certs))));
}
SSLIdentity* OpenSSLIdentity::FromPEMChainStrings(
const std::string& private_key,
const std::string& certificate_chain) {
return CreateFromPEMChainStrings(private_key, certificate_chain).release();
}
const OpenSSLCertificate& OpenSSLIdentity::certificate() const {
return *static_cast<const OpenSSLCertificate*>(&cert_chain_->Get(0));
}

View File

@ -72,12 +72,6 @@ class OpenSSLIdentity final : public SSLIdentity {
static std::unique_ptr<SSLIdentity> CreateFromPEMChainStrings(
const std::string& private_key,
const std::string& certificate_chain);
// Deprecated
static OpenSSLIdentity* GenerateForTest(const SSLIdentityParams& params);
static SSLIdentity* FromPEMStrings(const std::string& private_key,
const std::string& certificate);
static SSLIdentity* FromPEMChainStrings(const std::string& private_key,
const std::string& certificate_chain);
~OpenSSLIdentity() override;
const OpenSSLCertificate& certificate() const override;

View File

@ -116,6 +116,8 @@ class RTC_EXPORT SSLIdentity {
const KeyParams& key_param);
static std::unique_ptr<SSLIdentity> Create(const std::string& common_name,
KeyType key_type);
// Allows fine-grained control over expiration time.
static std::unique_ptr<SSLIdentity> CreateForTest(
const SSLIdentityParams& params);