JNI+mm: Generate certificate if non-default key type is specified.
By comparing key type with KT_DEFAULT we remove the implicit assumption that the default is RSA. Removing the assumptions about what the default is is necessary for a follow-up CL that will change the default. BUG=webrtc:5795, webrtc:5707 R=hta@webrtc.org, magjed@webrtc.org, tommi@webrtc.org TBR=tkchin@webrtc.org Review URL: https://codereview.webrtc.org/1965313002 . Cr-Commit-Position: refs/heads/master@{#12722}
This commit is contained in:
@ -197,14 +197,16 @@ void PeerConnectionDelegateAdapter::OnIceCandidate(
|
||||
constraints:(RTCMediaConstraints *)constraints
|
||||
delegate:(id<RTCPeerConnectionDelegate>)delegate {
|
||||
NSParameterAssert(factory);
|
||||
std::unique_ptr<webrtc::PeerConnectionInterface::RTCConfiguration> config(
|
||||
configuration.nativeConfiguration);
|
||||
if (!config)
|
||||
return nullptr;
|
||||
if (self = [super init]) {
|
||||
_observer.reset(new webrtc::PeerConnectionDelegateAdapter(self));
|
||||
webrtc::PeerConnectionInterface::RTCConfiguration config =
|
||||
configuration.nativeConfiguration;
|
||||
std::unique_ptr<webrtc::MediaConstraints> nativeConstraints =
|
||||
constraints.nativeConstraints;
|
||||
_peerConnection =
|
||||
factory.nativeFactory->CreatePeerConnection(config,
|
||||
factory.nativeFactory->CreatePeerConnection(*config,
|
||||
nativeConstraints.get(),
|
||||
nullptr,
|
||||
nullptr,
|
||||
@ -251,7 +253,11 @@ void PeerConnectionDelegateAdapter::OnIceCandidate(
|
||||
}
|
||||
|
||||
- (BOOL)setConfiguration:(RTCConfiguration *)configuration {
|
||||
return _peerConnection->SetConfiguration(configuration.nativeConfiguration);
|
||||
std::unique_ptr<webrtc::PeerConnectionInterface::RTCConfiguration> config(
|
||||
configuration.nativeConfiguration);
|
||||
if (!config)
|
||||
return false;
|
||||
return _peerConnection->SetConfiguration(*config);
|
||||
}
|
||||
|
||||
- (void)close {
|
||||
|
||||
Reference in New Issue
Block a user