New DtlsIdentityStoreInterface::RequestIdentity added that takes rtc::KeyParams. The old RequestIdentity still exists that take rtc::KeyType.

Default implementation added that invokes the other RequestIdentity method, adding default parameters or dropping the parameters.

This CL is in preparation for removing the RequestIdentity that takes rtc::KeyType, necessary as to not break Chromium.

BUG=webrtc:4927, 528250

Review URL: https://codereview.webrtc.org/1414243003

Cr-Commit-Position: refs/heads/master@{#10351}
This commit is contained in:
hbos
2015-10-21 01:44:21 -07:00
committed by Commit bot
parent a01d440223
commit 3b7c793574

View File

@ -72,9 +72,24 @@ class DtlsIdentityStoreInterface {
// The |observer| will be called when the requested identity is ready, or when
// identity generation fails.
// TODO(torbjorng,hbos): The following RequestIdentity is about to be removed,
// see below todo.
virtual void RequestIdentity(
rtc::KeyType key_type,
const rtc::scoped_refptr<DtlsIdentityRequestObserver>& observer) = 0;
const rtc::scoped_refptr<DtlsIdentityRequestObserver>& observer) {
// Add default parameterization.
RequestIdentity(rtc::KeyParams(key_type), observer);
}
// TODO(torbjorng,hbos): Parameterized key types! The following
// RequestIdentity should replace the old one that takes rtc::KeyType. When
// the new one is implemented by Chromium and WebRTC the old one should be
// removed. crbug.com/544902, webrtc:5092.
virtual void RequestIdentity(
rtc::KeyParams key_params,
const rtc::scoped_refptr<DtlsIdentityRequestObserver>& observer) {
// Drop parameterization.
RequestIdentity(key_params.type(), observer);
}
};
// The WebRTC default implementation of DtlsIdentityStoreInterface.